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 / [DBP] Elevator code using Sparky's Collision DLL and DBO models

Author
Message
Softwizz
14
Years of Service
User Offline
Joined: 14th May 2009
Location: U.K.
Posted: 1st Sep 2009 20:29 Edited at: 2nd Sep 2009 00:57
Howdy

As an addition to my FPS code here:
http://forum.thegamecreators.com/?m=forum_view&t=154103&b=6

I have made some code for a lift (elevator)

The keys are:
WASD to move
mouse to look around
hold left shift to run
hold c to crouch
space jumps
x operates the lift

Here is the code, there may be a few unused variables as I used the code from the aforementioned thread and just altered it:



The code and all media is included in this thread, download button bottom right.

It may not be the best way of doing things but it works.
Image here:



Nothing to see here, move along please.

Attachments

Login to view attachments
Softwizz
14
Years of Service
User Offline
Joined: 14th May 2009
Location: U.K.
Posted: 2nd Sep 2009 16:39 Edited at: 2nd Sep 2009 16:51
Now then,
I have changed the moveElevator() function, instead of moving the trigger zone with the lift it will just jump to the position the lift stops at.

This little function is so easy to alter and change.



Nothing to see here, move along please.
Vues3d on Kalimee
19
Years of Service
User Offline
Joined: 12th May 2004
Location: NYON (SWITZERLAND)
Posted: 18th Sep 2009 12:39
Very nice snippet...

http://www.vues3d.com
[http://www.vues3d.com/kalimee.html][/href]
Softwizz
14
Years of Service
User Offline
Joined: 14th May 2009
Location: U.K.
Posted: 19th Sep 2009 01:45
Thanks Vues3d on Kalimee.
I searched the forum for ages looking how to do elevators and didnt find anything that helped, so I just put it on the forum for others to use and improve on.

Nothing to see here, move along please.
thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 19th Sep 2009 21:28
it's great! thanks!


forever loading...

Login to post a reply

Server time is: 2024-05-05 00:13:25
Your offset time is: 2024-05-05 00:13:25