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.

Author
Message
Mark3D
21
Years of Service
User Offline
Joined: 29th Mar 2003
Location: United Kingdom
Posted: 15th Dec 2003 22:52
Hi all ,
I was wondering, how do I make an model stand still when idling (with slight movements) and then when I press the up key, the object will change aninmation and appear to walk?
All help would be greatly apprciated

Nature gave man 2 ends. One to think with, the other to sit on. Mans' sucess depends on which end he uses most!!
Jaze
20
Years of Service
User Offline
Joined: 20th Nov 2003
Location: Connecticut, USA
Posted: 15th Dec 2003 23:36
Load Two Objects (for your question)

load object "modelidle.x",1
load object "modelwalk.x",2
iMode = 1 ` idle=1, walk=2
repeat
if upkey()
if iMode=1
hide object 1
show object 2
play object 2
loop object 2
else
hide object 2
show object 1
play object 1
loop object 1
endif
until escapekey()
[/b]

That is a VERY simplified explanation that doesn't make stuff actually walk... but I find the SIMPLE concept is easier to put into your own homegrown code than figuring out some lengthy demo that may be "To much" to take in or track (cuz someone else wrote it)

The main ideas are simple:

1: You need to track what each "model" is doing: walking, standing, dieing

2: You need to represent that model's "actions" with the correct model, by showing the object, in the correct position, that has the correct model and animation previously loaded or cloned. (Tip: Load each model type once but then use clones of the originals to use less memory...so you can have multiples doing their own thing)

3: You need scan the keyboard and make the correct object visible for the correct mode (walk, idle etc) and position it in correct place. If its already in that mode - you should leave it alone...so make your code smart enough to "Track" the current MODE so you can decide to do anything... basically:

IF WALKING and I dont want WALKING then HIDE walkingModel and Show Idle Model

Making the walk realistic over the floor etc is trial and error and is another subject altogether (when you consider how you need to break everything down to itssimplist terms to get it working....as least I do)


-=/Jaze/=-

Login to post a reply

Server time is: 2024-09-21 12:03:21
Your offset time is: 2024-09-21 12:03:21