Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Ayumi, 1 invisible), 1,291 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Move to Target and Return #190520
03/27/08 18:28
03/27/08 18:28
Joined: Jun 2003
Posts: 427
Prison
DarkWhoppy_ Offline OP
Senior Member
DarkWhoppy_  Offline OP
Senior Member

Joined: Jun 2003
Posts: 427
Prison
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.


darkwhoppy@msn.no.spam.com (remove no.spam.) Website: WhoppyArts
Re: Move to Target and Return [Re: DarkWhoppy_] #190521
03/27/08 18:50
03/27/08 18:50
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
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.

Last edited by Quadraxas; 03/27/08 18:51.

3333333333

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1