How To modify the wander behavior for actor turn in the same direction of wander

jdevlearning

  • Posts: 46
I have an ant as actor on my scene also I added the wander behavior but when start walking the actor is not turning in the same with WANDER always look to the left, if is going up is looking to the left. So how to modify this wander or more events to help the actor walks correctly. thanks :o ::) :P

Meestar

  • Posts: 652
I have an ant as actor on my scene also I added the wander behavior but when start walking the actor is not turning in the same with WANDER always look to the left, if is going up is looking to the left. So how to modify this wander or more events to help the actor walks correctly. thanks :o ::) :P

Rotate your ant's animation so that it's facing up
PM me if you require help.  I'm always glad to help out!

jdevlearning

  • Posts: 46
But how the actor will know is going to the left or right and the current animation on events is not a problem of the animation is BEHAVIOR!!!! did tried before?

Tuo

  • *
  • Posts: 2469
Try this (you may have to add 90/180/270 to the angle based on original direction of the ant):

(It's not the least laggy, but it works)
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)

Meestar

  • Posts: 652
Try this (you may have to add 90/180/270 to the angle based on original direction of the ant):

(It's not the least laggy, but it works)

I thought that came with the wander behavior?
PM me if you require help.  I'm always glad to help out!

Tuo

  • *
  • Posts: 2469
Heck if I know... I can't remember a single pre-made behavior that I've used in almost 2 years of Stencyl'ing. Premade behaviors are recipes for stagnation and disaster.
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)

jdevlearning

  • Posts: 46
And thats the reason Tuo is a Expert Stencyler 8) thanks master. Ill try and tell you how is going

Meestar

  • Posts: 652
And thats the reason Tuo is a Expert Stencyler 8) thanks master. Ill try and tell you how is going

The title EXPERT has to deal with the number of posts made, I believe.

Not to say he isn't one, because he is.

« Last Edit: February 06, 2013, 05:35:06 pm by Meestar »
PM me if you require help.  I'm always glad to help out!

Joe

  • *
  • Posts: 2480
Nope, it's because of his contributions to the community. :)

Tuo

  • *
  • Posts: 2469

The title EXPERT has to deal with the number of posts made, I believe.

Not to say he isn't one, because he is.

All that post counts do is to increase your forum level (for example, with over 100 posts, you are level 2).
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)

jdevlearning

  • Posts: 46
TUO is working more or less is just change the position when is stop not when is walking pointing on right direction

Tuo

  • *
  • Posts: 2469
Okay... how is the ant moving? How are you controlling the movement? If you can give a screenshot of that coding, then I might be able to find a better route for you.
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)

jdevlearning

  • Posts: 46
the bug walk itself I do not control the ant. the only thing I added on wander is your code, anyway here is scrs



PS
Why not create a conditions when is pointing anywhere and call the right animation for that

Meestar

  • Posts: 652
Nope, it's because of his contributions to the community. :)

Thank you for the clarification, and to you as well Tuo.

That code Tuo gave you should be with the walk and wait movement code.  Also, correct me if I'm wrong, but if you want a full circle of motion the velocity should be between 0 and 360.  -180 and 180 is just a half circle?
EDIT: Brain not working today.  -180 and 180 is a circle.  Sorry.

« Last Edit: February 06, 2013, 09:26:55 pm by Meestar »
PM me if you require help.  I'm always glad to help out!

Tuo

  • *
  • Posts: 2469
Meestar: The negative 180 goes the other half-circle. Both ways work (and both ways double-up on an angle :P)

I will try to adjust the code a bit for you...
Don't look to me but rather to the One who is the reason for what I do. :)

If you need help, send me a PM. Even if I haven't been on in the forums in ages, I still receive those messages via email notifications. You can also reply to any of my forum posts, regardless of the age (especially if I created it), and I will likely reply.

If you want to see the programming behind certain types of games, feel free to check out my "Demo-" games on StencylForge (http://community.stencyl.com/index.php/topic,16160.0.html)