I think you can only run timers and intervals in a if(first())...
[highlight="e2"]
##### INITIAL #####
if (first() | duped()) {
print("(+++) 39BOT SYSTEMS ACTIVATED")
print("(+++) DESIGNED AND PROGRAMMED BY SIR. 39")
print("(+++) PLEASE ENJOY YOUR EXPERIENCE")
runOnTick(1)
E = entity():isWeldedTo()
Owner = Ewner()
E:setMass(5)
}
[/highlight]
Can only certain functions be performed in first() or duped()?
It seems to me quite inefficient to continually set runOnTick and define the other entities, and I would like to only do it once, when the chip is spawned or refreshed. However, some error here is making that impossible.
just put the runOnTick under the if(first()) statement.
Otherwise it will only runOnTick in the first time the e2 gets executed that means it only will be executed once...


LinkBack URL
About LinkBacks
wner()



Reply With Quote






Bookmarks