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 / Need Help With Going To Second Level.

Author
Message
jduarte54
11
Years of Service
User Offline
Joined: 22nd Jan 2014
Location:
Posted: 29th Jan 2014 19:38
In our game we are trying to figure out, that if you hit a certain object. You will get teleported or transported to the next level. If I could have any help that would be cool.
ShellfishGames
12
Years of Service
User Offline
Joined: 6th Feb 2013
Location:
Posted: 29th Jan 2014 21:51
For instance check whether the distance between your player and the object is small enough:

dx = object position x(certainObject) - playerX
dy = object position y(certainObject) - playerY
dz = object position z(certainObject) - playerZ
dis = sqrt(dx*dx + dy*dy + dz*dz)
if dis < minimumDistance
moveOnToNextLevel()
endif


Or just using object collision(playerObject, certainObject) instead of the distance.

How you realize the level progression depends on your code and how you load/create/store levels in general. Can't really tell you anything about that with the information you gave us.

Login to post a reply

Server time is: 2025-05-15 19:49:55
Your offset time is: 2025-05-15 19:49:55