[Classroom] GUI 101

PurgeandFire

zxcvmkgdfg
Reaction score
509
Sure! Damn... I must of deleted them from the attachment list by accident... Is it ok if it doesn't have them? But I might get the pictures back on soon. ;)

Thanks for notifying me of the issue. :D
 
A

A Fly

Guest
Well Purge, *laughs* it seems I am dropping my map projects for right now. So you can take me off of your class. :) Sorry, Thanks for the offer but I will not be working on it right now. :) <3 ttyl
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
Allright then, it's ok. :eek:

I'll remove you off the list asap.

-Note:

- Next Lesson Should Start soon maybe tomorrow or even possibly today. Keep up the good work! :D
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
If you're talking about homework, I think these are the people that did their homework:

  • rodead
  • hi_im_bob
  • pheonixashes
  • uareanoob
  • thedude ---------- Yes
  • MapMaker ---------- Yes
  • MaaxeEvid
  • Swish
  • ~GaLs~ ---------- Yes
  • denmax ---------- Yes
  • TheK1ll3r ---------- Yes
  • Newbwc3 ---------- Yes
  • THE_X
  • A Fly
  • Lanboy ---------- Yes
  • trigger_newb
The people that still need to do their homework are:
  • rodead
  • hi_im_bob
  • pheonixashes
  • uareanoob
  • MaaxeEvid
  • Swish
  • THE_X
  • trigger_newb

Good job to the people who did the tremendously easy homework (IMO). :D

If you're name was not mentioned, though you did your homework, please say so here. ;)
 

denmax

You can change this now in User CP.
Reaction score
155
Didn't A Fly requested to get taken of the list?
 

elmstfreddie

The Finglonger
Reaction score
203
Assignment 1 Difficulty: 0/10

LOL.
Sorry, just had to laugh.
Purge, if you want me to write any lessons PM me. Apparently EVERYONE wants to learn simple GUI, and NO ONE wants to learn advanced GUI :p
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
Assignment 1 Difficulty: 0/10

LOL.
Sorry, just had to laugh.
Purge, if you want me to write any lessons PM me. Apparently EVERYONE wants to learn simple GUI, and NO ONE wants to learn advanced GUI :p

Lol... I gave them the answer in the text... You just needed to practically c'n'p a trigger made in 30 seconds. Lol..

Sure, I appreciate the help. Thank you! :D
 

elmstfreddie

The Finglonger
Reaction score
203
Lesson 2:​

- A simple text display trigger
- Variables
- Manipulating Variables
- Assignment

Well, 7 people did their post, and each was 100/100.

+rep to:
  • thedude
  • MapMaker
  • ~GaLs~
  • denmax
  • TheK1ll3r
  • Newbwc3
  • Lanboy



Simple Text Display Trigger:

Well, now that you understand and know how to create a trigger, we will go on to creating a simple text display trigger. This will display a text to all players for 5.00 seconds at map initialization. Seems easy huh? Well, yes it is:
Code:
Events Map Initialization Conditions Actions Game - Display "This is lesson 2" for (All Players) over 5.00 seconds //Trigger might not be exact//

This will simply display the text "This is lesson 2".
Challenge 1:
------------------
Create a trigger at map initialization that reads "Poopoo" for All players over 20.00 seconds
------------------

Variables:


Variables are simple things that contain a value in them. A variable is also a math term, but both terms are related; they both store values.
Math Variable
x = 4

Warcraft Variable
set x = 4

For both variables, if you do x + 4, it will equal 8.

Though warcraft variables do not contain only integer values, it can contain boolean values, player values, image values, even ubersplat values. To create a variable, open the variable editor (Sign with a big "X" in the trigger editor) (CTRL + B is the hotkey I think) then click the big "+X" button to create it. It should show you a menu of options:

Name:

This will be the name of the variable, make sure it is relevant to its value.
-by PurgeandFire

Type:
As implied, this is the type of variable. Unlike some real programming languages, each variable can only be set to what type it is. The names are pretty self-explanitory.

Array:
A check box, that once checked you can edit the box with numbers. Arrays are pretty much like having different variables, except they are all held under one name. For example, you could have two integer variables. Integer1 and Integer2. Or, you could have a variable with an array of 2, Integer[1] and Integer[2]. This makes it easier to have multiple variables of 1 type.

Manipulating Variables:
Manipulation capabilities of a variable will depend on the type of variable, for instance an integer can be mathimified, and a unit can... Be a unit.
To manipulate a variable, we use the action General - Set Variable.
One bad thing about manipulating a real/integer variable, is that you cannot just add a number to it. You have to set the variable = variable + what you want.
Variables can be used for various things. For example, in a trigger with the event A unit dies, if you use a wait, after that wait there will be no such thing as Dying Unit and no such thing as Killing Unit. So, you could, before the wait, set a variable to equal Dying Unit or Killing Unit, or both, then referring to them after the wait.
Variables can also be used for making your life easier when triggering. Lets say you're making a triggered ability, it would be a pain to every time put (100.00 + (Level of Acid Bomb for (Triggering unit)) * 50.00). So, you could set an integer variable to = (100.00 + (Level of Acid Bomb for (Triggering unit)) * 50.00), then refer to that variable.

