• 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.

Tracking Players

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
Hey there :D
I'm doing a Page System for my shop which activates from a Spellbook Ability
So, whenever a unit goes to the second page (clicks on the spellbook), all icons there are ABILITIES instead of ITEMS
I want to give items correctly to the player that ACTIVATES the ability from the Merchant Shop
I can't use Owner of (Triggering unit) because that will refer to THAT shop, not the buying unit
So, I want any script/action that detects which player activates the ability from that shop
I based it on Roar ability
Unit A presses Roar ability = Gains Blades of Attack
 
Level 11
Joined
May 31, 2008
Messages
698
The one i said, where you have the main shop and then theres hidden shops outside the camera bounds, one for each player.
But, maybe a better way would be to move the players own shop to the location of the actual shop.
Then it would show the selection circle around the shop still.
you could do SetUnitScale to make the shop owned by the player smaller.
and SetUnitVertexColor to make it transparent so nobody can see it.
So when any player selects the shop, just trigger them to select their own shop and make their shop move to the location of the one they by turning off their shops collision and do SeUnitX and SetUnitY instead of just moving it with locations
If you have a problem with players selecting each others shops instead of the one they actually see, then you can just trigger them to select the correct one
Hope this helps, if i sound too confusing i can try to explain it better xD
 
Status
Not open for further replies.
Top