HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Gold spell trigger

09-13-2004, 01:36 AM#1
iron_warrior
OK, i want my hero to use gold to cast a spell. I can get it so he loses gold when he casts a spell, but cant stop him casting it when he doesnt have enough gold.
whats the condition to see if he doesnt have enough gold and what trigger can i use to stop him?

Thanks
09-13-2004, 02:15 AM#2
Rafael Br
To stop him from casting, use this trigger:
Events - A Unit is issued an order(Depends of your spell if it is the no target, unit target or point target event)
Conditions
(Issued order) Equal to (Order(your order))
((Owner of (Ordered unit)) Current gold) Less than (your spell gold cost
Actions
Unit - Order (Ordered unit) to Stop

Add an error message after this, use Game - Text Message or use one of those custom functions that simulates an error message.
09-14-2004, 01:30 AM#3
iron_warrior
Thanks, it worked quite well.