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/=-