Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
How to fix direction movement; Check the 3rd post
Topic Started: May 31 2009, 06:02 PM (275 Views)
enjoto
Member
[ *  * ]
So in my game wich is with 3rd person view when my character jumps I use the frames 94-109 but i can't make it that my character returns to the Idle frames wich are 0-32. It's the same with the kicking animation. I tried with

if(frame=109){first_frame=0
last_frame=32}

but it still doesn't work. I tried and GetCurrentFrame() but it doesn't work(or I don't know how to use it)for the GetCurrentFrame() I used

Create event:
current_frame=GetCurrentFrame()
Step event
if(current_frame=... the same as the one with only frame

I searched about this, but found only two answers the one with the GetCurrendFrame and one more that i couldn't understand. Oh and I use the 3rd person view example thats on the site with small camera code editions

I din't want to make one more topic for a simple question so i'm asking here check the 3rd post for info
Edited by enjoto, May 31 2009, 07:49 PM.
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
enjoto
May 31 2009, 06:02 PM


if(frame=109){first_frame=0
last_frame=32}

That's all wrong. It should be something like this:
Code:
 

if(round(GetCurrentFrame())>=109)
{
first_frame=1;
last_frame=32;
frame=-1;
}

Step();
Edited by Despellanion, May 31 2009, 06:18 PM.
Offline Profile Quote Post Goto Top
 
enjoto
Member
[ *  * ]
Thanks. It works perfectly but has few bugs maybe from my codes because i was getting them and before but in a smaller amound.I should check the edited codes

Edit: How do I check for direction in 3D. I want to make a human that walks randomly but he would always watch to one direction so how do i make the angle or the actual roty variable to change the direction. I yesterday tried to do roty=direction but it didn't work or i made a mistake i don't remember.Or does u3d have it's own direction check code
Edited by enjoto, May 31 2009, 07:48 PM.
Offline Profile Quote Post Goto Top
 
MysteriXYZ
Member Avatar
Master Matrix Masher
[ *  *  *  *  *  * ]
enjoto
May 31 2009, 07:24 PM
How do I check for direction in 3D. I want to make a human that walks randomly but he would always watch to one direction so how do i make the angle or the actual roty variable to change the direction. I yesterday tried to do roty=direction but it didn't work or i made a mistake i don't remember.Or does u3d have it's own direction check code
It should be:
Code:
 
roty=direction+90;

This is mentioned in the description of the Move() function, in the "Getting started" chapter of the help file.
So you see, it's always a good idea to read at least the first couple of chapters of a manual, before you start doing stuff ;) .
U3D is like candy; after extensive consumption, it's Best to brush.
Offline Profile Quote Post Goto Top
 
enjoto
Member
[ *  * ]
Thanks. I didn't even know where's the help file but i just found it after i looks at the SDK
Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply