Help Thread! (o help you not me)

Status
Not open for further replies.

Evote

New Member
Reaction score
4
Ok Post problems that i will try to answer


Ok this is my second attempt at making a help thread.

*post any problems stuff with triggers which i can help you with.

Just a couple of common problems:
SLIDING (either use Aceharts or this:)
PHP:
SLIDE
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in SLIDERS and do (Actions)
            Loop - Actions
                Set UP[(Player number of (Picked player))] = (Position of (Picked unit))
                If ((Terrain type at UP[(Player number of (Picked player))]) Equal to Northrend - Ice) then do (Set SLIDE[(Player number of (Picked player))] = (UP[(Player number of (Picked player))] offset by speed towards (Facing of (Picked unit)) degrees)) else do (Set SLIDE[(Player number of (Picked player))] = (Position of (Picked unit)))
                If ((Terrain type at UP[(Player number of (Picked player))]) Equal to Northrend - Ice) then do (Unit - Move (Picked unit) instantly to SLIDE[(Player number of (Picked player))]) else do (Set SLIDE[(Player number of (Picked player))] = (Position of (Picked unit)))
                If (((Terrain type at UP[(Player number of (Picked player))]) Equal to Cityscape - Black Marble) or ((Terrain type at UP[(Player number of (Picked player))]) Equal to Northrend - Ice)) then do (Do nothing) else do (Unit - Kill (Picked unit))
        Custom script:   call RemoveLocation(udg_SLIDE[1])
        Custom script:   call RemoveLocation(udg_SLIDE[2])
        Custom script:   call RemoveLocation(udg_SLIDE[3])
        Custom script:   call RemoveLocation(udg_SLIDE[4])
        Custom script:   call RemoveLocation(udg_SLIDE[5])
        Custom script:   call RemoveLocation(udg_SLIDE[6])
        Custom script:   call RemoveLocation(udg_UP[1])
        Custom script:   call RemoveLocation(udg_UP[2])
        Custom script:   call RemoveLocation(udg_UP[3])
        Custom script:   call RemoveLocation(udg_UP[4])
        Custom script:   call RemoveLocation(udg_UP[5])
        Custom script:   call RemoveLocation(udg_UP[6])
Turning
PHP:
TURN
    Events
        Unit - A unit Is issued an order targeting a point
    Conditions
    Actions
        Set TURNING[(Player number of (Triggering player))] = (Target point of issued order)
        Unit - Make (Triggering unit) face TURNING[(Player number of (Triggering player))] over 0.01 seconds
        Custom script:   call RemoveLocation(udg_TURNING[1])
        Custom script:   call RemoveLocation(udg_TURNING[2])
        Custom script:   call RemoveLocation(udg_TURNING[3])
        Custom script:   call RemoveLocation(udg_TURNING[4])
        Custom script:   call RemoveLocation(udg_TURNING[5])
        Custom script:   call RemoveLocation(udg_TURNING[6])

Make Unit Group.
PHP:
SET GROUP
    Events
        Map initialization
    Conditions
    Actions
        Unit Group - Pick every unit in (Units of type Peasant) and do (Unit Group - Add (Picked unit) to SLIDERS)
