Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: heavygunner on October 07, 2018, 06:18:33 AM

Title: (SOLVED) Dashing Effect - Player Dash
Post by: heavygunner on October 07, 2018, 06:18:33 AM
Hi !

Let's say cube is moving on platform via Dotween move function.
When hit a key, cube should dash. It's should move 2 in X axis in x2 speed.

How to do it?
Title: Re: Dashing Effect
Post by: djaydino on October 07, 2018, 08:29:16 AM
Hi.
Probably have a state with a 2nd dotween move and trigger it when a key was hit.
if you have the move speed in a variable you can use a float operator and multiply by 2 then use the result variable on the 2nd dotween
Title: Re: Dashing Effect
Post by: heavygunner on October 10, 2018, 12:15:39 AM
Hi.
Probably have a state with a 2nd dotween move and trigger it when a key was hit.
if you have the move speed in a variable you can use a float operator and multiply by 2 then use the result variable on the 2nd dotween
Sorry for the delayed update.
I tried something and it went wrong.

Pls check here :  (59 Secs)
Title: Re: (Unsolved) Dashing Effect
Post by: heavygunner on October 10, 2018, 02:59:41 AM
Yay !

Finally did it with simple actions. I have no idea how I missed this. hours of struggle came to an end.

Here is how I did it (40 secs)  >> 8) 8)

Btw, I tried floate multiply / set float in state 2 to do that. I have no idea why it never worked. I would appericiate if someone pointed out the issue.

Anyway, It is working now. Can use SET TAG action to make enemy destroy  :)
Title: Re: (SOLVED) Dashing Effect - Player Dash
Post by: djaydino on October 10, 2018, 04:49:52 AM
Hi.
Looks good :)

But i would do the physics and controls in 2 different fsm's and use set fsm float to set the speed.

Especially if would be planning to add jump and maybe some other things later