Quantcast

Jump to content

» «
Photo

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

4 replies to this topic
Dachinko
  • Dachinko

    Snitch

  • Members
  • Joined: 26 Jul 2012
  • None

#1

Posted 05 May 2014 - 02:53 AM Edited by TheThingy, 05 May 2014 - 03:37 AM.

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


Ashwin.Star
  • Ashwin.Star

    i'll be back...

  • Members
  • Joined: 14 Nov 2010
  • India

#2

Posted 05 May 2014 - 04:45 AM Edited by Ashwin the new boy, 05 May 2014 - 04:53 AM.

Remove reference of that actor,

that will make him ordinary Actor like those Peds you see on Streets, 


Dachinko
  • Dachinko

    Snitch

  • Members
  • Joined: 26 Jul 2012
  • None

#3

Posted 05 May 2014 - 05:09 AM

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
  • Ashwin.Star

    i'll be back...

  • Members
  • Joined: 14 Nov 2010
  • India

#4

Posted 05 May 2014 - 06:25 AM

Yeah Pretty Much like that,

or something like this

 

:ZOMBIEA_130
0001: wait 0 ms
00D6: if
0118:   actor 0@ dead  
004D: jf @ZOMBIEA_130
0001: wait 1000 ms
01C2: remove_references_to_actor 0@ // i think it will make him disappear only when He's Dead
goto @ZOMBIEA_120

Dachinko
  • Dachinko

    Snitch

  • Members
  • Joined: 26 Jul 2012
  • None

#5

Posted 05 May 2014 - 06:35 AM Edited by TheThingy, 05 May 2014 - 06:51 AM.

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 :(





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users