Multiboards with a meter like in pew pew fly fly: lllllllllllllllllllllllllll
Use L's not | L's are closer together.
Creation
PHP:
Multiboard
    Events
        Time - Elapsed game time is 1.00 seconds
    Conditions
    Actions
        Multiboard - Create a multiboard with 3 columns and 7 rows, titled Nortulas 2.21
        For each (Integer A) from 1 to 7, do (Actions)
            Loop - Actions
                Multiboard - Set the display style for (Last created multiboard) item in column 1, row (Integer A) to Show text and Hide icons
                Multiboard - Set the width for (Last created multiboard) item in column 3, row (Integer A) to 5.00% of the total screen width
                Multiboard - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 8.00% of the total screen width
                Multiboard - Set the width for (Last created multiboard) item in column 2, row (Integer A) to 10.00% of the total screen width
                Multiboard - Set the display style for (Last created multiboard) item in column 2, row (Integer A) to Show text and Hide icons
                Multiboard - Set the display style for (Last created multiboard) item in column 3, row (Integer A) to Show text and Hide icons
        -------- Set the special titles: --------
        Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to |cffD9FF00Player:
        Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to |cff0080FFPower:
        Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to <Empty String>
        Multiboard - Hide (Last created multiboard)
        Multiboard - Show (Last created multiboard)
        -------- Player Colours --------
        Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to (|c0000ffff + (Name of Player 3 (Teal)))
        Multiboard - Set the text for (Last created multiboard) item in column 1, row 3 to (|c00800080 + (Name of Player 4 (Purple)))
        Multiboard - Set the text for (Last created multiboard) item in column 1, row 4 to (|c00ffff00 + (Name of Player 5 (Yellow)))
        Multiboard - Set the text for (Last created multiboard) item in column 1, row 5 to (|c00ff8000 + (Name of Player 6 (Orange)))
        Multiboard - Set the text for (Last created multiboard) item in column 1, row 6 to (|c0000ff00 + (Name of Player 7 (Green)))
        Multiboard - Set the text for (Last created multiboard) item in column 1, row 7 to (|c00ff00ff + (Name of Player 8 (Pink)))
A The meter(llllllllllllllllllllll)
PHP:
Power Level
    Events
        Unit - A unit Dies
    Conditions
    Actions
        -------- teal --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Killing unit)) Equal to Player 3 (Teal)
            Then - Actions
                Multiboard - Set the text for (Last created multiboard) item in column 2, row 2 to (|cff0099ff + (Substring(llllllllllllllllllllllllllllllllll, 1, Power[3])))
                Set Power[3] = (Power[3] + 1)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Dying unit)) Equal to Player 3 (Teal)
            Then - Actions
                Multiboard - Set the text for (Last created multiboard) item in column 2, row 2 to (|cff0099ff + (Substring(llllllllllllllllllllllllllllllllll, 1, Power[3])))
                Set Power[3] = (Power[3] - 1)
            Else - Actions
        -------- purple --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Killing unit)) Equal to Player 4 (Purple)
            Then - Actions
                Multiboard - Set the text for (Last created multiboard) item in column 2, row 3 to (|cff0099ff + (Substring(llllllllllllllllllllllllllllllllll, 1, Power[4])))
                Set Power[4] = (Power[4] + 1)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Dying unit)) Equal to Player 4 (Purple)
            Then - Actions
                Multiboard - Set the text for (Last created multiboard) item in column 2, row 3 to (|cff0099ff + (Substring(llllllllllllllllllllllllllllllllll, 1, Power[4])))
                Set Power[4] = (Power[4] - 1)
            Else - Actions
        -------- yellow --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Killing unit)) Equal to Player 5 (Yellow)
            Then - Actions
                Multiboard - Set the text for (Last created multiboard) item in column 2, row 4 to (|cff0099ff + (Substring(llllllllllllllllllllllllllllllllll, 1, Power[5])))
                Set Power[5] = (Power[5] + 1)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Dying unit)) Equal to Player 5 (Yellow)
            Then - Actions
                Multiboard - Set the text for (Last created multiboard) item in column 2, row 4 to (|cff0099ff + (Substring(llllllllllllllllllllllllllllllllll, 1, Power[5])))
                Set Power[5] = (Power[5] - 1)
            Else - Actions
        -------- orange --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Killing unit)) Equal to Player 6 (Orange)
            Then - Actions
                Multiboard - Set the text for (Last created multiboard) item in column 2, row 5 to (|cff0099ff + (Substring(llllllllllllllllllllllllllllllllll, 1, Power[6])))
                Set Power[6] = (Power[6] + 1)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Dying unit)) Equal to Player 6 (Orange)
            Then - Actions
                Multiboard - Set the text for (Last created multiboard) item in column 2, row 5 to (|cff0099ff + (Substring(llllllllllllllllllllllllllllllllll, 1, Power[6])))
                Set Power[6] = (Power[6] - 1)
            Else - Actions
        -------- green --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Killing unit)) Equal to Player 7 (Green)
            Then - Actions
                Multiboard - Set the text for (Last created multiboard) item in column 2, row 6 to (|cff0099ff + (Substring(llllllllllllllllllllllllllllllllll, 1, Power[7])))
                Set Power[7] = (Power[7] + 1)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Dying unit)) Equal to Player 7 (Green)
            Then - Actions
                Multiboard - Set the text for (Last created multiboard) item in column 2, row 6 to (|cff0099ff + (Substring(llllllllllllllllllllllllllllllllll, 1, Power[7])))
                Set Power[7] = (Power[7] - 1)
            Else - Actions
        -------- pink --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Killing unit)) Equal to Player 8 (Pink)
            Then - Actions
                Multiboard - Set the text for (Last created multiboard) item in column 2, row 7 to (|cff0099ff + (Substring(llllllllllllllllllllllllllllllllll, 1, Power[8])))
                Set Power[8] = (Power[8] + 1)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Dying unit)) Equal to Player 8 (Pink)
            Then - Actions
                Multiboard - Set the text for (Last created multiboard) item in column 2, row 7 to (|cff0099ff + (Substring(llllllllllllllllllllllllllllllllll, 1, Power[8])))
                Set Power[8] = (Power[8] - 1)
            Else - Actions
