Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Couple of questions on a script.


bull.04
 Share

Recommended Posts

So I have been putting together this script to release for the past day or 2 and I came across a couple of problems. I was testing it out and I need a way for the ped to spawn RIGHT in front of the player (about 2 or 3 feet away) and facing toward him. This is so I can make the script a bit more realistic instead of him killing someone to the right of him about 4 feet away. Any ways on possibly doing that?

 

I was also making gibs for another fatality and was wondering if there is a way to have an offset of directions from a single set of coordinates? Like I have 04C4 defined but only one set of coordinates so all of the gibs spawn in one place and slowly slide down because they have collision detection. I tried using velocity to make them fly in different directions, but it only seems to work about 10% of the time and every other one they just all spawn in one place. Is there a way to offset that so say, torso spawns in that specific place, but the arms spawn a couple inches away from it? Or would I have to use a different set of coords for each different limb?

 

Anyways, thanks for the help and for any future answers! Also, is there a way to make the camera like circle around the player once, then stop?

 

Here is the script:

 

{$CLEO .cs}thread 'FATALITY':FATALITY_1wait 0if andPlayer.Defined($PLAYER_CHAR)80DF:   not actor $PLAYER_ACTOR driving jf @FATALITY_1if and0AB0: key_pressed 700AB0: key_pressed 78jf @FATALITY_1jump @FATALITY_2:FATALITY_2wait 00AB5: store_actor $PLAYER_ACTOR closest_vehicle_to [email protected] closest_ped_to [email protected]: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0 1.0 0jump @FATALITY_3:FATALITY_3wait 0if and80DF:   not actor $PLAYER_ACTOR driving 80DF:   not actor [email protected] driving8118:   not actor [email protected] dead jf @FATALITY_2Actor.PutAt([email protected], [email protected], [email protected], [email protected])0615: define_AS_pack_begin [email protected] 0605: actor [email protected] perform_animation_sequence "IDLE_TIRED" IFP_file "PED" 4.0 loop 1 1 1 1 time -1 // versionA 02A3: enable_widescreen truePlayer.CanMove($PLAYER_CHAR) = False05BF: AS_actor [email protected] look_at_actor $PLAYER_ACTOR 500000 ms05BF: AS_actor $PLAYER_ACTOR look_at_actor [email protected] 500000 msAudiostream.Load($FH, "CLEO\SOUND\FINISH.MP3")Audiostream.PerformAction($FH, PLAY)jump @FATALITY_20:FATALITY_20wait 0if0AB0: key_pressed 52jf @FATALITY_4jump @FATALITY_6:FATALITY_4wait 0if0AB0: key_pressed 53jf @FATALITY_20jump @FATALITY_7:FATALITY_6Audiostream.Load($FATM, "CLEO\SOUND\FMUS.MP3")Audiostream.PerformAction($FATM, PLAY) wait 20000615: define_AS_pack_begin [email protected] 0605: actor $PLAYER_ACTOR perform_animation_sequence "GUN_BUTT" IFP_file "PED" 4.0 loop 0 0 0 0 time -1 // versionA0615: define_AS_pack_end [email protected] 200 0321: kill_actor [email protected] 1000Audiostream.Load($FAT, "CLEO\SOUND\FATAL.MP3")Audiostream.PerformAction($FAT, PLAY)jump @FATALITY_10:FATALITY_704ED: load_animation "FIGHT_E" wait 0 if 04EE:   animation "FIGHT_E" loadedjf @FATALITY_7Audiostream.Load($FATM, "CLEO\SOUND\FMUS.MP3")Audiostream.PerformAction($FATM, PLAY)wait 20000615: define_AS_pack_begin [email protected] 0605: actor $PLAYER_ACTOR perform_animation_sequence "FIGHTKICK_B" IFP_file "FIGHT_E" 4.0 loop 0 0 0 0 time -1 // versionA0615: define_AS_pack_end [email protected]: store_coords_to [email protected] [email protected] [email protected] from_actor [email protected] with_offset 0 0 0 wait 400Actor.DestroyInstantly([email protected])064B: [email protected] = create_particle "BLOOD_HELI" at [email protected] [email protected] [email protected] type 1064C: make_particle [email protected] visible [email protected] = Object.Create(2906, [email protected], [email protected], [email protected])0453: set_object [email protected] XY_rotation -90.0 90.0 angle 0 04D9: object [email protected] set_scripted_collision_check 1 Object.CollisionDetection([email protected]) = TrueObject.ToggleInMovingList([email protected]) = Truewait [email protected] = Object.Create(2906, [email protected], [email protected], [email protected])0453: set_object [email protected] XY_rotation -90.0 90.0 angle 0.004D9: object [email protected] set_scripted_collision_check 1 Object.CollisionDetection([email protected]) = TrueObject.ToggleInMovingList([email protected]) = Truewait [email protected] = Object.Create(2905, [email protected], [email protected], [email protected])0453: set_object [email protected] XY_rotation -90.0 90.0 angle 0 04D9: object [email protected] set_scripted_collision_check 1 Object.CollisionDetection([email protected]) = TrueObject.ToggleInMovingList([email protected]) = Truewait [email protected] = Object.Create(2905, [email protected], [email protected], [email protected])0453: set_object [email protected] XY_rotation -90.0 90.0 angle 0.004D9: object [email protected] set_scripted_collision_check 1 Object.CollisionDetection([email protected]) = TrueObject.ToggleInMovingList([email protected]) = Truewait [email protected] = Object.Create(2907, [email protected], [email protected], [email protected])0453: set_object [email protected] XY_rotation -90.0 90.0 angle 0 04D9: object [email protected] set_scripted_collision_check 1 Object.CollisionDetection([email protected]) = TrueObject.ToggleInMovingList([email protected]) = Truewait [email protected] = Object.Create(2908, [email protected], [email protected], [email protected])0453: set_object [email protected] XY_rotation -90.0 90.0 angle 0.004D9: object [email protected] set_scripted_collision_check 1 Object.CollisionDetection([email protected]) = TrueObject.ToggleInMovingList([email protected]) = True0906: set_object [email protected] mass_to 1.5 // float 0908: set_object [email protected] turn_mass_to 1.5 // float0906: set_object [email protected] mass_to 1.5 // float 0908: set_object [email protected] turn_mass_to 1.5 // float0906: set_object [email protected] mass_to 1.5 // float 0908: set_object [email protected] turn_mass_to 1.5 // float0906: set_object [email protected] mass_to 1.5 // float 0908: set_object [email protected] turn_mass_to 1.5 // float0906: set_object [email protected] mass_to 1.5 // float 0908: set_object [email protected] turn_mass_to 1.5 // float0906: set_object [email protected] mass_to 1.5 // float 0908: set_object [email protected] turn_mass_to 1.5 // float05A7: set_object [email protected] velocity_in_direction_X 0.5 direction_Y -3.0 direction_Z 10.005A7: set_object [email protected] velocity_in_direction_X -0.5 direction_Y -3.0 direction_Z 10.005A7: set_object [email protected] velocity_in_direction_X 0.5 direction_Y -3.0 direction_Z 10.005A7: set_object [email protected] velocity_in_direction_X -0.5 direction_Y -3.0 direction_Z 10.005A7: set_object [email protected] velocity_in_direction_X 0.5 direction_Y -3.0 direction_Z 10.005A7: set_object [email protected] velocity_in_direction_X 0.5 direction_Y -3.0 direction_Z 10.0wait 1000  Audiostream.Load($FAT, "CLEO\SOUND\FATAL.MP3")Audiostream.PerformAction($FAT, PLAY) jump @FATALITY_9:FATALITY_9wait 30000650: destroy_particle [email protected] 064F: remove_references_to_particle [email protected]([email protected])Object.RemoveReferences([email protected])Object.RemoveReferences([email protected])Object.RemoveReferences([email protected])Object.RemoveReferences([email protected])Object.RemoveReferences([email protected])Object.RemoveReferences([email protected])Object.KeepInMemory([email protected]) = FalseObject.KeepInMemory([email protected]) = FalseObject.KeepInMemory([email protected]) = FalseObject.KeepInMemory([email protected]) = FalseObject.KeepInMemory([email protected]) = FalseObject.KeepInMemory([email protected]) = FalseAudiostream.Release($FH)Audiostream.Release($FAT)Audiostream.Release($FATM)02A3: enable_widescreen falsePlayer.CanMove($PLAYER_CHAR) = Truejump @FATALITY_1 :FATALITY_10wait 3000Actor.RemoveReferences([email protected])Audiostream.Release($FH)Audiostream.Release($FAT)Audiostream.Release($FATM)02A3: enable_widescreen falsePlayer.CanMove($PLAYER_CHAR) = Truejump @FATALITY_1

 

