playMaker

Author Topic: Events not "cascading" or continuing -  (Read 1322 times)

TonCoder

  • Playmaker Newbie
  • *
  • Posts: 3
Events not "cascading" or continuing -
« on: August 13, 2017, 02:00:17 PM »
Hello everyone and thanks in advance.

I am having some problem understanding the whole every frame, or at least I think I am.

So I have a simple Enemy (Zombie) with an idle state that checks to see if the Player is in its field of view and range.

http://imgur.com/dBbHT3u


Everything works fine on that state, and then it moves to the next one, but here is my problem.

I have Smooth look at to look at my player when all the variables are TRUE which is cool, but then when it moves to the "MOVETOPLAYER" state it just stays stuck on the Smooth Look at and never leave even if my other conditions are set to Every frame.

http://imgur.com/poaoLpl

Here it shows it stuck, with the values as FALSE and still stuck on Smooth look at
http://imgur.com/JmqLy0l
« Last Edit: August 13, 2017, 02:14:52 PM by TonCoder »

TonCoder

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Events not "cascading" or continuing -
« Reply #1 on: August 13, 2017, 09:24:59 PM »
Well I found my own solution, and odd enough, seems that this "Actions Sequence" had a play in it. First time working with this, I prefer to code things to be honest, but figured this way be easier to work with.

Here is where I got the solution:
http://hutonggames.com/playmakerforum/index.php?topic=9673.0

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: Events not "cascading" or continuing -
« Reply #2 on: August 13, 2017, 10:59:38 PM »
Different actions work differently (slightly), sometimes. If you code, you can always open up the action and look at the code.  8)

In the case of smooth look at, I think its best to put it on its own state. When it is complete, use the finished event. Then on the next state, have the bool tests (using everyframe, as you have it).

Using the action sequence as you have it, can be a bit tricky. Really, its better to just use separate states.

TonCoder

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Events not "cascading" or continuing -
« Reply #3 on: August 13, 2017, 11:32:21 PM »
Good to know, thanks a lot!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Events not "cascading" or continuing -
« Reply #4 on: August 14, 2017, 01:20:56 AM »
Hi,

Just a little explanation on how sequence works :

when sequence is turned on :

The top action starts, but the next action will not start until the action above is finish
So like on this picture : http://imgur.com/JmqLy0l
The bool test action are not running because 'Smooth Look At' is not finished.

When Sequence is turned off :
all the action starts but they will start from top till bottom and when every frame is checked they will keep running.
They will not wait until the above action is finished.

i don't know what your return is doing on false event (is it returning to the same state?)
If so you can set the is false to null also and have this on a different fsm : http://imgur.com/poaoLpl
also turn off the sequence on this one http://imgur.com/JmqLy0l

You can find many tutorials on the user tutorial wiki page

These are two that i would recommend to watch :
- Global events and Global Transitions
- 5 Beginner Tips for Debugging