• Hey! Register here to create your account, engage with the community, and talk about what is new!

How to change a %default variable

BouncyBonBon

New member
Joined
Sep 26, 2022
Messages
11
Reaction score
0
I'm making a game using a killstreak variable where 'on playerKillPlayer setVar %default killsteak +1'
However I also have 'on playerRespawn setVar %default killstreak 0' in order to reset the person who died's killstreak back to 0. For some reason, this resetting affects all players' killstreaks, causing no killstreak to increase, how do I make the resetting only affect the player who died?
 

CheaterTim

Active member
Overlord
Joined
Mar 11, 2022
Messages
42
Reaction score
9
just from that description I don't see anything wrong...

these "%default variables" work by replacing the %default with the player name
lets say we have a variable called "%default killstreak", when the code gets executed that variable basically gets renamed to the player who triggered the event so "%default killstreak" for example becomes "CheaterTim killstreak"

if you misspelled %default this replacing will not happen and the same variable will basically be used for all players, which sounds like it might be whats happening, so make sure the spelling in the variable names is correct.

you can also try requesting ingame support with /support request
a helper will join your code area and help you find out what the problem is and fix it with you
 
Top Bottom