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 / Can some helpful person write me a code

Author
Message
Miketheman123
22
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 24th Nov 2003 23:27
I need a code that I can use that allows my character in my game to move. The following moves are:

Run: Directions
Jump: Space
Duck: Z
Shoot Gun: X

If someone could write one I would be most obliged!

Mike
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 24th Nov 2003 23:32


-RUST-
sybixsus
23
Years of Service
User Offline
Joined: 23rd Jul 2003
Location:
Posted: 24th Nov 2003 23:38
Sure, here's a little something I knocked up for you.

ZomBfied
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location:
Posted: 24th Nov 2003 23:39
Is it overhead? First person? 3/4 view? Is it an object? a sprite? Your question is too general. Go through some tutorials and write some simple code first. Come back to seek wisdom from the masters when you have gained more knowlege.
Wik
23
Years of Service
User Offline
Joined: 21st May 2003
Location: CT, United States
Posted: 25th Nov 2003 04:36 Edited at: 25th Nov 2003 04:36
Or you guys could just
GIVE'M DA CODEZ

And dont tell him to read a book! Book is stupid! I hate book!

lol


I wanted to learn C++ but then I started having nightmares.
I would scream at night, "AHHHHH!!! THE SEMI-COLONS"
John H
Retired Moderator
23
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 25th Nov 2003 05:23
ROFLMAO Good times


Dont forget to Join the Forums!
feiting
22
Years of Service
User Offline
Joined: 19th Oct 2003
Location:
Posted: 25th Nov 2003 06:53
abcdefg don't expect me to have tinkered with stuff still on my desktop all the time.

He who does not take the assassin job, will get killed by one who does.
AlecM
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Concord, MA
Posted: 25th Nov 2003 09:41
type 2149043248093240789 for a first person shooter

[P4 2.8C @ 3.03 with an 866mhz FSB:: MSI Neo-2LS running PAT:: 1gb Mushkin PC-3500 DDR High Perf level 2@ 2,2,2 :: ATI Radeon9800ProAIW :: 120Gb SeagateBarracuda 7,200RPM SATA HD :: Antec Plus1080AMG]
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 25th Nov 2003 10:29
On a serious note, a much better option would be for you to learn to do this yourself.

Run: Directions

Look at Move Object and Move Camera

Jump: Space

Add a variable to your code eg: jumpTimer, set this to 100 when the space key is pressed (spacekey()), each loop reduce jumpTimer by 1 (dec jumpTimer), and whilst jumpTimer is > 0, move the camera / object up.

Duck: Z

Just use Move Camera or Move Object to lower the position of the camera.

Shoot Gun: X

That is a very silly key to choose, but anyway. Use inkey$() to check if X is pressed (If inkey$()="x" ...). Create an object to use as a bullet, use the Rotate Object command to point it in the correct direction, move it bit by bit until it hits something or has moved too far. Look at the Collision commands under Basic3D.


BLUE GUI Plugin: http://blue.robert-knight.net / BLUE IDE [href]http://blueide.sf.net/ - Replacement editor for DBPro[/href]
Gir
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Crazy Taco
Posted: 27th Nov 2003 01:10
hehe X for shoot.....

I'm makin' a cake...
JasonB
23
Years of Service
User Offline
Joined: 3rd Jan 2003
Location: Australia
Posted: 29th Nov 2003 07:41 Edited at: 29th Nov 2003 07:42
oh no, they are breeding god save us all, more give me da codes its crazy we all going to die. ARGHHHHH



Current Projects:
Lair Of The Beast: 40%
Space RTS: 3%
ReD_eYe
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 29th Nov 2003 13:12
whys x a stupid key to use? if spacebar is jump then x is perfectly posistioned for your middle finger to press? very easy


GO TO THE ETERNAL DESTINY FORUMS!!! http://forums.eternaldestinyonline.com
Do it now!!!
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 29th Nov 2003 13:38
how about shoot=userDefinedKey(5)?


God created the world in 7 days, but we're still waiting for the patch.

Login to post a reply

Server time is: 2026-07-27 01:32:54
Your offset time is: 2026-07-27 01:32:54