• 🏆 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!

[General] Is there a better way to do this?

Status
Not open for further replies.
Level 13
Joined
Oct 18, 2013
Messages
694
In my map, I am creating a "Spell Power" system. What I mean is that certain items increase how much damage your abilities inflict. The map is multiplayer. Each player will only control one hero. Dealing with just the items aspect of this system, when a hero uses an item the map needs to know which player used the item, so I used this trigger for each player in the game:

If ((Owner of TempUnit[1]) Equal to Player 1 (Red)) then do (Set SpellPower[1] = 3.00) else do (Do nothing)

Do I need to do this for each player in the game? Is there a shorter way around this? Many thanks! :grin:
 
Level 13
Joined
Oct 18, 2013
Messages
694
@icemanbo: good call, xD
@chaosy : how would I do it so that I can do that and have it still work for just the player whose hero used the item? I definitely don't want it so that when one hero uses the item all heroes get the bonus.
 
Level 13
Joined
Oct 18, 2013
Messages
694
The base spell power is one :eek: Well anyways, I think I will go with IceManbo's method, looks pretty straightforward and simple. Thanks to both of you for your help!
 
Status
Not open for further replies.
Top