How do I make a ability?(SOLVED)

I want to make an ability that boosts attack speed and movement speed for a short amount of time and is able to be used again after a few seconds. How would I be able to do this?

4 Likes

You could have it so when the ability is triggered, by action or consumable, it will send a message to the players speed and attack speed. Which could set a higher number into the already existing number that is for movement or attack speed. Then add a timer for after a few seconds or whatever short time you wanted it could reset the number back to what it originally was.

Like lets say your player speed is 3. You could have a message that sends the number 4 or 5 into the set input of the 3 so that way your speed is increased. Then after five seconds, it could send another number (3) back into the set input to change it back to it’s original speed. I’ve used a similar system for a stamina running bar, to allow sprinting.

I’m not sure on attack speed though, since idk if its animation based, or the player emits something that’s harmful towards enemies, but you could increase emit speed or maybe make a seperate animation that’s slightly faster.

2 Likes

For the attack, you can send the enemy a message when you hit them telling it to take more damage (You can send a message to the last contacted object and have a small proximity around your player if you have multiple enemies). I would need to know the style of your combat to give more specifics.

2 Likes

Flowlab Game Creator - Transformation Here is a link I want it to be more like an ability the can be used infinitely but has a certain time it can be active and then has a cooldown to be used again. How would I do that?

2 Likes

This is basically what ManiacPumkin said

This is how you would increase movement speed

1 Like

Sweet but do you know how to do faster shooting?

1 Like

yeah, just need to look at the code first, I was replying to someone else before.

1 Like

That’s how I would do it. If you need any more help feel free to ask, always happy to help. :llama:

1 Like

Thank you so much everything works and don’t worry I will credit you.

2 Likes

Okay, I’m probably just dome but for some reason, the shooting boost will not even shoot could you help me?

2 Likes

sure let me look at the code real fast

1 Like

The first switch needs to go to the On input on the second switch. Also, I messed something up before, the first switch should go into the timer, not the second switch (before it would keep the upgrade on until you click, now it lasts the normal time).

2 Likes

How would I do that.

The output of the first Switch needs to go into the input of the second Switch

[---------]````````[---------]
[output ]o—>o[ input ]
[---------]’’’’’’’’’’’’’[---------]

Ignore this → ’

1 Like

I still cant get it to work.

does that help? If not I’ll make it more clear

Got it working really appreciate the help.

1 Like

np, if you get stuck on anything else just @ me and I’m usually able to respond pretty fast.

1 Like

@CodeAlpaca there is one problem the boost has no cooldown for the shooting and you can use it instantly how can I fix this?

The Switch the Space Bar in the goes into needs to turn itself off, I’ll show how to fix the firing instantly in a sec.

1 Like