• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Help with programming ENUM for Game Maker 8.1

D

dharrison

Guest
Hi there makers!

I need some ideias on how to make a custom script that emulates enumerator (enum) in GM 8.1
I've tried to create a script with 2D Arrays that stores a value and enumerates it, but I wasn't successful.

The logic is:
  • Name your enumerated list
  • Store X values
  • Assign int numbers to each value
  • Return the number if the list and the value is called by an object

Any tips on how to do that?
 

FrostyCat

Redemption Seeker
You can't directly measure the length of an array or pass them around in legacy GM 8.1, that was introduced in GMS 1.3. You should use ds_list instead.
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
To be more specific, attempting to assign or return an array in GM8.1 will instead assign/return the first item, which might explain any unusual side effects that you might be seeing.
 
Top