sjakie
Cookie Be Awesome!
- Reaction score
- 127
Code:
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Mineral Expert
Actions
Set Mineralpos = (Position of (Triggering unit))
Set Owningroup = (Player group((Owner of (Triggering unit))))
Set Randominteger = (Random integer number between 1 and 5)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Randominteger Less than or equal to 4
Then - Actions
Game - Display to Owningroup the text: You found some salt!
Item - Create Salt at Mineralpos
Custom script: call DestroyGroup (udg_Owningroup)
Custom script: call RemoveLocation (udg_Mineralpos)
Else - Actions
Game - Display to Owningroup the text: You found a preciou...
Item - Create Diamond at Mineralpos
Custom script: call DestroyGroup (udg_Owningroup)
Custom script: call RemoveLocation (udg_Mineralpos)
I'm trying to get the hang of how to remove leaks, but I just cant seem to get this working. It keeps giving an error message that I'm doing something wrong. What is it?