Blockland Forums > Modification Help
Recolor question 2
Tom:
Try making it just:
if(%obj.getClassName() $= "AIPlayer" && isObject(%obj.spawnBrick))
And if you haven't already, make sure AI players actually have a spawnBrick field.
lordician:
--- Quote from: Tom on August 05, 2010, 05:08:39 PM ---Try making it just:
if(%obj.getClassName() $= "AIPlayer" && isObject(%obj.spawnBrick))
And if you haven't already, make sure AI players actually have a spawnBrick field.
--- End quote ---
Bots spawned from a vehicle spawn should have that field. :C
Also, have tried that allready since i don't really need %brick anyhow. :C
But perhaps i have an idea...
lordician:
I have found the solution! :D
*partyemoticonhere*
It seems that when you spawn a vehicle or bot in this case, the spawnbrick field doesn't exist yet. :O
So basically, when it is added, it doesn't have anything else then it's datablock, but when you check after it is added (schedule a function) it has. :D
So, yeah, ask me about it, i guess i didn't explain very well now, i am in a WIN rush.
After all this time, i found the solution! :DD