I need a script that adds 50 anticreeper to a random location, but requires and uses up anticreeper packets. If possible, it should also act as a shielding/emitting Idol, like in the Apex: Meso mission. The shielding range should at least be like the large Idol.
Quick question, you are using the latest version of CW3 right? I was helping another player with an older version and things can get messy.
Borrow from Meso, and copy the ammo request commands, making them the AC variants.
Then add this:
Self CONST_AMMOAC GetUnitAttribute ->ACAmmo
<-ACAmmo 50 gt if
RandCoords -50 AddCreeper
Self CONST_AMMOAC <-ACAmmo 50 sub SetUnitAttribute
endif
Make sense?
I think requires ACAMMO doesn't persist in saves , code needs :
:GameLoaded
Self Const_RequiresACAmmo True SetUnitAttribute
Perhaps it's easier to dump it in :awake.
But how do you even find the code in Meso?
http://knucklecracker.com/wiki/doku.php?id=crpl:examine_map_resources
You could try use forum search here in knucklecracker to find is your question answered already? :)