Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Onkelpoe on October 18, 2013, 03:32:43 AM
-
hi,
I tested a few things, one of it was to find out, how to do something like an IF-statement. But I did not get it right.
I compare 2 variables (float) and start an event, if a "greater than" case is true:
First, I read out ScreenHight and Width, subtract 15 from each and then check for Cursor-Position in non-normalized Screenspace.
After that, I compare them, if Cursor position is equal or greater than ScreenHight or Width -15, than event is send and another State is entered... nearly ;)
(I am getting an infinite loop)
What to do?
-
I think we need a screenshot of the FSM.
Usually, loops come from exiting a state per a condition, then the state you enter next immediately sends you back because of some condition there being met. So it means your conditions are not correct or are always met.
-
I deleted the FSM - but I guess, you´re right.
I tried to make a RTS pan, like moving to mouse to the edges/borders of the screen to make the playfield move.
The Event was triggered, when cursor reached near border of the screenspace.
So that Bool was true and state was switched. The condition for send event and switching to action was met, once the mouse was in the region...
-
Hi,
have you seen this tutorials ? they helped me a lot :
to avoid the Infinite Loop Warning just add a state with the Next Frame Event
concerning the If statement :http://www.hutonggames.com/tutorials_game_design_with_playmaker.php
and for the rts camera :
http://www.hutonggames.com/tutorials_camera_motion_and_control.php
hope it helps
-Yaniv