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.

Newcomers DBPro Corner / can't figure this one out (help me)

Author
Message
yosepp
21
Years of Service
User Offline
Joined: 14th Dec 2002
Location:
Posted: 17th Mar 2003 16:50
Ok, i've created a terrain in magicworld, which can be accessed here http://www.hot.ee/yosepp/rpg.zip
and i'm trying to create a code, which prevents me from going throught the matrix. The code is here :
rem include MagicWorld's load function and load the world
#include "magicload1-1.dba"
MagicLoad("rpg",1,1,1)

hide mouse
rem initialize sync
sync on
sync rate 100

position camera 2000,0,1000
rem main loop and mouselook
camx#=CAMERA POSITION X()
camz#=CAMERA POSITION z()
GH#=Get Ground Height(1,CamX#,CamZ#)-1.0
do

rem mouselook code'
position mouse 320,240

CX#=Camera Angle X(): CY#=Camera Angle Y(): CZ#=Camera Angle Z()
CX#=Wrapvalue(CX#-mousemovey()): CY#=Wrapvalue(CY#+mousemovex())
Rotate Camera CX#,CY#,CZ#

Rem Use left mouse button to move forwards
If MouseClick()=1
GH#=Get Ground Height(1,Camera Position x(), Camera Position z() )
Move Camera 10
If camera position y()
fire, fire, fire
-"Cornholio" alias Beavis
Xoid
21
Years of Service
User Offline
Joined: 8th Mar 2003
Location:
Posted: 17th Mar 2003 17:03
Try this, hope it helps

yosepp
21
Years of Service
User Offline
Joined: 14th Dec 2002
Location:
Posted: 17th Mar 2003 17:17
Thank's but this is not exactly what i needed. I needed something like a code that would always keep me ABOVE the ground, so i could walk over the mountains. But if you don't mind, could use your code in my game?

fire, fire, fire
-"Cornholio" alias Beavis
yosepp
21
Years of Service
User Offline
Joined: 14th Dec 2002
Location:
Posted: 17th Mar 2003 17:21
oops, now i spotted, that the code didn't post correctly. Unfortunately, thanks to my little brother, i lost the code.
anywayz, if someone has a tutorial about using the get ground height command, i'd be thankful.

fire, fire, fire
-"Cornholio" alias Beavis

Login to post a reply

Server time is: 2024-11-24 05:32:20
Your offset time is: 2024-11-24 05:32:20