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.

Newcomers DBPro Corner / change an object ??????????

Author
Message
No budget games
20
Years of Service
User Offline
Joined: 26th Feb 2004
Location:
Posted: 14th Apr 2004 20:15
my problem is that i have two objects one of the character standing still the other is of him walking/moving
so when i use the move object command would it be possible to make the standing still object change to the walking one before it moves

sj
muscles
20
Years of Service
User Offline
Joined: 12th Apr 2004
Location:
Posted: 14th Apr 2004 21:11
I can offer you a solution, however, I'm almost positive there's a better way, you'll just have to look for it. I'm not saying this method won't work, just that it's inefficient. But since your just starting out, you probably don't care about efficiency, you just want it to work.
Basically, load both of your objects (the stationary one and the one with the walk animation). position them both at the same location, hide the object with the walking animation. then, when you use your move object command do something as follows:
if upkey() = 1
hide object 1
show object 2
loop object 2
move object 1,5
move object 2,5
else
hide object 2
stop object 2
show object 1
endif

just make sure that in every instance that you relocate/move/rotate your character, you affect BOTH objects (hence the commands to move both objects, even though you can only see one of them).

Login to post a reply

Server time is: 2024-11-26 12:46:07
Your offset time is: 2024-11-26 12:46:07