HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Steal Gold Ability via triggers

02-01-2003, 09:08 PM#1
Hakujin
I have a thief type character in my map and I wanted to give him a steal ability. I have attempted to use triggers to make this happen but not much has worked yet. Here is what I have:

STEAL EFFECT
[Event]
A unit owned by Player 1 is attacked
''
A Unit owned by Player 12 is Attacked

[Conditions]
Unit-type of attacking unit is Equal to Thief
Owner of Attacked unit current gold greater than 0

[Action]
Player - set current gold(Owner of attacked unit) = (owner of attacked unit)current gold - (StealLevel (variable array)[Owner of Attacking Unit) x -10)
Player - Add ((StealLevel (variable array)[PlayerOwner of Attacking Unit) x 10) to (Owner of Attacking unit) gold.


STEAL LEVEL
[Event]
Unit owned by Player 1 learns a skill
''
Unit owned by Player 12 learns a skill

[Condition]
(Learned Hero Skill) is equal to Unholy Aura...

[size=huge]DAMN[/size] I changed my mind when editing the AbilityData.slk and based it off a nerfed "Vampiric Aura." However I forgot to update the trigger. I just changed the trigger and this baby works now. Stupid me.:bgrun:

BUT

Now it is a passive ability. How can I use an active skill (like firebolt) to do this?
02-01-2003, 10:27 PM#2
Guest
Using a non-passive ability to deduct gold is quite a bit harder. The first problem is that t=when it detects that you used a target ability, you could be twenty screens away from the unit and the trigger would still execute.

Right now, I am thinking you could somehow pop the pillage data fields into a target spell like firebolt, and pray it works. I am not too sure. The hard way to do this is with complicated triggers, that check after an ability is used, if the targeted unit takes damage withen a few seconds of using the ability,b ut that will be pretty buggy. Im not too sure.