Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

Hello Scruffy86! I think I might know where the problem is:

Line 11 that reads "$SpawnedTurrets=1" should instead be "SpawnedTurrets=1"

You only need to use the "$" before a variable name if it is part of an if statement, or if it is being used as a value in another statement, for example "if $global.maxHP >= 120" or "player setmaxhp $global.maxHP". When setting a variable (or when modifying it) you do NOT use the "$" symbol!

Also, you have two variables with the same name for some reason? One is a local variable called "SpawnedTurrets" and the other is a map variable called "map.SpawnedTurrets". This might not be a problem, but I would change one of those variables so that they aren't so similar. It will almost surely lead to confusion later!

Thank you so much! It worked, the terminal no longer works after I press it once, and I got rid of the map variable. I better understand it now, thanks. And now I have a cool pushable button panel mechanic that can open locked doors and spawn ambushes. This is going to create some really fun gameplay.