# SporeTowerAC.crpl
# Created on: 11/20/2014 10:02:30 AM
# ------------------------------------------
GetCreeper CurrentCoords 0 lt if
CreateSpore 20 75 1 GetCreeper CurrentCoords
SetCreeper CurrentCoords 0
endif
Can't seem to figure what I did wrong with the script. Anyone know what I did wrong?
What do you want to do? if there's any AC in range the tower send a Spore?
Yes. It checks if the creeper level on it is less than 0, do it, else repeat until.
# SporeTowerAC.crpl
# Created on: 11/20/2014 10:02:30 AM
# ------------------------------------------
GetCreeper CurrentCoords 0 lt if
CreateSpore 20 75 1 GetCreeper CurrentCoords
SetCreeper CurrentCoords 0
endif
Ok 20 and 75 are the coordinates?
And SetCreeper why is 0?
To remove the AC on the cell so it doesn't use the AC again
ok try this
GetCreeper CurrentCoords 0 lt if
GetCreeper CurrentX ->XCord
GetCreeper CurrentY ->YCord
CreateSpore 20 75 <-XCord <-YCord 1 100
SetCreeper CurrentCoords 0
endif
I was trying and find something will work but the SetCreeper im not really sure how to use it efectively so here is it
CurrentCoords GetCreeper ->CreeperAmt
if(<-CreeperAmt 0 lt)
CurrentCoords RandCoords 1 100 CreateSpore
CurrentCoords 20 AddCreeper
endif
Arguments must be given BEFORE you call the function, so here's the fixed script from the OP:
# SporeTowerAC.crpl
# Created on: 11/20/2014 10:02:30 AM
# ------------------------------------------
CurrentCoords GetCreeper 0 lt if
#Added CurrentCoords because there weren't enough arguments
CurrentCoords 20 75 1 CurrentCoords GetCreeper CreateSpore
CurrentCoords 0 SetCreeper
endif