Hey guys, I have been trying to create a script to make an object act like a boomerang. I need the script to make the item do this; Pick it up, throw it at enemy(which should hurt by physics), and then come back to the player.
So far I have this;
;Artificial Intelligence Script
;Header
desc = After being picked up, when thrown and is far form player, come back and have player in possesion of item again.
;Triggers
:state=0,playerassociated:state=1,settarget,timerstart
:state=0:state=1
:state=1,timergreater=1:state=2
:state=2,plrdistfurther=80,timerstart:state=3
:state=2,playerassociated:state=1
:state=3,timergreater=1:state=4
:state=4,timergreater=1000:state=5,movetotarget
:state=5,plrdistwithin=50:state=0,associateplayer
;End of Script
What I have found this to do is when picked up, the item seems to bypass the script where i tell it to wait until its so far away, and its trying to 'move' to me. In its attempt, it drags me up into the air, like a platform. I like to call it a gravity ball(im using a ball as my boomerang device). Now, i'm not very good at scripting, so be sure to noob bash me plz...since im sure my script has blatent mistakes. Thanks in advance!
*edit* I just read a preview on this game called Dark Sector for next-gen consoles, and what i am trying to do is similar to the main weapon in that game if you wish to check it out for further clarification...
Your signature has been erased by a mod because it's larger than 600x120