Code Request

Started by TripleKings, June 14, 2016, 06:53:54 PM

Previous topic - Next topic

TripleKings

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.
When life gives you lemons, squeeze them in your enemies' eyes!

Sorrontis

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.
"If you want others to be happy, practice compassion. If you want to be happy, practice compassion."

GoodMorning

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?
A narrative is a lightly-marked path to another reality.

Builder17

I think requires ACAMMO doesn't persist in saves , code needs :

:GameLoaded
Self Const_RequiresACAmmo True SetUnitAttribute



GoodMorning

Perhaps it's easier to dump it in :awake.
A narrative is a lightly-marked path to another reality.

TripleKings

But how do you even find the code in Meso?
When life gives you lemons, squeeze them in your enemies' eyes!

Builder17

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?  :)