• 🏆 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] Reference Using Player of Goblin Lab's Reveal.

Status
Not open for further replies.
After discussion and research it was found, at least among us that this effect isn't really possible in any straightforward means. However; this map, generously provided by: BloodSoul achieves the effect in a round about way. While it doesn't narrow down which unit purchased the service it will return the purchasing player. (This is done through a handful of gold detection triggers in a specific order of operation)
 

Attachments

  • Reveal.w3x
    20.9 KB · Views: 16
Level 7
Joined
May 14, 2019
Messages
255
Hello, I have been dealing with a very similar problem, and fortunately (thanks to @-Phoenix- for some leads) have found a way to detect the player using the ability.


Create triggers such as these for all your players

  • P1
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Marketplace
    • Actions
      • Set P = Player 1 (Red)
  • P2
    • Events
      • Player - Player 2 (Blue) Selects a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Marketplace
    • Actions
      • Set P = Player 2 (Blue)
  • P3
    • Events
      • Player - Player 3 (Teal) Selects a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Marketplace
    • Actions
      • Set P = Player 3 (Teal)
The trigger fires when a unit is selected, then the condition makes sure that it was the specific neutral unit you want to detect the usage of

The variable "P" in this case stores the player which uses the marketplace, goblin laboratory, or other neutral structure
 

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,887
Hello, I have been dealing with a very similar problem, and fortunately (thanks to @-Phoenix- for some leads) have found a way to detect the player using the ability.


Create triggers such as these for all your players

  • P1
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Marketplace
    • Actions
      • Set P = Player 1 (Red)
  • P2
    • Events
      • Player - Player 2 (Blue) Selects a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Marketplace
    • Actions
      • Set P = Player 2 (Blue)
  • P3
    • Events
      • Player - Player 3 (Teal) Selects a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Marketplace
    • Actions
      • Set P = Player 3 (Teal)
The trigger fires when a unit is selected, then the condition makes sure that it was the specific neutral unit you want to detect the usage of

The variable "P" in this case stores the player which uses the marketplace, goblin laboratory, or other neutral structure
Why would you do this when you could just do this:

  • Detect something
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
      • Player - Player 6 (Orange) Selects a unit
      • Player - Player 7 (Green) Selects a unit
      • Player - Player 8 (Pink) Selects a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Marketplace
    • Actions
      • Set p = (Triggering player)
 
Level 7
Joined
May 14, 2019
Messages
255
Im no master at the editor, if I had known it would work I would've done it, there's always room for improvements, thanks for pointing this out
 
Status
Not open for further replies.
Top