Lesson 1: GUI "General" Functions

I

IKilledKEnny

Guest
Tonks forces do leak (all execpt "All Players" force) handle is ancestor of force, thus forces leaks.

> Sooda

Code:
-------- TempG = Nulled unit group --------
-------- TempP = Nulled location --------
-------- TempU = Nulled unit --------

I believe those explain what each variable is?

> Andrewgosu

I agree, but I thought of it as tutorial beucase the assignment involved comments. Don't worry, on regular triggers I don't take half of my time to write comments. :p
 

undeadorcjerk

The Ulitimate TheHelper.net Lurker
Reaction score
223
Code:
Events
Conditions
Actions
    -------- First we set the variable. --------
    Set UnitGroup = (Units in (Playable map area))
    -------- Then we pick a random unit. --------
    Set PickedUnit = (Random unit from UnitGroup)
    -------- And we tell it to move. --------
    Unit - Order PickedUnit to Move To (Center of Move Here Plz <gen>)
    -------- Next we color the little bugger. --------
    Unit - Change color of PickedUnit to Blue
    -------- Now we remove the variables. --------
    Custom script:   call DestroyGroup(udg_UnitGroup)
    -------- Next we take a nap! :) --------
    Wait 1000000000.00 seconds
If i did that right, ill be surprised. I don't have so great of luck when it comes to triggers.
 

Azylaminaz

Vox Populi
Reaction score
91
Code:
Trigger...
    Events
        Player - Player 1 (Red) types a chat message containing Blue!!! as An exact match
    Conditions
    Actions
        Set Temp_Group = (Units in (Entire map))
        Set Temp_Unit = (Random unit from Unit_Group)
        Set Temp_Point = (Center of (Entire map))
        Unit - Change color of Temp_Unit to Blue
        -------- OR --------
        Animation - Change Temp_Unit's vertex coloring to (0.00%, 0.00%, 100.00%) with 0.00% transparency
        -------- You should have told me which blue. o.o --------
        Unit - Move Temp_Unit instantly to Temp_Point
        Custom script: call DestroyGroup (udg_Temp_Group)
        Custom script: call RemoveLocation (udg_Temp_Point)
You said to make it blue... not which kind of blue.. Make it look like if it was owned by player blue? Or just make the unit blue. Lol. I don't normally make triggers much(because I don't make maps... only edit when people ask for help), but when ever I do. I check if it has leaks(mainly only repeated ones).

Why are unit leaks in both, yours and the one you did, just simple point leaks? Is there no way to really remove udg_Temp_Unit? I thought it was a leak.. It seems if it isn't removed, it is overwritten, which I think is bad? o.o

In the Leak Checker, what does this mean:
Code:
 Location variable has not been removed: Temp_Unit
 Location variable has not been removed: Temp_Point
I always get it in all my triggers, but it tells me I have no memory leaks. o.o Just confuses me.

Tonks said:
I don't think that the spaces matter in that case, but I'm not entirely positive. I'm not particularly Jass-savvy.
Could someone who knows about Jass please confirm / correct that statement?
JASS = Coding, thus, spaces don't matter.
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
Code:
Events
Conditions
Actions
    -------- First we set the variable. --------
    Set UnitGroup = (Units in (Playable map area))
    -------- Then we pick a random unit. --------
    Set PickedUnit = (Random unit from UnitGroup)
    -------- And we tell it to move. --------
    Unit - Order PickedUnit to Move To (Center of Move Here Plz <gen>)
    -------- Next we color the little bugger. --------
    Unit - Change color of PickedUnit to Blue
    -------- Now we remove the variables. --------
    Custom script:   call DestroyGroup(udg_UnitGroup)
    -------- Next we take a nap! :) --------
    Wait 1000000000.00 seconds
If i did that right, ill be surprised. I don't have so great of luck when it comes to triggers.

There is one small problem, the "Center of Move Here Plz <gen>" leaks. You first need to set it to a variable:
Code:
set TempPoint = Center of Move Here Plz <gen>
Use it, then remove it:
Code:
Custom Script: call RemoveLocation(udg_TempPoint)

@Azylaminaz:
Nope, spaces don't matter... Well, at least in some cases, and I just know it won't syntax. :D

Anyways, Temp_Unit isn't a location variable, so it doesn't need to be removed... Temp_Point should be removed through "call RemoveLocation(udg_Temp_Point)"

--------------------------------
*Off-Topic:I'm_On_56k's leak checker isn't that good, because it misses some leaks, but only catches obvious ones. If you need me to leak check some work, you can PM me them or post a new thread.
--------------------------------

Otherwise, I don't have a clue on what's the problem. :rolleyes:
 