Important: To refer to a variable inside an action, instead of choosing function, you select variable, and find your variable in the variables list.

Assignment: Difficulty: 2/10
Make a trigger which uses variables to display 2 different messages to player 1. Set a text variable (which are called strings) to Poopy Face, and a different variable to I am a, and display them in opposite order.
(If that sounds confusing, I mean set String1 then String2, then display String2 then String1)
<<Bonus marks for doing a hidden task>>
-by elmstfreddie
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
Thanks elmstfreddie for finishing that up. Yes, I asked him to finish it up, I just didn't have the time at the moment. Anyways, it looks great and well written, though the code for the trigger is all jacked up. lol... ;)

Don't forget to do the challenge and please do the homework!

Thank you!
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
Actually i am not so understand wat is the assignment want me to do...but i will do a trigger here see if it is correct.

Code:
Challenge 1
    Events
        Map initialization
    Conditions
    Actions
        Game - Display to (All players) for 20.00 seconds the text: Poopoo

Code:
Assignment
    Events
        Map initialization
    Conditions
    Actions
        Set String1[1] = |CFFFF0000P|CFFFF5500o|CFFFFFF00o|CFFAAFF00p|CFF55FF00y |CFF00AA55F|CFF0000FFa|CFF552AFFc|CFFAA55FFe
        Set String2[2] = |CFFFF0000I |CFF80FF00a|CFF00FF00m |CFF7F40FFa 
        Game - Display to (All players) the text: String1[1]
        Game - Display to (All players) the text: String2[2]
        Game - Display to (All players) the text: (String2[2] + String1[1])
 

denmax

You can change this now in User CP.
Reaction score
155
Code:
Challenge 1
    Events
        Map Initialization
    Conditions
    Actions
        Game - Display to (All Players) text: Poopoo

Code:
Challenge 1 [MUI]
    Events
        Time - Every 1 second of the game
    Conditions
    Actions
        Custom script: local string PoopooString
        Set PoopooString = Poopoo
        Game - Display to (All Players) text: PoopooString

Code:
Assignment 2
    Events
        Map Initialization
    Conditions
    Actions
        Set String[1] =  Poopy Face.
        Set String[2] = I am a
        Game - Display to Player 1 (Red) text: (String[2] + String[1])

Remember that I placed a space before Poopy Face. to separate the Strings.

Code:
Assignment 2 [MUI]
    Events
        Time - Every 1 seconds of the game
    Conditions
    Actions
        Custom script: local string String
        Set String[1] =  Poopy Face.
        Set String[2] = I am a
        Game - Display to Player 1 (Red) text: (String[2] + String[1])

Well, I think this doesn't work but I can't think of anything, Global Locals are only set in one trigger..

Originally posted by elmstfreddie
<<Bonus marks for doing a hidden task>>

The hidden task can be
1. MUI
2. Removing/Destroying the String after use (which I don't know how)
3. Using the Array
4. Doing the challenge
5. Placing space before String[1] or after String[2]


^_^

EDIT: Removed Custom script Actions..
 
T

TheK1ll3r

Guest
Assignment and challenge:
Code:
Challenge1
    Events
        Map initialization
    Conditions
    Actions
        Game - Display to (All players) for 20.00 seconds the text: PooPoo

Code:
Assignment
    Events
        Map initialization
    Conditions
    Actions
        Set String1[1] = Poopy Face
        Set String2[2] = I'm a
        Game - Display to (All players) the text: String1[1]
        Game - Display to (All players) the text: String2[2]
        Game - Display to (All players) the text: (String2[2] + String1[1])
I hope it's OK -.-
 
M

MapMaker

Guest
Since my internet and warcraft computers are both seperate, i will have to manually do my hw, by typing,

challenge:
Event- Map initialazion
condition-
Action- Display to (all players) for 20 sec the text: poopooface

now the assignment

Event-map initialation
Condition-
Action- Set String1[1] = Billy is da man
Set String2[2] = Billy is da man
Game - Display to (All players) the text: String1[1]
Game - Display to (All players) the text: String2[2]
Game - Display to (All players) the text: (String2[2] + String1[1])
 

elmstfreddie

The Finglonger
Reaction score
203
Yo purgeandfire, I'm giving out the marks for assignment 2 since I made it, ok?

Again, if you need my help I'm always here.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 The Helper:
    I think we need to add something to the bottom of the front page that shows the Headline News forum that has a link to go to the News Forum Index so people can see there is more news. Do you guys see what I am saying, lets say you read all the articles on the front page and you get to the end and it just ends, no kind of link for MOAR!
  • The Helper The Helper:
    Happy Wednesday!
    +1

      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