Triggers - Efficient Triggering

M

Mythic Fr0st

Guest
Thanks all, Aphoc posted twice:p! he must love me lol...
is anyone ever gunna request a trigger?
 

waaaks!

Zinctified
Reaction score
255
wow all the trigger stuff you need(not all)cool....
how about triggers that only works at night like night stalkers spell hunter in the night, and lost the ability at morning, or maybe some unexpected things happen at night and lost in morning too, im really confuse on how to do the night trigger things....
 
M

Mythic Fr0st

Guest
Erm, i'll try and decode that, and then write some sort of a random trigger involving night, and a spell lol...

Thanks for input! :D
 
D

DeFRag

Guest
Ice turn

Events
{E}Unit - A unit Is issued an order targeting a point
Conditions {C}
Actions
{A}[set variable]Set Loc[2] = (Position of (Triggering unit))
{A}[if then else multiple functions]If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
{C}[Terrain Type](Terrain type at Loc[1]) Equal to Icecrown Glacier - Ice
Then - Actions
{A}[Unit] - Make (Triggering unit) face (Target point of issued order) over 0.00 seconds
Else - Actions
{A}[General]Custom script: call RemoveLocation(udg_Loc[2])

*********************************************************
Dosent work four me :( what wrong?
 

Attachments

  • asdf.bmp
    283.3 KB · Views: 421

LordOglog

New Member
Reaction score
16
Code:
(Terrain type at Loc[1])...
Should be:
Code:
(Terrain type at Loc[2])...
So it matches the others. (Think thats the problem)
 
M

Mythic Fr0st

Guest
Yes, thats correct, terrain type at Loc[2]...

also use the {CODE} tags plz, it makes it tidier, and easier to see

Example
Code:
   Event
     A unit is issued an order targeting a point

(Conserves spaces)
also, its the ####### symbol, next to quote (to the right)
 

n[u]ll

You can change this now in User CP.
Reaction score
93
umm for the Ice Turn trigger you must have ordered unit instead of triggering unit, other wise it will not work
=)
btw gj on the tut it helped alot
 
M

Mythic Fr0st

Guest
Not so, triggering unit can refer to

~ Entering unit
~ Triggering unit
~ Ordered unit
~ A unit sells a unit (refers to the unit selling)

Just an example

Triggering unit refers to whatever unit triggered the event
 

martix

There is no spoon
Reaction score
49
Hmmm, define "efficient triggers in GUI"... I just can't seem to think of a straight-forward answer.
JASS is easy - less function calls=better, but GUI?
 
M

Mythic Fr0st

Guest
This was written for noobs, lol

I was thinking of asking a mod to change the name, but I wont, until I decide on a good name... (do they do that?!)

Also, Efficient triggers tutorial, is just triggers often asked for, that people use poor code with, so I write the perfect code (of my knowledge)

Such as Ice Slide, I dont get into jass (yet)

Because if a noob sees
Code:
function helloworld takes nothing returns nothing
 local string s = "Hello World"
    call DisplayTextToForce(GetPlayersAll(), s)
endfunction

they pretty much freak out (I mean really nooby:p)

Its more of a guide, and I want to add more things ^_^
 

martix

There is no spoon
Reaction score
49
I don't mean to get into JASS, I used it only as reference. :)
Don't know about efficiency, but I always try to make triggs with less stuff and more organized. How much better this is is doubtful though...
 
M

Mythic Fr0st

Guest
To the common stuff, it is much better, Integer A statements are the best...

Trust me:p everything I write is the best of my knowledge, except for death kill trigger & ice slide / turn etc, which is just the best there is in GUI

In terms of "speed" of making it, you only need a few variables, its small, and easily readable
 

n[u]ll

You can change this now in User CP.
Reaction score
93
Not so, triggering unit can refer to

~ Entering unit
~ Triggering unit
~ Ordered unit
~ A unit sells a unit (refers to the unit selling)

Just an example

Triggering unit refers to whatever unit triggered the event


but it doesnt respond to
Code:
Unit is issued an order targeting a point

thats what i meant from the beginning
 
M

Mythic Fr0st

Guest
~ Ordered unit

Unit is issued an order targeting a point

A unit is issued an order targeting a point, is an order event, therefore Triggering Unit refers to it

Triggering Unit, means the unit that caused the event to run

A unit is issued an order targeting a point, triggers whenever you make a unit move, and triggering unit refers to it because "it" was the unit that triggered the event
 
H

Hohan

Guest
Newbie question: I don't know what array means nor the meaning of the word 'index' in the word, "variable[index]".

Newbie question 2: Adding units into a unit group and then ording the unit group.

:eek:
 
M

Mythic Fr0st

Guest
Newbie question: I don't know what array means nor the meaning of the word 'index' in the word, "variable[index]".

Newbie question 2: Adding units into a unit group and then ording the unit group.

An index is the number or value between the [ ] brackets
First, an array, is a variable that has an index, think of it like this

The way I think of it is each number from 0 to 8169 references a different variable in the variable array you made...

So you can make a variable named String, type integer, array 1

set Str[1] = "Hello"
set Str[2] = "Frog"

So Str[1] has the value Hello, and Str[2] has the value Frog, they do not get erased, because the value 1, references Str[1], and 2 references Str[2]

Its like having multiple variables, but they take up no space in the variable editor

Understand?

Newbie question 2: Adding units into a unit group and then ording the unit group.

Variable to make:
(NAME of variable, TYPE of variable, ARRAY of variable)

Group, unit group, no array

Code:
    Events
        Map initilization
    Conditions
    Actions
        Unit Group - Add (Select off map your unit) to Group
        (//Repeat this for each unit you want in it//)
        Unit Group - Order Group to move to Your_Region

You were not very specific on the second question, so thats just a little example
 

n[u]ll

You can change this now in User CP.
Reaction score
93
A unit is issued an order targeting a point, is an order event, therefore Triggering Unit refers to it

Triggering Unit, means the unit that caused the event to run

A unit is issued an order targeting a point, triggers whenever you make a unit move, and triggering unit refers to it because "it" was the unit that triggered the event

omg... well it didnt work when i used triggering unit but it works when i use ordered unit...
i just tested it lol

oh well, how bout were both right and everyone is all very special and unique inside
LoL xD
 
D

DeFRag

Guest
I cant finde this one......
*******************
Then - Actions
{A}[Unit] - Make (Triggering unit) face (Target point of issued order) over 0.00 seconds

*******************
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top