Jump to content

[GTA SA]Actor's Body doesn't dissapear when dispatched &..


Recommended Posts

DoubleVision

My actor's bodies don't disappear when killed, nor when I leave the area he won't dissapear nor his bodies. And I don't want him to spawn in the air when I'm flying, too. I want him to only spawn on the ground near me everywhere I go. And when he's defeated I want his body to dissapear. I also want him and his body to disappear if I leave the area and leave him if he's not killed. I didn't create the following script, so I don't take credit:

 

004F: create_thread @ZOMBIEA_101

:ZOMBIEA
03A4: name_thread 'ZOMBIEA'

:ZOMBIEA_101
0001: wait 0 ms
077E: get_active_interior_to 0@
00D6: if and
0@ == 0 // if player is outside
0256: player $PLAYER_CHAR defined // because of just one Condition, the zombie will spawn instantly in starting,
004D: jump_if_false @ZOMBIEA_101
0247: load_model #WMOICE
038B: load_requested_models

:ZOMBIEA_120
04C4: store_coords_to 7@ 8@ 9@ from_actor $PLAYER_ACTOR with_offset 0.0 15.0 0.0
009A: 0@ = create_actor_pedtype 8 model #WMOICE at 7@ 8@ 9@
0245: set_actor 0@ walk_style_to "DRUNKMAN"
07DD: set_actor 0@ attack_rate 500 // IDK if it works
060B: set_actor 0@ decision_maker_to 65536
0946: set_actor 0@ actions_uninterupted_by_weapon_fire 1
0332: set_actor 0@ bleeding 1
0489: set_actor 0@ muted 1
05E2: AS_actor 0@ kill_actor $PLAYER_ACTOR
0001: wait 1000 // wait a sec

:ZOMBIEA_130
0001: wait 0 ms
00D6: if
0118: actor 0@ dead
004D: jf @ZOMBIEA_130
0001: wait 500 ms
goto @ZOMBIEA_120

Edited by TheThingy
DoubleVision

Hi, Aswin. Like this? I tried making it also so that the dead ped dissapears right when it dies (which I wanna keep that way) But, he doesn't appear with me if I go to another area-He stays looking for me at the last area he spawned. How can I fix this?:

 

004F: create_thread @ZOMBIEA_101

:ZOMBIEA
03A4: name_thread 'ZOMBIEA'

:ZOMBIEA_101
0001: wait 0 ms
077E: get_active_interior_to 0@
00D6: if and
0@ == 0 // if player is outside
0256: player $PLAYER_CHAR defined // because of just one Condition, the zombie will spawn instantly in starting,
004D: jump_if_false @ZOMBIEA_101
0247: load_model #WMOICE
038B: load_requested_models

:ZOMBIEA_120
04C4: store_coords_to 7@ 8@ 9@ from_actor $PLAYER_ACTOR with_offset 0.0 15.0 0.0
009A: 0@ = create_actor_pedtype 8 model #WMOICE at 7@ 8@ 9@
0245: set_actor 0@ walk_style_to "DRUNKMAN"
07DD: set_actor 0@ attack_rate 100
060B: set_actor 0@ decision_maker_to 65536
0946: set_actor 0@ actions_uninterupted_by_weapon_fire 1
0332: set_actor 0@ bleeding 1
0489: set_actor 0@ muted 1
05E2: AS_actor 0@ kill_actor $PLAYER_ACTOR
0001: wait 1000 // wait a sec
0249: release_model #WMOICE

:ZOMBIEA_130
0001: wait 0 ms
00D6: if
0118: actor 0@ dead
004D: jf @ZOMBIEA_130
0001: wait 500 ms

:ZOMBIEA_131
009B: destroy_actor 0@
01C2: remove_references_to_actor 0@ // Like turning an actor into a random pedestrian
goto @ZOMBIEA_120

Ashwin.Star

Yeah Pretty Much like that,

or something like this

 

 

:ZOMBIEA_1300001: wait 0 ms00D6: if0118:   actor 0@ dead  004D: jf @ZOMBIEA_1300001: wait 1000 ms01C2: remove_references_to_actor 0@ // i think it will make him disappear only when He's Deadgoto @ZOMBIEA_120
DoubleVision

Thanks, but how can I make him respawn near me with the same coordinates near me if I leave the area when I don't kill him? Because, he just runs after me when I leave and doesn't stop. When I go back to him he's still trying to attack me where I left him.

 

For example, let's say I decide to avoid him to go to some other location. I'd like him to reappear near me if I'm far away when I don't kill him. And I don't want him to spawn out of the sky when I'm in the sky, too. So, basically I want him to reappear if I ditch him in the next area I visit. And I don't want him to spawn up in the sky with me when I'm in the sky, because I'm using a Super Flying CJ script.

 

Edit: Also, after a while my game freezes :(

Edited by TheThingy

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
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

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