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.

DarkBASIC Professional Discussion / Monster Movement...Arff...

Author
Message
DBAlex
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: United Kingdom
Posted: 14th May 2005 05:56 Edited at: 14th May 2005 05:56
I cant understand why the monsters in my code wont move...

That code is supposed to rotate the monsters to face the player, and move them if there xangle is at 0.

They wont move though...

Anyone try to fix it please...(and yes it isnt indented...)

Thanks.




AMD 64 3000 + 512mb RAM + 80GB HD + Radeon 9600se 128mb
waffle
22
Years of Service
User Offline
Joined: 9th Sep 2002
Location: Western USA
Posted: 15th May 2005 17:51
try adding some debugging code to the loop ...
like maybe start with only testing the first monster ...

text 0,25,"testing monster X angle"+str$(object angle x(1))

also, your second loop resets all X angles to -90
this will defeat the testing for X angle =0.
Baggers
21
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 15th May 2005 18:41
Well because you check for when the x value=0...the first time it will be so your program will point the monster and move him...but by pointing him the x value will have changed and so next time it wont point or move the monster.

Login to post a reply

Server time is: 2025-06-06 17:22:43
Your offset time is: 2025-06-06 17:22:43