Link to comment
Share on other sites

Use this:

 

 

0639: AS_actor [email protected] rotate_to_actor $PLAYER_ACTOR0639: AS_actor $PLAYER_ACTOR rotate_to_actor [email protected]

 

 

Rather than:

 

 

05BF: AS_actor [email protected] look_at_actor $PLAYER_ACTOR 500000 ms05BF: AS_actor $PLAYER_ACTOR look_at_actor [email protected] 500000 ms

 

 

If you want it to turn instantly set its Z angle equal to that of yours plus 180.0... or set him to yours multiplied by -2.0... like this:

 

 

0172: [email protected] = actor $PLAYER_ACTOR Z_angle 0013: [email protected] *= -2.00173: set_actor [email protected] Z_angle_to [email protected]

 

 

Or:

 

 

0172: [email protected] = actor $PLAYER_ACTOR Z_angle 000B: [email protected] += 180.00173: set_actor [email protected] Z_angle_to [email protected]

 

 

the AS option turn lasts about 500 ms though... just check your timing and Good luck!

Edited by arielnmz
Link to comment
Share on other sites

you can add and substract tiny coordsvalues before the next object will be spawned

[email protected] += 0.5

[email protected] -= 1.0

 

another aspect is that the objects often needs a moment after Object.Create till they are visible

