Tutorial Actions: Trigger, Visibility, Selection

I

IKilledKEnny

Guest
Actions: Trigger, Visibility, Selection.
~By IKilledKEnny~

Q&A

Q: What is this tutorial about?
A: In this tutorial I will try to explain few action sections that are simply too minor to make a tutorial about each one separately. In this tutorial I’ll explain Trigger, Visibility and Selection sections.

Q: I see, do you have any plans to update this tutorial often?
A: No, I don’t have special plan to do that. However, I might add few other sections in the future, if I’ll find them important enough and if I’ll be able to explain them properly. In any case if I will update this tutorial I will add a comment saying that.

Q: Aha, now, why would I want to read this tutorial?
A: If you don’t know how to use one of those sections, or you think you don’t know enough about them, this tutorial might help you.

Q: should I know anything before proceeding?
A: I do expect you know basic triggering, yes, you might have hard time understand this tutorial if you are very new to triggering.

Q: What do you use so many images and not simply triggers?!
A: I believe it would make the reading process easier. If you find many pictures disturbing please do say so. If many people would get that impression I will delete all images and replace them with copied as text triggers.

Q: Anything else?
A: Yeah, just note that English is second language to me, however I use dictionary and
‘Word’ so it should be ok. Also, I appreciate any comments or suggestion, positive or negative. :)

Part 1: Selection (Section)

General description

ActionTutPic1.jpg

  • Clear Selection for Player - Clears selection for a Player, which means a player will no longer have selected units.

  • Select Unit Group For Player - Selects a Unit Group for a Player, which means it will pick few units and will select them for a player. Note: It will first clear the player’s selection, thus the units will not be added to his current selected unit / unit group, but will replace them.

  • Select Unit For Player - Selects 1 Unit for a Player, which means the action will take a unit and force a player to select it. Note: It will first clear the player’s selection, thus the unit will not be added to his current selected unit / unit group, but will replace them.

  • Add Unit To Selection For Player - Selects a Unit to a Player in addition to his selected unit/s. Note: A player may have no more then 12 units selected by him at one time.

  • Remove Unit From Selection For Player - Deselects a Unit to a Player, leaving the rest of his selected units selected by him.

  • Clear Selection - Deselcects all units to all players

  • Select Unit Group - Selects a certain Unit Group for all players. Note: It will first clear the players’ selection, thus the units will not be added to his current selected unit / unit group, but will replace them.

  • Select Unit - Select a Unit to all players. Note: It will first clear the players’ selection, thus the unit will not be added to his current selected unit / unit group, but will replace them.

  • Add Unit - Adds a Unit to all players’ selection in addition to their selected units. Note: A player may have no more then 12 units selected by him at one time.

  • Remove Unit - Deselects a Unit from all players.

Useful Notes

Under Unit Groups you can find - Units Selected - It picks all Unit Selected by a Player.

ActionTutPic2.jpg


When we use selection event ( Events > Player > Selection Event ) The triggering players is the selecting player and the triggering unit is the selected unit.

ActionTutPic3.jpg


Examples

Lets check out few Trigger possibilities:

ActionTutPic4.jpg


Let’s see what happened here. The event is player red selects a unit. (Note: Player Red is specific player while the unit is generic, no way to change that). After the event is met we move on to the condition if the triggering (selected) unit is Footman 0000 (changeable, of course) we’ll move on to the actions. The action is remove triggering unit from trigger player’s selection. So the result of the trigger would be that when player red picks Footman 0000 it will be deselected, thus player red can’t select Footman 0000 in any way!

Note: For all who knows what locust it, please allow me to explain the difference between giving locust to a unit and using this Trigger.
  • When selecting the unit, it won’t be immediately deselected, but you would still select if for about 0.2 seconds, thus you could still see it’s image, stats and such, even if it is for limited time.
  • You can still attack it / cast spells on it and such.
  • Lastly, if you hover it with your mouse you could still who owns it and it’s health stats.

Let’s move on to the next example:

ActionTutPic5.jpg


This is the exact same trigger as the previous one with one big change in the condition. As you see the last condition was: The Triggering unit is Footman 0000, however here the condition is: Owner of Triggering unit is an Enemy of Triggering player. What will that do? Simply, when player 1 selects a unit and it is a foe, the unit will be deselected!
Let’s check another example.

ActionTutPic6-1.jpg


Assuming this Trigger will work (In a second I will explain why it won’t work) what will happen is when a player red will type “Look At Me!” we’ll pick his allies and we will select for them player red’s selected units. What is the problem you ask? Well it’s simple a player can’t have more then one unit selected that is owned by other player. How we fix it? We add those lines:

ActionTutPic7.jpg


Those lines will make all player red’s ally have control over his units and the other way around. And say you want after 5 second to disable that? No problem we add the 2 selected lines and it should work:

