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 Discussion / easy some proof read this code

Author
Message
ClearCoder
22
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 2nd Jul 2003 01:04 Edited at: 2nd Jul 2003 01:15
okay this is my simple code to get a monster to come out of the sea and follow the player, later i will add the code to make him attack when he gets close. but at the moment he goes in any direction faces the oppersite way from the player and go up and under the matrix can any tell my whats wrong



Newbie Now; Expert Later
Current project:The Sorus
Dr DooMer
22
Years of Service
User Offline
Joined: 22nd Dec 2002
Location: United Kingdom
Posted: 2nd Jul 2003 02:13 Edited at: 2nd Jul 2003 02:17
In movebad, you've got:

mZ# = object position -x-(50)
mX# = object position x(50)
mY# = get ground height(1,mX#,mZ#)

The -x- seems to be a problem, as it should probably be z.

As for facing the opposite way, does he at least move in the right direction? You could try adding this straight after loading the bad guy object and animations:


That will spin him round to face the other way, then reset the pivot so he's permanently like that.

Hope this helps!

"I am a living, thinking entity who was created in the sea of information."
ClearCoder
22
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 2nd Jul 2003 11:30
okay thx now i followings me but there is one more problem when he gets close to you as he is told i points at y#+10 so when he is close turn and is almost faceing vertical how can i make it so he always faces the same angle

Newbie Now; Expert Later
Current project:The Sorus
Dr DooMer
22
Years of Service
User Offline
Joined: 22nd Dec 2002
Location: United Kingdom
Posted: 2nd Jul 2003 23:35 Edited at: 2nd Jul 2003 23:37
Simple: after issuing the point object command, add this line:


That will reset your monster's x rotation value, which is what is used for pointing up and down, while leaving the other two angles the same as they were after pointing. Hope this helps!

Also, I'm now testing out a new sig - let's see if it works...

Login to post a reply

Server time is: 2025-05-19 13:35:23
Your offset time is: 2025-05-19 13:35:23