Akatsuki

New Member
Reaction score
24
Here's my assignment for when you come back.

Code:
Assignment
    Events
    Conditions
    Actions
        -------- I first will set my variables. --------
        -------- I will set the variable Temp_Group = Unit in (playable map area) so that I may remove it later to prevent a memory leak. --------
        Set Temp_Group = (Units in (Playable map area))
        -------- I will set my Temp_Unit(Unit variable) to (Random unit from Temp_Group which is (Units in (Playable map area)) to prevent a memory leak. --------
        Set Temp_Unit = (Random unit from Temp_Group)
        -------- I will set my point variable which is named Temp_Point to (Center of (Playable map area)) so that I may remove it so it would prevent a memory leak. --------
        Set Temp_Point = (Center of (Playable map area))
        -------- I will now change the color of my Temp_Unit in to the color Blue. --------
        Unit - Change color of Temp_Unit to Blue
        -------- I will now make my Temp_Unit move to Temp_Point. --------
        Unit - Order Temp_Unit to Move To Temp_Point
        -------- I will now remove my Temp_Point variable to prevent a memory leak. --------
        Custom script:   call RemoveLocation(udg_Temp_Point)
        -------- I will now remove my Temp_Group to prevent a memory leak. --------
        Custom script:   call DestroyGroup(udg_Temp_Group)
 

pheonixashes

Those who misplace trust in gods learn their fate.
Reaction score
65
Ok, I'm finished with mine; don't laugh, it's my first attempt at doing real triggers.

Ok, here it is.

Code:
Events
    Time - Every 10.00 seconds of game time
Conditions
Actions
    ---- The UnitToBlueGroup variable is to set a unit group so I can choose a unit in this Unit Group later. ----
    Set UnitToBlueGroup = (Units in (Playable map area))
    ---- The UnitToBlue is simply the unit that is going to move and change color. ----
    Set UnitToBlue = (Random unit from UnitToBlueGroup)
    ---- UnitToBlueMove is the location where the newly "blued" unit is going to move to. ----
    Set UnitToBlueMove = (Center of Location <gen>)
    ---- Here the picked unit (The random unit in UnitToBlue) is changing its color to blue. ----
    Unit - Change color of UnitToBlue to (Color of Player 2 (Blue))
    ---- Here the unit is being ordered to the region/location, marked by the MUSHROOMS! ----
    Unit - Order UnitToBlue to Move To UnitToBlueMove
    ---- Here I am deleting the group variable to help reduce lag, if this map was signifigantly more laggy. ----
    Custom script:   call DestroyGroup (udg_UnitToBlueGroup)
    ---- Here I am also removing the location to prevent/reduce lag. ----
    Custom script:   call RemoveLocation (udg_UnitToBlueMove)

Here's the map as well.
 

Attachments

  • Lesson 1 - General GUI Functions.w3x
    21.8 KB · Views: 116

Naminator

Coming Back To Life
Reaction score
76
This is my homework :D Like a convertion system i made. Changing The Unit Vertex Coloring unitl it's get blue. In this system if a unit it's in that region it doesn't take other unit.(Somethings are in spanish in WE, I'm from Argentina..but you can understand clearly)

I do my best here. Hope You Like It! Sry if i pass to much with the assignament, i just want it to make something different of the others.

