On January 07 2013 20:07 Ahli wrote: Crates: I would create those like the unit and actor of the mineral and gas powerups in the campaign. Look into those as they should contain a mechanic that "activates" them when a unit is near. Detect this activation in triggers with "effect used" or "ability used" (depends how that thing works, I don't know it as I never looked at it) and then perform the random effects.
Vehicle-Building-Transition: Morph ability
Ahli is correct in that you'll need to do this in two parts; one in data and one in trigger. Copy a premade item and remove the effects. There is a specific trigger event of unit receives powerup. Then set a local integer to a random integer and put a switch after for each available options/outcome.; if you want it weighted just have the range of conditions ex local integer is in between 1-3. If the max integer was something like 10 thats a 30% probability.) |