Arrays??

  • Thread starter Thread starter Khanaris
  • Start date Start date
they allow your variables to have "slots", meaning that you can store multiple values inside them.

e.g.

integer variable:

i = 4

I can only store 1 value in that variable!


integer variable array:

i[0] = 4
i[1] = 5
i[2] = 7
i[3] = 12

I can store multiple values into whatever slots of the array I desire. you can have as many slots as you like, though I think the editor limit might be 1024.
 
Arrays were confusing for me at first too; here's an example of how u would use them:
If I wanted to make a Paintball map and display text containing a player's name whenever a player died, I would make a string variable called "Playername" and I would make it an array. Then I would do in an action of a trigger:
Set Playername[1] = Name of player 1
Set Playername[2] = Name of player 2
Set Playername[3] = Name of player 3
(and so on...)
Then in another trigger I would put:
Event - Player-owned unit event: A unit owned by (Player 1) (dies)
Action - Game Display text: Function: Concatenate Strings:
(Playername[1]) + (just got burnt).
It would display in-game "Blademaster_X just got burnt" if I was player 1 and my unit died.

Arrays allow one variable to store multiple values; so now u dont have to make a myriad of variables.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Real users can't really disable Javascript anymore these days.
  • Ghan Ghan:
    The internet is broken without it.
  • Ghan Ghan:
    Bot readable, not human usable.
  • The Helper The Helper:
    got it
  • The Helper The Helper:
    Happy Thursday!
  • The Helper The Helper:
    Check out the new Featured Content feature we apparently got with the forum software upgrade! https://www.thehelper.net/featured/
  • The Helper The Helper:
    Also on the bottom right side bar we now have a Trending Content Box!
    +1
  • The Helper The Helper:
    Not on the Headline News page just on the Forums page can we get that Featured and Trending on the home page?
  • Ghan Ghan:
    Since the home page is technically a forum, it now shows on all forum views. Still in the sidebar.
    +1
  • The Helper The Helper:
    Happy Friday! Hope everyone has a fantastic day and an even better weekend!
  • The Helper The Helper:
    Happy Sunday!
  • The Helper The Helper:
    I lovc that I can post webp and X links now! :)
  • The Helper The Helper:
    Happy Thursday!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top