Code:
Acontecimientos
        Jugador - Jugador 1 (rojo) types a chat message containing -Convert as Una correspondencia exacta
   Condiciones
   Acciones
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        Si: Condiciones
            (Number of units in (Units in Change Region <gen>)) Igual a 1
        Entonces: Acciones
            Skip remaining actions
        Otros: Acciones
    -------- Units In Map --------
    Set TempGroup = (Units in (Playable map area) matching ((Owner of (Matching unit)) No igual a Jugador 2 (azul)))
    -------- Random Unit --------
    Set RandomUnit = (Random unit from TempGroup)
    -------- Region Variable --------
    Set TempPoint = (Center of Change Region <gen>)
    -------- Actions --------
    Unidad - Move RandomUnit instantly to (Center of Change Region <gen>)
    Unidad - Activar pausa RandomUnit
    Camara - Pan camera for Jugador 1 (rojo) to (Center of Change Region <gen>) over 0.00 seconds
    Wait 0.50 seconds
    Partida - Display to (All players) for 5.00 seconds the text: |cFFFFCC00|||
    Animacion - Change RandomUnit's vertex coloring to (0.00%, 0.00%, 20.00%) with 0.00% transparency
    Wait 1.50 seconds
    Partida - Display to (All players) for 5.00 seconds the text: |cFFFFCC00||||||
    Animacion - Change RandomUnit's vertex coloring to (0.00%, 0.00%, 40.00%) with 0.00% transparency
    Wait 1.50 seconds
    Partida - Display to (All players) for 5.00 seconds the text: |cFFFFCC00|||||||||
    Animacion - Change RandomUnit's vertex coloring to (0.00%, 0.00%, 60.00%) with 0.00% transparency
    Wait 1.50 seconds
    Partida - Display to (All players) for 5.00 seconds the text: |cFFFFCC00|||||||||...
    Animacion - Change RandomUnit's vertex coloring to (0.00%, 0.00%, 80.00%) with 0.00% transparency
    Wait 1.50 seconds
    Partida - Display to (All players) for 5.00 seconds the text: |cFFFFCC00|||||||||...
    Animacion - Change RandomUnit's vertex coloring to (0.00%, 0.00%, 100.00%) with 0.00% transparency
    Wait 1.50 seconds
    Unidad - Change color of RandomUnit to Azul
    Unidad - Desactivar pausa RandomUnit
    Partida - Display to (All players) for 5.00 seconds the text: Conversion Complete
    -------- Destroy Point Variable Leak --------
    Custom script:   call RemoveLocation (udg_TempPoint)
    -------- Destroy Group Variable Leak --------
    Custom script:   call DestroyGroup(udg_TempGroup)

Here is the other if the first one was to much

Code:
Acontecimientos
        Jugador - Jugador 1 (rojo) types a chat message containing -Convert as Una correspondencia exacta
    Condiciones
    Acciones
        -------- Units In Map --------
        Set TempGroup = (Units in (Playable map area) matching ((Owner of (Matching unit)) No igual a Jugador 2 (azul)))
        -------- Random Unit --------
        Set RandomUnit = (Random unit from TempGroup)
        -------- Region Variable --------
        Set TempPoint = (Center of Change Region <gen>)
        -------- Actions --------
        Unidad - Move RandomUnit instantly to (Center of Change Region <gen>)
        -------- Change Color --------
        Unidad - Change color of RandomUnit to Azul
        -------- Destroy Point Variable Leak --------
        Custom script:   call RemoveLocation (udg_TempPoint)
        -------- Destroy Group Variable Leak --------
        Custom script:   call DestroyGroup(udg_TempGroup)
 

Tonks

New Member
Reaction score
160
I'm incredibly sorry to have to do this, but I can't finish this Classroom. Over the weekend I broke my arm and my dad is in the hospital, so I find myself incapable of continuing this class.

Again, I'm sorry. If anyone would like to take up the lesson, feel free to announce yourself. Many of you are capable of teaching it just as well as I could have.
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
Awww.... So sad for the broken arm, I hope it gets better soon... :(
I could take the class up, but I think I might need to focus on my other class, but that won't be too hard. If you would like me to take over the class from here, I'd gladly do that. :eek:
 

Tonks

New Member
Reaction score
160
Awww.... So sad for the broken arm, I hope it gets better soon... :(
I could take the class up, but I think I might need to focus on my other class, but that won't be too hard. If you would like me to take over the class from here, I'd gladly do that. :eek:

Feel free to. Just take it up with whoever's managing the classroom thing these days, then post your lessons.
 
I

IKilledKEnny

Guest
Sorry to hear that Tonks, it was a nice classroom. I hope you and your father will get better soon!

> PurgeandFire

Good luck with it, you are running 2 classrooms at a time. :p I'll help if you need assitance.
 

Naminator

Coming Back To Life
Reaction score
76
Sry about your father and you...

But when your father and you gets better are you going to keep this class on? I don't know if is right to ask, but just wanna know. I really sry about you father and you.
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
Sorry to hear that Tonks, it was a nice classroom. I hope you and your father will get better soon!

> PurgeandFire

Good luck with it, you are running 2 classrooms at a time. :p I'll help if you need assitance.

Lol... I didn't know that Tonks replied. Hm.. I guess I'll try to finish both classes' lessons over the weekend or maybe on Friday. Thank you, I will ask if I need help to either you or elmstfreddie. :)
 

Tonks

New Member
Reaction score
160
Sry about your father and you...

But when your father and you gets better are you going to keep this class on? I don't know if is right to ask, but just wanna know. I really sry about you father and you.

PurgeandFire is continuing the classroom unless he decides not to.

Lol... I didn't know that Tonks replied. Hm.. I guess I'll try to finish both classes' lessons over the weekend or maybe on Friday. Thank you, I will ask if I need help to either you or elmstfreddie. :)

If you need any further information about GUI Functions, I'm still happy to give you some tricks n tips.
 
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

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top