# totem uprising.crpl
# Created on: 11/9/2014 5:35:56 PM
# ------------------------------------------
delay 3000
CreateMist(CellToPixel(currentCoords) -1 0 0 255)
"totem" CurrentCoords CreateUnit ->unitUID
ClearConversation
AddConversationMessage(1 "Huh. It looks like a totem just popped out of that pool of creeper.")
AddConversationMessage(0 "I didn't know totems were buoyant... weird.")
ShowConversation
PauseGame
The entire script activates on game start, and when I try to unpause it, it just repauses and restarts the script after one frame.
Do you want it to only run once? If so, you need to put everything within a once block.
Try:
# totem uprising.crpl
# Created on: 11/9/2014 5:35:56 PM
# ------------------------------------------
once
delay 3000
CreateMist(CellToPixel(currentCoords) -1 0 0 255)
"totem" CurrentCoords CreateUnit ->unitUID
ClearConversation
AddConversationMessage(1 "Huh. It looks like a totem just popped out of that pool of creeper.")
AddConversationMessage(0 "I didn't know totems were buoyant... weird.")
ShowConversation
PauseGame
endonce
If you need the delay for other things in the code, move the once down between the delay and the CreateMist command.
Remember that once blocks can be used anywhere you want code to only run once.
It should also be 3000 delay or delay(3000) instead of delay 3000.
Oh, right. Thanks!