Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / making an object following the player..

Author
Message
Mr_Insane
21
Years of Service
User Offline
Joined: 14th Nov 2002
Location: United States
Posted: 2nd Jan 2003 11:35
Hi again, I'm having a little trouble with having the bad guy ships following the player..

I seen a few example codes for monsers following the players but thats not what I'm looking for.

So..... I'm trying to make it where the enemy ship has to steer 3 pitch angles and 2 yaw angles to get to actually point to a player so it can follow the player. Rolling is not needed. Just pitch and yaw.

my methods for trying to make the enemy to follow the player didn't work. the point object and move command combined together screwed things up.

heres what I actually tried:

IF TargetX#(TEK)> object position x(1) Then TargetX#(Tek)=TargetX#(Tek)-10
IF TargetX#(TEK) object position y(1) Then TargetY#(Tek)=TargetY#(Tek)-10
IF TargetY#(TEK) object position z(1) Then TargetZ#(Tek)=TargetZ#(Tek)-10
IF TargetZ#(TEK)
Mr_Insane
21
Years of Service
User Offline
Joined: 14th Nov 2002
Location: United States
Posted: 2nd Jan 2003 11:39
oops I postesd this in the wrong section.. I wasn't paying attention though.. it sucks that you can't really edit posts..

Login to post a reply

Server time is: 2024-04-25 12:30:57
Your offset time is: 2024-04-25 12:30:57