playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Sketch

Pages: [1]
1
PlayMaker Help / Prefab 2d velocity problem [SOLVED]
« on: June 08, 2021, 12:38:58 PM »
Hi guys,

I don't think this is a playmaker issue but it's my main tool, soooo...

I dragged my character who has several playmaker fsm's attached (movement, jump, run, etc) into the prefab folder. I guess this was a massive mistake or something, because now I have this weird issue where his speed is not being set correctly.
I have a run skill where you hit the direction key twice and he runs (using set velocity 2d). Now, the fsm is working, his animation changes for example, but he isn't speeding up at all. Is this a problem with him now being a prefab? I can't for the life of me work out why this would happen at all. Weirdly, all his other skills (which mostly use force and move rigidbody) all work perfectly. Does anyone have any ideas why isn't this one working?
I'm sure it's something stupidly simple in the prefab settings...
Thanks in advance

2
PlayMaker Help / Timer depleat on button hold [SOLVED]
« on: May 27, 2021, 04:08:47 PM »
Hello all!

Very new to both Unity and Playmaker. Surprised by just how much I've been able to pull of with literally no experience. Awesome!

Right now I'm trying to implement a kind of hover system in my 2d game. I'm sure it is very common but I can't seem to find advice for it.

The idea is that the player can hover when they hold the shift key. They can press and hold for more lift or tap it for short bursts. That's all working well already. The issue is that I don't want it to be infinite. I want the player to have about 2 seconds of 'fuel' that runs down as they have the key pressed down. After that they have to hit the ground and wait a while before they can go again.

I can't use wait because then it would be 2 seconds from take off regardless of button lift (and every key press would gain 2 seconds...) , I also need the key down on a loop so it can retrigger if they tap before the fuel is spent. The actual hover works perfectly, its just the running out of fuel bit I can't crack.

I've tried using set time with various times (delta, etc) and using variables, it almost works but not quite. The fuel does run out when the timer hits 2, but I have a problem that it only counts as soon as the button is pressed (I think it's time between frames, not real time) so the player can just fly infinity if they hold the key down.

Would anyone have a solution to this? I'm sure it's an easy one as I've seen it done many times before. By the way, I'm using standard unity controls and physics - really just trying to learn the program.

Pages: [1]