Jump to content

Actor aiming -> Crash


roby65

Recommended Posts

This is my code:

 

:loop

wait 50

00A0: store_actor $PLAYER_ACTOR position_to $PLAYER_POS_X $PLAYER_POS_Y $PLAYER_POS_Z

0667: AS_actor $ACTOR_PTR aim_at $POS_X $POS_Y $POS_Z 100000 ms

jump @loop

 

i want an actor to always aim the player....

 

this code works, but after 20-30 seconds the game crashes!!!!! why???? i MUST fix this sad.gifsad.gifsad.gif

Link to comment
Share on other sites

gtasbigfoot

Why don't you just use this opcode?

 

 

0635: AS_actor 1@ aim_at_actor $PLAYER_ACTOR 9999 ms 

 

 

 

 

for some reason i don't like the one you posted.

 

or just pic a aim point by cods.

 

 

0667: AS_actor 1@ aim_at 'cods' 9999 ms

 

 

Link to comment
Share on other sites

 

what's cods?  confused.gif

cods=co-ordinates

 

But I think cords instead of cods is easier

 

EDIT: LOL, I must have posted like 1 second after psy posted his reply

Edited by james227uk
Link to comment
Share on other sites

what's cods?  confused.gif

cods=co-ordinates

 

But I think cords instead of cods is easier

 

EDIT: LOL, I must have posted like 1 second after psy posted his reply

the problem remains the same:

 

if i call the "0667: AS_actor 1@ aim_at 'cods' 9999 ms" or whatever param i give the function, after some consecutive calls the game becomes weird (once i re-spawned O_o) and after 20-30 seconds game crashes....and i can't understand why!!!! sad.gif

Link to comment
Share on other sites

gtasbigfoot

umm,i spawned a bigfoot to just aim at cj it worked fine.maybe ZAZ will know why this is.are you sure it's this opcode that is the problam?

 

there may be a other one doing somthing to this one.but that is most unlikely.

 

 

 

EDIT:I would wait for ZAZ he's a very if not best scripter.

 

but this opcode is some how giving the game this problam.i know what you mean the game gets slower and slower than just crashes.

Edited by gtasbigfoot
Link to comment
Share on other sites

EDIT:I would wait for ZAZ he's a very if not best scripter.

ZAZ is a very excellent scripter doesn't mean he is the best

user posted image
Link to comment
Share on other sites

 

This is my code:

 

:loop

wait 50

00A0: store_actor $PLAYER_ACTOR position_to $PLAYER_POS_X $PLAYER_POS_Y $PLAYER_POS_Z

0667: AS_actor $ACTOR_PTR aim_at $POS_X $POS_Y $POS_Z 100000 ms

jump @loop

 

i want an actor to always aim the player....

 

this code works, but after 20-30 seconds the game crashes!!!!! why???? i MUST fix this  sad.gif  sad.gif  sad.gif

00A0: store_actor $PLAYER_ACTOR position_to $PLAYER_POS_X $PLAYER_POS_Y $PLAYER_POS_Z

0667: AS_actor $ACTOR_PTR aim_at $POS_X $POS_Y $POS_Z 100000 ms

 

must be

0667: AS_actor $ACTOR_PTR aim_at $PLAYER_POS_X $PLAYER_POS_Y $PLAYER_POS_Z 100000 ms

Link to comment
Share on other sites

sorry, the code i posted is wrong but mine is correct......

 

actor aims at me, and after 20 seconds the strange things start to happen......then crash....

Link to comment
Share on other sites

gtasbigfoot

 

EDIT:I would wait for ZAZ he's a very if not best scripter.

ZAZ is a very excellent scripter doesn't mean he is the best

 

 

True.but im saying he is a good scripter.

 

 

 

 

strange things start to happen

 

what happens? i spawned two clones of cj and copy each other and can both talk by a opcode mistake the otherday.has it got anything to do with cj?

 

 

EDIT:i did not spawn #null

Edited by gtasbigfoot
Link to comment
Share on other sites

 

strange things start to happen

 

what happens? i spawned two clones of cj and copy each other and can both talk by a opcode mistake the otherday.has it got anything to do with cj?

 

 

EDIT:i did not spawn #null

 

sometimes my player start to aim to...himself xD

 

another time, another player was created (but the create player code is executed always only once.....)

 

can't understand why of all this cryani.gif

Link to comment
Share on other sites

gtasbigfoot

spawning cj again?

 

no wonder why if this is the player is being spawned every second in to cj because #null is cj but not the voice or you can not play him.the main cj the one that you play is being spawned.

 

 

is this in sannybuilder? or main scm(if main scm before mission 0 the code does)could you maybe post all of the script?because some way this opcode is messing around with others.

 

 

here's what i did by mistake:

 

http://uk.youtube.com/watch?v=h9Ya8led868

Edited by gtasbigfoot
Link to comment
Share on other sites

Change the time of 99999 or whatever to -1 and he should aim at you indefinately too.

Are you continually spawning the actor who is aiming at you as well, could explain crashes after about 20 seconds because your memory is full.

Show more of the code so we can help.

Link to comment
Share on other sites

already tryed.....it crashes probably due to a task overflow.....this is strange cryani.gif

How far away are you walking form the ped, are you going out of range?

 

Link to comment
Share on other sites

already tryed.....it crashes probably due to a task overflow.....this is strange  cryani.gif

How far away are you walking form the ped, are you going out of range?

no, i just stand and wait near him..... whatsthat.gif

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.