event help +rep for answers

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
hey i was planning on creating a module for the system i made that shows the stats of a selected unit, either via the player selecting a unit or ordering a unit to target another, but can i use an event with a triggering player and a triggering unit at the same time?

ie:
Trigger:
  • Trigger events in question:
    • Events
      • A player selects a unit
      • A unit is issued an order targetting a unit
    • Local Variables
      • Triggering_Player
    • Actions
      • Set Triggering_Player = Owner of Triggering Unit
      • Set Triggering_Player = triggering player
that way it would set it to the owner of the triggering unit if a triggering unit was was in the event, if not it would set the triggering player
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
In all cases I can think of where there is a triggering unit, the triggering player is automatically set to the owner of the triggering unit. So in this case, you should be able to just use triggering player directly.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
ill test it out tomorow, weekend coming up, gonna work on a set of modules for my system that will make it more usefull to programmers
 

MissKerrigan

Active Member
Reaction score
23
if you want an event 'triggering unit' and 'triggering player' you just need to make 2 conditions, sounds easy right? :)
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
thats just flat not true, sorry MK but a condition does not differentiate between the two and generally would stop the trigger from running unless it was in an or function and even then it wouldnt help do what i needed
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
Actually, I find it kind of stupid. I feel like Triggering Unit should return "No unit" if the event doesn't give a triggering unit. This way you could check if "(Triggering Unit) == (No Unit)" and in that case know what event was triggered.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top