Jump to content

Actor problem


Mag-got

Recommended Posts

When I run the game it works fine but there are 2 actors instead of 1, and I have no clue how to fix this problem. It's supposed to spawn an actor that starts shooting the player (just testing) but it spawns 2, same problem with cars.. Everything else goes fine, they start shooting and so on.

 

 

:LALLAwait 100 msthread 'LALLA'0006: 1@ = 84.00006: 2@ = -850.80006: 3@ = 9.6:LALLA_2wait 250 ms023C: load_special_actor 21 'SAM'model.Load(#COLT45):LALLA_22wait 250 ms038B: load_requested_modelsif and023D: special_actor 21 loaded0248: model #COLT45 availablejump @LALLA_3else_jump @LALLA_2:LALLA_3wait 250 ms009A: $LALLATIN = create_actor 21 #SPECIAL21 at 1@ 2@ 3@01B2: give_actor $LALLATIN weapon 17 ammo 1001CA: actor $LALLATIN kill_player $PLAYER_CHAR:LALLA_4wait 250 msifactor.Dead($LALLATIN)else_jump @LALLA_4actor.DestroyWithFade($LALLATIN):LALLA_5wait 250 msjump @LALLA_5

 

 

Thanks in advance.

Edited by Mag-got
Link to comment
Share on other sites

i replied to similar problem, but for SA some time ago in this section.

it seems i have to make it easier to read:

check if previous thread is ended/looped (end_thread or jump) or it continues directly to your code

Edited by PLPynton
Link to comment
Share on other sites

Found these lines:

 

jump @LALLA_3else_jump @LALLA_2

 

Just change them with:

 

else_jump @LALLA_2jump @LALLA_3

 

Not tested yet.

Link to comment
Share on other sites

No, the problem isn't the order of the jump statements (that should be OK), but it should instead else_jump to @LALLA_22, not @LALLA_2. (After that change, and only after that you can then remove the wait command in @LALLA_2) Isn't 038B a NOP?

Link to comment
Share on other sites

 

No, the problem isn't the order of the jump statements (that should be OK), but it should instead else_jump to @LALLA_22, not @LALLA_2. (After that change, and only after that you can then remove the wait command in @LALLA_2) Isn't 038B a NOP?

Did just as you said but still spawns 2. whatsthat.gif

Link to comment
Share on other sites

check if previous thread is ended/looped (end_thread or jump) or it continues directly to your code
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
  • 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.