ActionTutPic8.jpg


Note: If you make this trigger so several players can do it (thus it will work also if player blue types the massage) you must use locals in order to make it efficient, however this tutorial is not about it, so I will not post the solution, however just keep that in mind.

Now let’s check one last example

ActionTutPic19.jpg


When player red deselects a unit, and that unit was owned by him, we’ll kill that unit when we use that trigger. Note: If you have this trigger enabled and the first example’s trigger enabled whenever you would select Footman 0000 he would die as you would deselect him immediately.

Well I think you got the big picture, let’s move on to talk about visibility.

Part 2: Visibility

Understanding Visibility

When we are talking about visibility we will use 3 visibility states:

  • Visibility / visible / viewable - A viewable point.
  • Black Mask - Undiscovered point, no possible view on it.
  • Fog of War - Discovered point that was left, allows you to see last known stats in it. (doodads, units, buildings, terrain and such).

It is important that you under stand these definitions so you would understand the rest of this chapter.

General Description

ActionTutPic9.jpg


  • Enable Fog Of War - If Fog of War was disabled, it will re-enable it, and will order the game to use it regularly.

  • Disable Fog Of War - Disables Fog of War, transfers the visibility stat in all points that have Fog of War to visible stat.
  • Enable Black Mask - If Black Mask was disable it will order the game to now use it regularly.
  • Disable Black Mask - Disables Black Mask, transfers the visibility stat in all points that have Black Mask to Fog of War stat.
  • Create Visibility Modifier Region - Enables / Disables Visibility Stat
    in a Region for a Player.
  • Create Visibility Modifier Circle - Enables / Disables Visibility Stat for a Player in a Point with a Radius (Real).
  • Enable Visibility Modifier - Enables Visbility Stat (Variable).
  • Disables Visibility Modifier - Disables Visibility Stat (Variable).
  • Destroys Visibility Modifier - Destroys Visibility Stat (Variable).

Useful Notes

There is a Visibility Modifier variable!

ActionTutPic10.jpg


The First 4 actions refer to all players.

ActionTutPic11.jpg


S = Area Sircle, R = Radius, Pi ~=~ 3.14

ActionTutPic12.jpg


The image was taken from wikipedia from the following Link.

You control what units player will have view on, it is under unit actions.

ActionTutPic15.jpg


You Grant / Deny a view on Unit by Player

You can also make the one player would see the other player’s units easily by setting an ally aspect (Actions > Player > Set Alliance Aspect)

ActionTutPic22-1.jpg


When using visibility actions the order is critical and I will show it in the example section.

Test

I tried seeing what happened when I disable viewable visibility stat. I used this Trigger:

ActionTutPic14.jpg


What was the result? What I expected, all the points that didn’t have units owned by me near them became with fog of war visibility stat. Conclusion? You can’t map invisible by player when he has units on map, at least not using this way.

Examples

Let’s go on few examples, just to make sure we got this right.

ActionTutPic16.jpg


Here we disable black mask and then we disable fog of war. What would this do? Make the whole map visible. Exactly like this trigger would do:

ActionTutPic17.jpg


But obviously the first trigger is much easier to do. Note, the following Trigger will not work, that’s why I said order was critical.
ActionTutPic18.jpg


Why you ask? Well let’s have a look at this. First we disable fog of war, no problem, that’s fine, after that though we disable black mask, which creates more fog of war, thus still part of the map is hidden, while in the first trigger we first disable black mask, creating fog of war and then we remove all fog of war. Here is a chart that might help you understand:

Code:
First Trigger:
        1. Some viewable, some fog of war, some black mask.
==>        2. Some viewable, some fog of war, black mask was removed and we got fog of war instead.
==>        3. All viewable, fog of war was and removed and we got instead of it viewable.
Second Trigger:
        1. Some viewable, some fog of war, some black mask.
==>        2. Some viewable, some black mask, fog of war was removed.
==>        3. Some viewable, some fog of war, black mask was removed and we got fog of war instead.

ActionTutPic20.jpg


Here player red selects Eye of Sight 0002 he will be able to see the whole map

ActionTutPic21.jpg


Here when the player deselects it he will again see thing regularly.

Let’s check our final example:

ActionTutPic23.jpg

When player red types “View Me” all his allies would be able to have view on his units. However when adding this Trigger:

ActionTutPic24.jpg


When player red types “Unview me” his allies won’t be able to see him any more.

No let’s move to the final part (finally, huh? :p) Triggers!

Part 3: Trigger

General Description

