I noticed an error in the code. It should be:
Code:
shrink_duration local.player local.time:
while ((local.player.shrink == 1) && (local.time > 0) && (local.player))
{
wait 1
local.time--
}
if ((local.player.shrink == 1) && (local.player))
{
local.player.shrink = 0
local.player scale 1 // removed the '=' sign
}
end
If you want to change the time, find in the code where I've put the number of seconds in a minute to wait. Change that to however many seconds you want.
If they aren't resetting on death add:
Code:
check_alive local.player:
while ((isAlive local.player) && (local.player.shrink == 1))
wait .5
if ((local.player) && (local.player.shrink == 1))
{
local.player.shrink = 0
local.player scale 1
}
end
If you're finding it difficult searching the code for values, you can also add global variables at the top of your script e.g.:
Code:
level.shrinkDuration = 60
level.shrinkScale = 0.5
level.resetScale = 1
And have:
Code:
shrink_player local.player:
local.player.shrink = 1
local.player scale level.shrinkScale
thread check_alive local.player
thread shrink_duration local.player level.shrinkDuration // these could be merged
end
check_alive local.player:
while ((isAlive local.player) && (local.player.shrink == 1))
wait .5
if ((local.player) && (local.player.shrink == 1))
{
local.player.shrink = 0
local.player scale level.resetScale
}
end
shrink_duration local.player local.time:
while ((local.player.shrink == 1) && (local.time > 0) && (local.player))
{
wait 1
local.time--
}
if ((local.player.shrink == 1) && (local.player))
{
local.player.shrink = 0
local.player scale level.resetScale
}
end
Then you just need to tweak values at the top of your script how you like.