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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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