The Dink Network

Reply to Re: Bah

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
January 23rd 2014, 10:09 AM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
I have 80 squares on screen and each one messes with a number of different variables, like position of said square. A start script fills the screen with 80 50x50 large square sprites and attaches a script to each one. Right there it's a truckload of variables being used in each of those scripts.
All these squares has a global variable, &s1, &s2 etc. for various things.


You absolutely don't need all of that to make it function. Instead of storing the information of each square in variables, you should just store it in sprite properties like hitpoints, gold, defense, ... You won't be using those properties for their normal purpose anyway. So, in other words, you really only need one variable to store them away the first time. You also shouldn't identify the 80 squares as globals, that's way too many. Instead, give them a fake brain to track them.