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 / Loading a person

Author
Message
Ali M Oldboy
20
Years of Service
User Offline
Joined: 6th Nov 2004
Location: England, UK
Posted: 17th Dec 2004 04:18 Edited at: 17th Dec 2004 04:24
Hey,

I need help loading a person so that it is like in 3RD Person Mode,
and also I can move it around with the Up, Down, Left and right keys please?

Cheers,

Ali

P.S It is for an action/slash em up game called 'Dark Lands'

In the croud of pain, St. Jimmy stands proud, but we're not insane He says 'We're F***** up' but we're not the same!
Jake Blues
20
Years of Service
User Offline
Joined: 19th Jun 2004
Location: United States
Posted: 17th Dec 2004 04:55 Edited at: 17th Dec 2004 04:56
To load an object you use the "load object" command.

load object "Object Name", Object Number

To do a 3rd Person Camera use the code below.

Quote: "`Get Cordinates
x=object position x(objectnumber)
y=object position y(objectnumber)
z=object position z(objectnumber)
a#=object angle y(objectnumber)

`Workout Camera's New Cordinates
cx=newxvalue(x,wrapvalue(a#),300)
cz=newzvalue(z,wrapvalue(a#),300)
cy=get ground height(1,cx,cz)+100

`This makes the camera turn smoother
cx=curvevalue(cx,camera position x(),5)
cy=curvevalue(cy,camera position y(),5)
cz=curvevalue(cz,camera position z(),5)

`Position Camera
position camera cx,cy,cz
point camera x,y,z
"


Don't let life get you down, it will only get better.
Ali M Oldboy
20
Years of Service
User Offline
Joined: 6th Nov 2004
Location: England, UK
Posted: 17th Dec 2004 15:51
Cheers, mate

In the croud of pain, St. Jimmy stands proud, but we're not insane He says 'We're F***** up' but we're not the same!
Ali M Oldboy
20
Years of Service
User Offline
Joined: 6th Nov 2004
Location: England, UK
Posted: 17th Dec 2004 15:59
Now I need help with him slashing up enemies, anybody? No? DUST!

In the croud of pain, St. Jimmy stands proud, but we're not insane He says 'We're F***** up' but we're not the same!
Jake Blues
20
Years of Service
User Offline
Joined: 19th Jun 2004
Location: United States
Posted: 17th Dec 2004 19:51
You mean going up and swinging a sword or something at a enemy?

If that's what you mean, then it's done with object animation and collision.

Don't let life get you down, it will only get better.
Ali M Oldboy
20
Years of Service
User Offline
Joined: 6th Nov 2004
Location: England, UK
Posted: 17th Dec 2004 21:27
Oh yeah! And pressing a key like

If Shiftkey = then goto 1 or whatever

In the croud of pain, St. Jimmy stands proud, but we're not insane He says 'We're F***** up' but we're not the same!
Dom
20
Years of Service
User Offline
Joined: 31st May 2004
Location:
Posted: 18th Dec 2004 01:07
I would use a GOSUB or a Function for that job

DRAGONFIRE STUDIOS
Lead Programmer
(The Studio being my front room)
Sol462
20
Years of Service
User Offline
Joined: 12th Sep 2004
Location: playing with the spazookeedoo
Posted: 23rd Dec 2004 09:15
saberdude's right ; going to a line number can get very messy.
Ali M Oldboy
20
Years of Service
User Offline
Joined: 6th Nov 2004
Location: England, UK
Posted: 24th Dec 2004 06:44
okay thanks


-- Shoot the damn bastard!

Login to post a reply

Server time is: 2025-05-24 07:48:56
Your offset time is: 2025-05-24 07:48:56