In the SC1 editor there was a "current player" function, for example...
"current player" moves unit "x" to location "z"
If unit "x" owned by "current player" enters location "z", move the unit to location "s" instantly
See, where the active player was set to only the current player, or in simpler terms, only the player who meets the conditions, not namly anyone specific, and not everyone.
How is this possible in SC2, I'd really REALLY love to know.
So I've heard, but I am unable to find it where I can use it.
Would you be so kind as to provide me a simple example so that I might assimilate this knowledge.
In SC1 you were periodically checking for conditions in Triggers which then could cause actions. Triggers belonged to players which were refereneced by "Current Player". You might not have been aware that the game created a version of the trigger for every owner when loading the map. Thus, SC1 had no really advanced concept behind "Current Player".
In SC2 you have events that start when basic things happen like an ability was used, a unit receiving damage, a unit enters a region, etc. Then you are able to filter them with conditions as the events itself are very generic.
When an event fires and starts a trigger, it sets some values which are all requestable via function calls: These functions usually start with "Triggering ". Usually, the event's description lists all of the values it sets. For example, a unit dealing damage knows the player that receives the damage (triggering player), the unit that receives the damage (triggering unit), the effect that deals the damage (triggering effect), the attacking player (damaging player), the unit that deals the damage (damaging unit) and the position from where it receives the damage (damage source position).
So, this is very close to what you have in mind when you ask about "Current Player" and it's pretty powerful as it gives you all information you might need to know about the event.
Visibility - Create a visibility revealer for player (Triggering player) within (Entire map)
did not work though. I still not sure how to use it.
Forgive me, I still think in terms of the old editor.
What's your event?
I assume it is Map Initialization (which is comparable with "always" condition without a "preserve trigger" action).
Then you need to loop over the existing players as the "Visibility - Create a visibility revealer" action uses a Player and not a Player Group.
The trigger for that would look like that:
Event: Map Initialization
Actions:
Pick each Player in (Active Players)
- Visibility - Create a visibility revealer for player (Picked player) within (Entire map)
DUDE! Thanks! You're like a magical gene, but alas, I have but one more question for you.
Could I get an explained example where "triggering player" would be used? What's the difference between using "triggering player" and Pick each "Player in (Active Players)" and how should they be used differently.
Triggering players is only used in reference to the event provided the event type is something that is actually caused by something the player actually did in game; anything "triggering" refers to information you can get from the event only and the event must be something that would provide that style of information. Picked player refers only to a loop, the picked player loop specifically, and only exsists for that specific loop; ie. once that loop is finished picked player is no longer relavent. Players btw are just integer number anyways.
If you are this new to triggering i would suggest looking at some if-then and loop tutorials on youtube.
As for examples... anything like button is clicked, unit enters region, player leaves games, etc are all things where one specific player is choosing to do these commands and where you typically want to do an action(s) specific to that player. Loops are used more for when you want to something similar to every player, no tjust one, or when you need to actually go through every player because the information isn't there. An example for pick each player would be something like finding out which players are users or computers; you don;t instantly have that information so you would have to loop throught all the players check if they are users or computers and then do actions according to which one they are.
Btw, no offense, but how on earth do you consider yourself an intermediate editor?
In the SC1 editor there was a "current player" function, for example...
"current player" moves unit "x" to location "z"
If unit "x" owned by "current player" enters location "z", move the unit to location "s" instantly
See, where the active player was set to only the current player, or in simpler terms, only the player who meets the conditions, not namly anyone specific, and not everyone.
How is this possible in SC2, I'd really REALLY love to know.
triggering player
Go play Antioch Chronicles Remastered!
Also, coming soon, Antioch Episode 3: Thoughts in Chaos!
Dont like mapster's ugly white? Try Mapster's Classic Skin!
@Alevice: Go
So I've heard, but I am unable to find it where I can use it.
Would you be so kind as to provide me a simple example so that I might assimilate this knowledge.
My humble thanks.
In SC1 you were periodically checking for conditions in Triggers which then could cause actions. Triggers belonged to players which were refereneced by "Current Player". You might not have been aware that the game created a version of the trigger for every owner when loading the map. Thus, SC1 had no really advanced concept behind "Current Player".
In SC2 you have events that start when basic things happen like an ability was used, a unit receiving damage, a unit enters a region, etc. Then you are able to filter them with conditions as the events itself are very generic.
When an event fires and starts a trigger, it sets some values which are all requestable via function calls: These functions usually start with "Triggering ". Usually, the event's description lists all of the values it sets. For example, a unit dealing damage knows the player that receives the damage (triggering player), the unit that receives the damage (triggering unit), the effect that deals the damage (triggering effect), the attacking player (damaging player), the unit that deals the damage (damaging unit) and the position from where it receives the damage (damage source position).
So, this is very close to what you have in mind when you ask about "Current Player" and it's pretty powerful as it gives you all information you might need to know about the event.
Your example:
An example with a player:
Check out my kitbashes! Custom Campaign Initiative: Lots of great Custom Campaigns!! Check out and Support!!
Visibility - Create a visibility revealer for player (Triggering player) within (Entire map)
did not work though. I still not sure how to use it.
Forgive me, I still think in terms of the old editor.
What's your event?
I assume it is Map Initialization (which is comparable with "always" condition without a "preserve trigger" action).
Then you need to loop over the existing players as the "Visibility - Create a visibility revealer" action uses a Player and not a Player Group.
The trigger for that would look like that:
Event: Map Initialization
Actions:
Pick each Player in (Active Players)
- Visibility - Create a visibility revealer for player (Picked player) within (Entire map)
@Ahli634: Go
DUDE! Thanks! You're like a magical gene, but alas, I have but one more question for you.
Could I get an explained example where "triggering player" would be used? What's the difference between using "triggering player" and Pick each "Player in (Active Players)" and how should they be used differently.
Thanks!
@Duke1623: Go
Triggering players is only used in reference to the event provided the event type is something that is actually caused by something the player actually did in game; anything "triggering" refers to information you can get from the event only and the event must be something that would provide that style of information. Picked player refers only to a loop, the picked player loop specifically, and only exsists for that specific loop; ie. once that loop is finished picked player is no longer relavent. Players btw are just integer number anyways.
If you are this new to triggering i would suggest looking at some if-then and loop tutorials on youtube.
As for examples... anything like button is clicked, unit enters region, player leaves games, etc are all things where one specific player is choosing to do these commands and where you typically want to do an action(s) specific to that player. Loops are used more for when you want to something similar to every player, no tjust one, or when you need to actually go through every player because the information isn't there. An example for pick each player would be something like finding out which players are users or computers; you don;t instantly have that information so you would have to loop throught all the players check if they are users or computers and then do actions according to which one they are.
Btw, no offense, but how on earth do you consider yourself an intermediate editor?
@hobbidude: Go
Thanks a TUN dude! Thanks a TUN everyone!