playMaker

Author Topic: Problem with FINISHED events [SOLVED]  (Read 1395 times)

thierry_st_malo

  • Junior Playmaker
  • **
  • Posts: 58
Problem with FINISHED events [SOLVED]
« on: October 30, 2016, 03:42:49 AM »
Hi, all!
Sorry for this very basic question.
A very simple FSM: The first (MovingTo) with two actions: Mouse Pick and Set Position, to move the blue "Tank" with the mouse. The second (Aiming) to aim the gun at the red capsule.
The FSM diagram shows how this should work. But:
1 - No FINISHED event is generated automatically. I have to use Send Event for both states.
2 - Depending on the Every Frame boxes that are checked, the tank gets stuck,  pointing its gun or not at the capsule.
3 - If there is no FINISHED transition in the Aiming state, control goes here once and stays put.

Can you help? Thanks in advance,
Thierry
« Last Edit: October 30, 2016, 11:14:53 AM by Alex Chouls »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Problem with FINISHED events
« Reply #1 on: October 30, 2016, 07:33:42 AM »
Hi,
When an action has every frame checked it will do this action every frame and will not finish.

But for example "smooth look at" will rotate "look" to an object or position, rotating toward it in a certain speed and can send a event when the position reached its destination.

if you want to do both, keep moving and looking you can set both actions in one state and set every frame

or you can make 2 fsms, one for "look at" and the other for moving which will give you more flexibility to do other stuff with it (animating a recoil effect for example)

thierry_st_malo

  • Junior Playmaker
  • **
  • Posts: 58
Re: Problem with FINISHED events
« Reply #2 on: October 30, 2016, 08:48:50 AM »
Got it ! Thanks a lot,

Thierry