Player Leaves
PHP:
Player Leaves
    Events
        Player - Player 3 (Teal) leaves the game
        Player - Player 4 (Purple) leaves the game
        Player - Player 5 (Yellow) leaves the game
        Player - Player 6 (Orange) leaves the game
        Player - Player 7 (Green) leaves the game
        Player - Player 8 (Pink) leaves the game
    Conditions
    Actions
        Multiboard - Set the text for (Last created multiboard) item in column 1, row ((Player number of (Triggering player)) - 1) to |cffff3333Quit.
Minimum Level
PHP:
Minimum 0
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        If (Power[3] Equal to -1) then do (Set Power[3] = 0) else do (Do nothing)
        If (Power[4] Equal to -1) then do (Set Power[4] = 0) else do (Do nothing)
        If (Power[5] Equal to -1) then do (Set Power[5] = 0) else do (Do nothing)
        If (Power[6] Equal to -1) then do (Set Power[6] = 0) else do (Do nothing)
        If (Power[7] Equal to -1) then do (Set Power[7] = 0) else do (Do nothing)
        If (Power[8] Equal to -1) then do (Set Power[8] = 0) else do (Do nothing)
Refresh The board
PHP:
refresh
    Events
        Time - Every 0.10 seconds of game time
    Conditions
    Actions
        -------- Interger --------
        Multiboard - Set the text for (Last created multiboard) item in column 3, row 2 to (|cff66ff66 + (String((Power[3] - 1))))
        Multiboard - Set the text for (Last created multiboard) item in column 3, row 3 to (|cff66ff66 + (String((Power[4] - 1))))
        Multiboard - Set the text for (Last created multiboard) item in column 3, row 4 to (|cff66ff66 + (String((Power[5] - 1))))
        Multiboard - Set the text for (Last created multiboard) item in column 3, row 5 to (|cff66ff66 + (String((Power[6] - 1))))
        Multiboard - Set the text for (Last created multiboard) item in column 3, row 6 to (|cff66ff66 + (String((Power[7] - 1))))
        Multiboard - Set the text for (Last created multiboard) item in column 3, row 7 to (|cff66ff66 + (String((Power[8] - 1))))

i hope some of this helps.:)


P.s this is not for rep and the reason for this is so people like 'xxseerxx' also known as 'Warravan' which i know in warcraft can post there troubles.
if you have a comment which is not productive Don't post it.
If you find a leak ect post corrections.:)

i will not answer straight away at friends place.
 

chovynz

