Snippet GUI: Triggering for Dummies (records)

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
GUI - Triggering for Dummies (records)

Prerequisits:

Alright, in this brief tutorial i will explain records. Essentially a record is a way to store many variables under 1 variable type with 1 index. In WC3 Jass these are called structs. In order to create one you right click the left column for triggers and go down to new -> new record. When you select the record it will have 1 option, variables. It can store as many variables as you want, you dont want to have these variables as arrays because that takes up a lot more data and they will have arrays in the record.

Now once the record is created if you select a trigger, create a local variable a and set the variable type to record, then you will have a pulldown menu for your records, this will be grayed out if you only have one. create a new action: Set Variable, then select the local variable you created named a, you will get something like this: Set a.Member = value
now if you select the Member part of the action you will be able to set any of the variables inside the record to the member and then you will be able to set the value based on that variables type. This was just the demonstration now well get into real uses.

attachment.php


attachment.php


Now create a new record called Hero Data, put whatever variables you want in it including a Unit, this is great for creating custom data for heroes, (ie: Attributes, Stats, Talent Tree Info, w/e u can think of). Now create a new variable and name it Hero Something (data, info, who cares) set the type to the record: Hero Data and set the max array to 15 (max players +1 for 0) Now from here on you can save Hero Data[Player number of Owner].Your variables = whatever you want and access that easily

attachment.php


These can be used to store MASSIVE ammounts of info, the limits in wc3 were 8190 indexes or max array but i am not sure about sc2. They are great for organizing information and saving it for every object in game if not almost every object. Make sure to clear any data that you are no longer going to be using though because it will take up ram if not cleared before it is recycled.

This goes on to:
  • WIP
 

Attachments

  • untitled3.bmp
    32.2 KB · Views: 1,195
  • untitled.bmp
    917.7 KB · Views: 1,357
  • untitled2.bmp
    27.1 KB · Views: 1,160
General chit-chat
Help Users
  • No one is chatting at the moment.
  • jonas jonas:
    I don't think the Republicans will get rid of income tax, at most lower it a little, mostly for people with 6 figures+. But that's just my opinion
  • The Helper The Helper:
    one can dream
  • Ghan Ghan:
    FairTax would be nice.
  • Ghan Ghan:
    But the electorate would have to demand it and vote people in to do it.
  • Ghan Ghan:
    Government spending, foreign policy, and the southern border are all bigger issues than the income tax right now I'd say.
  • The Helper The Helper:
    For you those are the bigger issues. Cannabis legalization and get rid of Income tax are mine.
  • Ghan Ghan:
    We have so much cannabis up here in Oklahoma. Can't go a block without running into 3 dispensaries. xD
  • The Helper The Helper:
    if the demand is there
  • jonas jonas:
    I think the biggest issue in USA is how divided the country has become
  • Ghan Ghan:
    There's a big split happening in fundamental values that is very worrisome.
  • jonas jonas:
    I think there's always been a split in values. But now there's a split in what reality is. No matter whom you ask, they think a third of the country is insane and wants to destroy the country
  • The Helper The Helper:
    pretty big split
  • The Helper The Helper:
    Happy Saturday!
    +1
  • V-SNES V-SNES:
    Happy Saturday!
    +1
  • The Helper The Helper:
    Dont forget to check out the list of all the recipes on the site at the Recipe Index - I am about to take Ghan up on the offer of making that a site :) https://www.thehelper.net/threads/main-recipes-menu-recipes-index-version-2-0.189517/
  • The Helper The Helper:
    We should add that as part of site navigation
  • Varine Varine:
    I just don't think Trump actually understands how the government works. I'm not going to pretend like I can understand the entirety of government but in my industry he kind of caused massive fucking issues. Tarriffs and the international counters had a pretty significant impact on what I do, it was actually kind of interesting to see though. I live in Idaho so I'm not really concerned with it, it'll be R pretty much the entire way down. We do have ranked choice on our ballot this year though and I DO really care about that. But if we are going to have a federal government we kind of need income tax. They could abolish it and tax states I guess, but then states are just going to raise income taxes. It's not really viable without a very significant and holistic overhaul of how the federal government works, and that isn't something I would expect Trump to do.
  • Varine Varine:
    I don't expect Harris to do it either. I want to see wealth and church taxes, but those also aren't things I'm going to hold my breath for.
  • jonas jonas:
    I mean he definitely doesn't, which is why he had to retract most of his executive orders, didn't manage to get rid of obamacare etc.
  • jonas jonas:
    B
  • jonas jonas:
    Replacing income tax with a wealth tax would be amazing imho, but I can't even imagine that this would happend
  • Ghan Ghan:
    Wealth tax would be a disaster. Imagine having to liquidate retirement accounts because you have a tax bill just for unrealized gains. Or your house goes up in price and you have to sell it to pay the tax bill.
  • jonas jonas:
    I'm not talking about an income tax on wealth gain.
  • jonas jonas:
    we already have a wealth tax on our house, it's called a property tax. I'm talking about extending that to other income-generating assets like private equity, bonds and stocks.
  • jonas jonas:
    I agree that the effect of that would be to depress asset prices, but I think that's a good thing. Makes it easier for hard working young people to grow their retirement income
    +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