playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Join our
Discord Channel
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
follow a new target, while walking
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: follow a new target, while walking (Read 3085 times)
JeppeNygaard
Playmaker Newbie
Posts: 7
follow a new target, while walking
«
on:
June 29, 2012, 10:06:55 AM »
Dear all,
I'm new to the wonders of Playmaker so please excuse the following questions if it sounds a little newbie'ish
I have a pretty basic RTS setup where I'm looking down onto a map. When I click the map a character moves towards to point (vector) generated from where I clicked - the character moves using an iTween action with easeIn/easeOut - this all works perfectly - my problem is that I would like to be able to select a different target for my character WHILE the character is moving, thus breaking the iTween which is active and changing to a new one with this NEW target ... is this at all possible?? ... any help will be greatly appreciated!!
Thanks
Jeppe
Logged
yezzer
Playmaker Newbie
Posts: 24
Re: follow a new target, while walking
«
Reply #1 on:
June 30, 2012, 08:20:43 AM »
Not used iTween with Playmaker, but there's bound to be a iTween Stop action?
If you have Unity pro, you might want to look at using the navmesh, there's playmaker actions for that (separate download). That way you'll get proper pathfinding.
Logged
Freelance games & App developer using Unity3D, Flash & Adobe AIR for web, iOS, & Android. Interested in AR & other emerging tech.
@yezzer
Horror
Junior Playmaker
Posts: 79
Re: follow a new target, while walking
«
Reply #2 on:
June 30, 2012, 11:42:50 AM »
I'm only a playMaker noob myself, but could you add a Bool Test to the same state that you have your iTween action? Make it check if a new target has been selected every frame, and if it has, you can flow out of the current state and into another that will assign the new target.
You could also maintain a separate FSM outside of the FSM that you are using for your character. The extra FSM would check if a new target has been selected and then use a Send Event action to jump to a specified point in your character's FSM.
I found this tutorial helpful:
//www.youtube.com/watch?v=bHxgjTu5crk
«
Last Edit: June 30, 2012, 12:49:38 PM by Horror
»
Logged
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: follow a new target, while walking
«
Reply #3 on:
July 02, 2012, 02:25:13 AM »
hi,
For your purpose, I would use either the pathFinding system built in Unity pro or use a different set of actions.
try for example "movetowards", that will allow you to move the target and yet still follow it.
bye,
Jean
Logged
JeppeNygaard
Playmaker Newbie
Posts: 7
Re: follow a new target, while walking
«
Reply #4 on:
August 04, 2012, 08:03:26 PM »
Thank you for all your replies and thanks Jean for pointing me in the right direction. I've come a lot longer now using the pathfinding system - VERY helpful!
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
follow a new target, while walking