Hey guys,
I have a script that displays a string for 15 ticks and then clears itself automatically. It allows hero movement while this is taking place.
Quote:
plotscript,test,begin
if (check tag (302)) then (
wait (15))
set tag (302,on)
play sound (35,false)
variable (lt)
testslice:= load slice collection (5)
lt := random (1,10)
if (lt >= 1 && lt <6>= 7 && lt <8>= 9 && lt <= 10) then (
$10 = "z"
)
set slice text (lookupslice (sli:testtext),10)
$10 = ""
wait (15)
free slice (testslice)
set tag (302,off)
end
if (check tag (302)) then (
wait (15))
set tag (302,on)
play sound (35,false)
variable (lt)
testslice:= load slice collection (5)
lt := random (1,10)
if (lt >= 1 && lt <6>= 7 && lt <8>= 9 && lt <= 10) then (
$10 = "z"
)
set slice text (lookupslice (sli:testtext),10)
$10 = ""
wait (15)
free slice (testslice)
set tag (302,off)
end
This works as intended, with the exception of one scenario. If I open up the main menu and then close it before running the string script, then the string will clear if the hero moves around rather than by the script itself.
It will clear by the script properly if you stand still for 15 ticks, but will prematurely clear if you move the hero before that time. Do you have any idea what might be causing this behavior? Here is the menu script, for reference:
Cornbread Chemist