ActionTutPic25.jpg


  • Turn Off - Turns of a Trigger, a trigger that was turned on will ignore it’s events and will not run until you turn it on. Note: Unmarking initially on would turn off a trigger at the start of the game.

  • Turn On - Turns on a Trigger, if the Trigger was turned off it would be now turned on, the trigger will no longer ignore it’s events and will run once the events are met. Note: Marking (‘V’ing) initially on would turn on a trigger at the start of the game.

  • Run (Checking Conditions) - This action will run a Trigger immediately while considering on it’s conditions.

  • Run (Ignoring Conditions) - This action will immediately run a Trigger and will ignore all conditions found in it.

    ActionTutPic26.jpg


    The triggers in the black box I will not explain. The reason is that to be honest I don’t know how to use them 100%. I do know about how to use them, but I’m learning alright, and I hope I could post soon enough what they do. Also, note that I have never seen a trigger that uses queue, and it’s very rarely used, thus it is not that important. Anyone that wishes to send me private massage explaining this will get credit and +reputation. Moving on.
  • Add New Event - Adds to a Trigger n new Event . If the event is met the trigger will run normally.

    Useful notes

    There is a trigger variable!

    ActionTutPic27.jpg


    When using Add New Event you may use variables ( very helpful read examples)

    Examples

    ActionTutPic28-1.jpg


    Here we add to a trigger that you will see in a second the event: Picked player types My Units Suck. Now notice that the picked player is inside a loop, thus, in one loop we managed to put 12 events (player 1 types my units suck, player 2 types my units suck and so on). Now Trigger Example 1 Continue remembers those events, so instead of creating it 12 different events and each time changing the player, we add the events from a different trigger and saved a lot of boring work!

    ActionTutPic29.jpg


    Now, whenever a player types “My Units Suck” we will kill his units!

    ActionTutPic30.jpg


    What happens here? Once a unit enters the region we will declare that the owner of unit is the winner and then we will turn off the Trigger, thus making him be able to run only once. If we didn’t know turn off action we could have dome something that takes more space and is just useless.

    ActionTutPic31.jpg


    Not a lot harder, but on harder stuff this could mean a lot, the difference between this Trigger and the previous one.

    _____________________________________________________________________________________________
    And that’s it for now! I hope you enjoyed reading this tutorial, I know it long. :)
    Again I would highly appreciate any suggestion or negative / positive comment. And if anyone knows something about Trigger Queue please do send me a Private Massage.

    ~IKilledKEnny~

    P.S. I have read this tutorial 3 times and didn’t find any mistake, however if you do find one please let me know.
 

Attachments

  • Action Tut.w3x
    21.7 KB · Views: 319

nate

New Member
Reaction score
3
Gah, too many pictures! Never mind, very informative I like it. Next time more similies though. <3 :) :( :eek: :D ;) :p :cool: :mad: :rolleyes: :eek: :confused: :banghead: :shades: :nuts:
 
I

IKilledKEnny

Guest
I couldn't use smilies even if I wanted to. Heh, I used 32 pictures, that's 2 more of the allowed limit, I had hard time choosing what pictures to delete with without having smilies. :p Thanks for the feedback.
 

the Lumpy

►►►
Reaction score
53
Good job! Just one thing I saw while skimming it: in 'Trigger Example 1', your action that adds an event should say (Picked player) instead of Player 1 (Red).
 
I

IKilledKEnny

Guest
Good job! Just one thing I saw while skimming it: in 'Trigger Example 1', your action that adds an event should say (Picked player) instead of Player 1 (Red).

Thanks! I'll back be back in like 12 hours (long day indeed) and I will fix this, thanks for noticing!!
 

Sir Gordon

Decent User (I'm as good as you)
Reaction score
43
>Next time, more smilies though
On the contrary.

IKilledKEnny, you have a wonderful tutorial here. It has many pictures, so it is very clear. Though, less coloring text and more bolds could smooth it a bit.

And the FAQ you include is nice as well :)
 
I

IKilledKEnny

Guest
Thanks for you kind comment. :) As for the colored text it come to represent the editable value, like they are shown in World Editor. I'm sorry if it wasn't clear enough.

P.S. In a few hours I will switch the picture the Th Lumpy pointed out with the proper one.
 

Ryuu

I am back with Chocolate (:
Reaction score
64
Amazing tutorial. I learnt abit about visibility and invisibility here >.<

Too many colours. Too little smilies. Too many images. Too little bolds.

In total, their average ;)
 

Sir Gordon

Decent User (I'm as good as you)
Reaction score
43
Hm, I downloaded the map, and it is very useful :)

>As for the colored text it come to represent the editable value, like they are shown in World Editor.
Yes, I know. As long as it doesn't hurt the eyes.

<S=2π[2]>
That is very cool. You explain this in wisdom.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/
  • The Helper The Helper:
    Here is another comfort food favorite - Million Dollar Casserole - https://www.thehelper.net/threads/recipe-million-dollar-casserole.193614/

      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