Move to Target and Return

Posted By: DarkWhoppy_

Move to Target and Return - 03/27/08 18:28

In my little RPG demo... I'm working on battle system improvements.

The player (if you've seen the video) Is a reasonable distance from the "spider" enemy. I want him to run towards the spider, attack, and run back. Sound simple? Doesn't seem to be...

I used the code found in this thread: C_MOVE THREAD

Now I am unsure why this happens... but the player shoots off into a random direction. And keeps going... I used the same code, line for line... I triple checked.

Does anyone have any other suggestions? Although, I do prefer to not modify the TILT of the entity... And that happens when using the vec_to_angle() function. I just want the player to run towards a target without adjusting his tilt.
Posted By: Quad

Re: Move to Target and Return - 03/27/08 18:50

try creating an invisible dummy entity, at the position of the player at start, then scan spider, turn player's face to it, and get close to spider. and make your attack, when it is over scan your dummy enitity, turn player's face to it and walk forward until player hits the dummy entity. then remove the dummy and end the battle mode.

and use vec_to_angle like vec_to_angle(my.pan,temp); so it does not change the tilt.
© 2024 lite-C Forums