Playmaker Forum

Playmaker Help & Tips => iOS Help => Topic started by: elektro on March 23, 2011, 05:55:02 PM

Title: Touch Control for iOS
Post by: elektro on March 23, 2011, 05:55:02 PM
Will you implement specific iOS control scripts in a future playMaker release (if yes - when)?
Especially a touch control script (move the character to touch position + zoom camera to current character location) would be nice.
Title: Re: Touch Control for iOS
Post by: Alex Chouls on March 23, 2011, 06:44:37 PM
Yes we have iOS actions in the 1.1 update.

There are also iTween actions that are very powerful - great for moving characters/cameras around.

The scenario you describe will definitely be possible. In Playmaker you'd do this with a few states and events. For example:

Character FSM:

Idle: Random idle animations, waiting for a command. A MoveCommand event transitions to MoveToTarget.
MoveToTarget: Get target position from the event data and move towards it. A Finished event when the target is reached triggers a return to Idle.

Then you'd have a Controller FSM send the MoveCommand event on touching the world.

The cool thing about an FSM is it can start simple like this, but then you can quickly add states as needed to really flesh out the behavior (as opposed to a single script where all the logic is hidden and harder to change).

For example, lets say you want the character to acknowledge the MoveCommand - just add an Acknowledge state between Idle and MoveToTarget and have it play an animation/sound.
Title: Re: Touch Control for iOS
Post by: elektro on March 24, 2011, 03:39:58 AM
Thank you for your quick and detailed answer.
Sounds great!
Title: Re: Touch Control for iOS
Post by: Matt on March 26, 2011, 06:42:33 AM
When do you think 1.1 will be released? I'm itching to have a play with the iOS & iTween actions!
Title: Re: Touch Control for iOS
Post by: Kardend on March 26, 2011, 10:47:30 AM
yes yes!!! when do you think 1.1 will be ready? I just can't wait to start using it for my iPad game.
Title: Re: Touch Control for iOS
Post by: Alex Chouls on March 28, 2011, 02:12:04 PM
1.1 is in beta now. As long as there are no show-stopping bugs we should release this week... (working on more sample scenes now).
Title: Re: Touch Control for iOS
Post by: theBrandonWu on March 29, 2011, 06:11:40 PM
release this week?! You just made my day. ;)