We are all noobs! in different states of Noobism!
Reaction score
130
Most inefficent triggers. :( Ok they work. But, these are worse than the examples ALREADY given on this site in the tutorials sections and in the free trigger code section.

Your unit group trigger leaks. As does your sliding trigger. And some of the others.

"...People like 'xxseerxx' also known as 'Warravan'" can go to the Tutorials and free trigger section. That's what those forums are set up for.
 

Duwenbasden

Ver 6 CREATE energy AS SELECT * FROM u.energy
Reaction score
165
Code:
        Custom script:   call RemoveLocation(udg_SLIDE[1])
        Custom script:   call RemoveLocation(udg_SLIDE[2])
        Custom script:   call RemoveLocation(udg_SLIDE[3])
        Custom script:   call RemoveLocation(udg_SLIDE[4])
        Custom script:   call RemoveLocation(udg_SLIDE[5])
        Custom script:   call RemoveLocation(udg_SLIDE[6])
        Custom script:   call RemoveLocation(udg_UP[1])
        Custom script:   call RemoveLocation(udg_UP[2])
        Custom script:   call RemoveLocation(udg_UP[3])
        Custom script:   call RemoveLocation(udg_UP[4])
        Custom script:   call RemoveLocation(udg_UP[5])
        Custom script:   call RemoveLocation(udg_UP[6])

That's some redundant code... and you are the first person I know that calls delete on a global variable without doing anything to it after.
 

Evote

New Member
Reaction score
4
:)i know the unit group thing leaks but only on once at Initialization. right?

sliding not though if it does where? i would like to fix lol cause i use it.

I'd love to help with any problems anyone has... what i say may not be efficiant but it gives u the idear.


INT
Events
Map initialization
Conditions
Actions
Unit Group - Pick every unit in (Units of type Footman) and do (Unit Group - Add (Picked unit) to UGROUP)
Quote:
SLIDE
Events
Time - Every 0.01 seconds of game time
Unit - A unit Is issued an order targeting a point
Conditions
Actions
Set MAN = (Position of Footman 0002 <gen>)
Set SLIDE = (MAN offset by 4.20 towards (Facing of Footman 0002 <gen>) degrees)
Set TURNING = (Target point of issued order)
Unit Group - Pick every unit in UGROUP and do (If ((Terrain type at MAN) Equal to Lordaeron Summer - Dirt) then do (Unit - Move (Picked unit) instantly to SLIDE) else do (Do nothing))
Unit Group - Pick every unit in UGROUP and do (If ((Terrain type at MAN) Equal to Lordaeron Summer - Rock) then do (Unit - Kill (Picked unit)) else do (Do nothing))
Unit - Make (Triggering unit) face TURNING over 0.00 seconds
Custom script: call RemoveLocation(udg_TURNING)
Custom script: call RemoveLocation(udg_SLIDE)
Custom script: call RemoveLocation(udg_MAN)
 

Duwenbasden

Ver 6 CREATE energy AS SELECT * FROM u.energy
Reaction score
165
i know the unit group thing leaks but only on once at Initialization. right?

Yep, globals are impossible to leak unless you move the pointer elsewhere (Don't tell me Blizzard did that... I'll be very sad)

call RemoveLocation(udg_SLIDE[1])

put the remove thing in a for loop.
 

Evote

New Member
Reaction score
4
ok

yer is that last sliding one better..?
"...People like 'xxseerxx' also known as 'Warravan'" can go to the Tutorials and free trigger section. That's what those forums are set up for.
This is also for questions from people. :) but thanks for the constructive comment.

just as a stupid question whats the difference between loop for interga a and b?
 
T

toast

Guest
just as a stupid question whats the difference between loop for interga a and b?

There is none, they just use separate indexes (A, B) so you can have a loop within a loop (you could use two A loops, but that would throw the whole thing out of whack. Then again, there are a few rare cases in which that method is useful).
 

Tonks

New Member
Reaction score
160
What is it with these threads? What do you think the WE Help Zone is for? So people can post their problems and get help. Why do you need a thread on it? So you can score some +rep?
 

turok255

New Member
Reaction score
30
Yep.. Hmm... Ahh.. Okay then,
1)triggers leak
2)your getting more help from this thread than you are giving (witch is none)
3)thats why there is a WE help zone... Dur...
4)Nice try but this is pointless as to there is a whole forum based around this
 
Status
Not open for further replies.
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