• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

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

Status
Not open for further replies.
Level 14
Joined
Oct 18, 2013
Messages
743
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:
 
@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.
 
The base spell power is one :o 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.
Back
Top