• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] gold=attack

Status
Not open for further replies.
Level 12
Joined
Aug 10, 2004
Messages
1,141
Yeah... I was about to say that...

You can make an autocast spell like slow...
-When spell is casted
--Damage target unit (player resource)

If you want to make sure that people can only attack when they have gold
-When spell is casted
--Remove 1 gold
--If-Gold = zero
---then-Remove ability from unit

If- A player gets gold
ANd-Unit doesn't have ability (can be unit group or Variable detected)
-Give ability to players hero
 
Set the damage done of hero damage to 0, then set that every 1 gold = 1 str on a str based hero. Put the die damage things so that its STR-STR dmg. Then put a trigger, similiar to this..
  • Events
  • Unit - A unit is attacked
  • Conditions
  • Unit Type - Unit Type of (attacking unit) equals to (Hero X)
  • Actions
  • Unit - Make (Attacking unit) deal ((Owner of (Triggering Unit)) Gold) to (Triggering Unit)
not too hard.
 
Level 12
Joined
Aug 10, 2004
Messages
1,141
Set the damage done of hero damage to 0, then set that every 1 gold = 1 str on a str based hero. Put the die damage things so that its STR-STR dmg. Then put a trigger, similiar to this..
  • Events
  • Unit - A unit is attacked
  • Conditions
  • Unit Type - Unit Type of (attacking unit) equals to (Hero X)
  • Actions
  • Unit - Make (Attacking unit) deal ((Owner of (Triggering Unit)) Gold) to (Triggering Unit)
not too hard.
Good call :D
Didn't even think of that.......
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,232
A unit is attacked is buggy.

If the owner of the unit presses stop constantly, it registers more than the number of times the attack damage is done, thus it could be abused to get a lot of money and ruin the map.
Thus you would ultimatly need an attack damage detection system which is a lot more complex but a lot more accurate. But this is the ammount of damage inflicted in the target after reductions and so not the unit's actual attack.
 
Level 17
Joined
Apr 13, 2008
Messages
1,598
I believe you can make this 100% equally, Doctor Super Good.
Create 3 abilities, each with 10 levels.
The abilities are based on the +x damage item ability.

1 ability adds 1 dam per level (0-9)
1 ability adds 10 dam per level (10-90)
and so on.
When your gold changes you adjust the ability.

Giving str is not too wise since it adds hp and hp regen as well, same with agi and int.
 
Status
Not open for further replies.
Top