• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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

Status
Not open for further replies.
Level 13
Joined
Oct 18, 2013
Messages
691
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
691
@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
691
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