you should spawn them earlier 100 units above and after the 2 seconds waittime put them to their place

 

 

 

:FATALITY_704ED: load_animation "FIGHT_E"wait 0if04EE:   animation "FIGHT_E" loadedjf @FATALITY_7Audiostream.Load($FATM, "CLEO\SOUND\FMUS.MP3")Audiostream.PerformAction($FATM, PLAY)04C4: store_coords_to [email protected] [email protected] [email protected] from_actor [email protected] with_offset 0.0 0.0 [email protected] = Object.Create(2906, [email protected], [email protected], 100.0)[email protected] = Object.Create(2906, [email protected], [email protected], 102.0)[email protected] = Object.Create(2905, [email protected], [email protected], 104.0)[email protected] = Object.Create(2905, [email protected], [email protected], 106.0)[email protected] = Object.Create(2907, [email protected], [email protected], 108.0)[email protected] = Object.Create(2908, [email protected], [email protected], 110.0)wait 20000605: actor $PLAYER_ACTOR perform_animation_sequence "FIGHTKICK_B" IFP_file "FIGHT_E" 4.0 loop 0 0 0 0 time -1 // versionAwait 400Actor.DestroyInstantly([email protected])064B: [email protected] = create_particle "BLOOD_HELI" at [email protected] [email protected] [email protected] type 1064C: make_particle [email protected] visibleObject.PutAt([email protected], [email protected], [email protected], [email protected])0453: set_object [email protected] XY_rotation -90.0 90.0 angle 004D9: object [email protected] set_scripted_collision_check 1Object.CollisionDetection([email protected]) = TrueObject.ToggleInMovingList([email protected]) = Truewait [email protected] += 0.5Object.PutAt([email protected], [email protected], [email protected], [email protected])0453: set_object [email protected] XY_rotation -90.0 90.0 angle 0.004D9: object [email protected] set_scripted_collision_check 1Object.CollisionDetection([email protected]) = TrueObject.ToggleInMovingList([email protected]) = Truewait [email protected] += 0.5Object.PutAt([email protected], [email protected], [email protected], [email protected])0453: set_object [email protected] XY_rotation -90.0 90.0 angle 004D9: object [email protected] set_scripted_collision_check 1Object.CollisionDetection([email protected]) = TrueObject.ToggleInMovingList([email protected]) = Truewait [email protected] -= 1.0Object.PutAt([email protected], [email protected], [email protected], [email protected])0453: set_object [email protected] XY_rotation -90.0 90.0 angle 0.004D9: object [email protected] set_scripted_collision_check 1Object.CollisionDetection([email protected]) = TrueObject.ToggleInMovingList([email protected]) = Truewait [email protected] -= 1.0Object.PutAt([email protected], [email protected], [email protected], [email protected])0453: set_object [email protected] XY_rotation -90.0 90.0 angle 004D9: object [email protected] set_scripted_collision_check 1Object.CollisionDetection([email protected]) = TrueObject.ToggleInMovingList([email protected]) = Truewait [email protected] += 0.5Object.PutAt([email protected], [email protected], [email protected], [email protected])0453: set_object [email protected] XY_rotation -90.0 90.0 angle 0.004D9: object [email protected] set_scripted_collision_check 1Object.CollisionDetection([email protected]) = TrueObject.ToggleInMovingList([email protected]) = True0906: set_object [email protected] mass_to 1.5 // float0908: set_object [email protected] turn_mass_to 1.5 // float0906: set_object [email protected] mass_to 1.5 // float0908: set_object [email protected] turn_mass_to 1.5 // float0906: set_object [email protected] mass_to 1.5 // float0908: set_object [email protected] turn_mass_to 1.5 // float0906: set_object [email protected] mass_to 1.5 // float0908: set_object [email protected] turn_mass_to 1.5 // float0906: set_object [email protected] mass_to 1.5 // float0908: set_object [email protected] turn_mass_to 1.5 // float0906: set_object [email protected] mass_to 1.5 // float0908: set_object [email protected] turn_mass_to 1.5 // float05A7: set_object [email protected] velocity_in_direction_X 0.5 direction_Y -3.0 direction_Z 10.005A7: set_object [email protected] velocity_in_direction_X -0.5 direction_Y -3.0 direction_Z 10.005A7: set_object [email protected] velocity_in_direction_X 0.5 direction_Y -3.0 direction_Z 10.005A7: set_object [email protected] velocity_in_direction_X -0.5 direction_Y -3.0 direction_Z 10.005A7: set_object [email protected] velocity_in_direction_X 0.5 direction_Y -3.0 direction_Z 10.005A7: set_object [email protected] velocity_in_direction_X 0.5 direction_Y -3.0 direction_Z 10.0wait 1000  Audiostream.Load($FAT, "CLEO\SOUND\FATAL.MP3")Audiostream.PerformAction($FAT, PLAY)jump @FATALITY_9

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.