I have a speed problem

Hi everyone, so i was trying to make a fast speed spawn for like 5s or so on and there was a problem, i wanted when a player dies and respawns that he receives a small message saying welcome back!, and keep in mind i want when the player dies not when a player starts the game and spawns like normally and didnt even die , and thats how i did it and i know that is not the right way ig?


Conditions:
Player has spawned
Is in spawnpoint
Player died


Actions:
Wait: 10s ( 10s is the spawn time )
Small message : welcome back!
set move speed 185
Wait: 2s
Set move speed 175
Wait : 1.750
Set move speed 165
Wait : 1.500

(and so on until it reaches speed of 120)

And the second problem is, when i leave the spawn point and come back to it again i always get the speed again and idk how to fix it and remove that, and when i swap the hero i get the speed and i want it to be fixed too and for a shortcut for everything

( How can i fix the problem if a player swapped to a hero and got fast speed again, and how can i fix if a player
Re-entered the spawnpoint and he gets the speed )

i tried everything and searched for that and even at reddit but the people who had the problem weren’t the same problem as mine can someone help? and thanks <3

What about this:

rule1:
ongoing each player

action:
- event player.A = false
rule2:
ongoing each player

condition:
- is alive(event player) == true

action:
- if(not(event player.A))
- event player.A = true
- abort
- end
(all the other actions you did:)
Small message : welcome back!
set move speed 185
Wait: 2s
Set move speed 175
Wait : 1.750
Set move speed 165
Wait : 1.500

Hey Shanalotte thanks for the help! It actually worked with me but i faced a small problem, i thought i can deal with it like before and it was working for me before but now its not working anymore, so the problem is what happens if mercy revived you?
You actually receive the welcome back message and the same fast speed is there a chance to remove that? I’ll tell you exactly what i’ve done

Conditons

Player has spawned : True
Is in spawn rooms : False

Actions

Set move speed: 120
Disable messages


< i did is in spawn rooms false because mercy cant rez a dead player inside the spawn so i thought it may work and make sence >

And it didnt work with me as well :l
Any solution? It would be insane if that works i’m about to finish my workshop!

You could modify my rule2 as follows:

rule2:
ongoing each player

condition:
- is alive(event player) == true

action:
- if(not(event player.A))
- event player.A = true
- abort
- end
- if(is in spawn room(event player))
Small message : welcome back!
set move speed 185
Wait: 2s
Set move speed 175
Wait : 1.750
Set move speed 165
Wait : 1.500
- end

Notice the new if - end block wich prevents the actions from getting executed if the player is not in the spawn room.

The reason why your rule didnt work is the first condition. Has Spawned(Event Player) triggers exactly once per game, wich is when the player spawns for the very first time. After that this condition never triggers again. Instead to check wether a player has respawned, you should always use the condition Is Alive(Event Player).

I tried this, and while this should work in theory, the player is not inside the spawn room the moment he is flagged as “IsAlive”. He is still at his death location and gets teleported afterwards.
You need to put in 0.1s delay before checking.
Here is my working version of the code. Not 100% yours, but should get you the idea…

rule("GreetingMessage")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Is Alive(Event Player) == True;
	}

	actions
	{
		Wait(0.100, Ignore Condition);
		If(Is In Spawn Room(Event Player));
			Big Message(All Players(All Teams), Custom String("Welcome Back"));
			Set Move Speed(Event Player, 185);
			Wait(2, Ignore Condition);
			Set Move Speed(Event Player, 100);
		End;
	}
}
1 Like

Adding wait actions really is a good fix for a lot of bugs.

1 Like