bull.04 Posted August 16, 2011 Share Posted August 16, 2011 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 More sharing options...
arielnmz Posted August 16, 2011 Share Posted August 16, 2011 (edited) 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 August 16, 2011 by arielnmz Link to comment Share on other sites More sharing options...
bull.04 Posted August 16, 2011 Author Share Posted August 16, 2011 Yeah I fixed that by using: 0172: [email protected] = actor $PLAYER_ACTOR Z_angle [email protected] -= 180.00173: set_actor [email protected] Z_angle_to [email protected] But now I need help with the limb separation. Link to comment Share on other sites More sharing options...
arielnmz Posted August 16, 2011 Share Posted August 16, 2011 Hmm.. well I dont know anything about that kind of things... Link to comment Share on other sites More sharing options...
ZAZ Posted August 17, 2011 Share Posted August 17, 2011 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 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now