playMaker

Author Topic: RTS movement  (Read 2338 times)

rungsted93

  • Playmaker Newbie
  • *
  • Posts: 2
RTS movement
« on: July 02, 2016, 08:29:39 PM »
Hey i want to set up which animations to use for my soldiers when doing different things.

I started stage 1 saying "level loaded" then i added the actions "controller movement" and after that play animation "run". But nothing is happening. I recently got into Unity so i'm kind of a noob. Any help would be appreciated though :)

Zeldag

  • Full Member
  • ***
  • Posts: 198
Re: RTS movement
« Reply #1 on: July 03, 2016, 06:22:12 AM »
Hi and welcome to the forums!

I cannot really make out what you have done or what still needs to be done, from your description- a screenshot may help?

But if you're just starting out and have absolutely no idea of where to start, then I would go for a few tutorials:

Great intro to Playmaker for Beginners:

2 Platformer game tutorials, follow either series to get some experience in setting up basic (and some not so basic) game elements in the practical form of actually making a game:

- 2.5 D

- 2D

I could not find any RTS tutorials, but I am sure once you sit through a few tutorials, you will pick up enough to get started on an RTS games.

Good luck with it and I hope you find something useful up there :) .

rungsted93

  • Playmaker Newbie
  • *
  • Posts: 2
Re: RTS movement
« Reply #2 on: July 03, 2016, 09:20:53 AM »
Hello thanks a lot for the links :) Basically i just want to make them use the running animation when running. Idle when standing still etc.

I've attatched some screenshots :)

Picture 1: Here the soldier will use the Idle animation when standing still
https://s31.postimg.org/cui193xcr/playmaker1.jpg

Picture 2: Here i gave a unit order to move but the idle animation is still on
https://s32.postimg.org/s2zx8vixh/playmaker2.jpg

Picture 3 and 4: Here is what i tried to do in Playmaker
https://s32.postimg.org/xms07hltx/playmaker3.jpg
https://s32.postimg.org/40ww0ue85/playmaker4.jpg

Zeldag

  • Full Member
  • ***
  • Posts: 198
Re: RTS movement
« Reply #3 on: July 03, 2016, 11:51:28 AM »
Hi,

It is a bit (quite a bit actually) more complicated than just randomly chucking in the actions into separate FSMs :) .

This is a possoible soultion, but really I am not sure if it will work for you: If your character currently moves as you need him to, try to make an FSM where the first state gets the character's movement speed/velocity (or the input axis that is making him move) . Next use compare float action and if the speed/velocity/axis is higher or lower than 0, send an event to the next state, which plays the run animation and again compares the same float (and probably need to get the floast again in this state, unless you're getting the float in another FSM), but here you send to the idle state once the float is 0.

I think that is a possible solution, but if it makes no sense, then I can only suggest to check out those tutorials again, trust me after them you will come back and this will all be simple stuff...