The Dink Network

Reply to Re: Array, away?

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:
 
 
October 23rd 2009, 08:48 AM
fairy.gif
Someone
Peasant He/Him Australia
 
Yeah, you can make arrays with editor_seq/frame. You don't have to not have any editor placed sprites though. As long as the editor_seq/frame isn't being used for other purposes (and if I remember correctly, changing ed_seq/frame doesn't have any effect on the sprite unless editor_type is not default?)

Adding arrays won't necessarily be so hard. I've got a feeling it's possible to add array support to 1.08 with a single line, just by making dink.exe parse the sp_custom() variable name like it parses the say() string. That is, if &n = 1, then sp_custom("var&n",1) will read the variable "var1" instead of "var&n" as it does now. Another relatively easy way would be to add array functions.. eg. array(array,index,value). However, trying to get dink.exe to recognise &myarray[13] for example, would probably be a lot harder, and you would risk introducing bugs.

Anyway, the main problem with editor_seq/frame array is they are small (max 100, but may be safer to just use editor numbers in the range of 30-99 if you have editor placed enemies/barrels/etc), but if they're too small for your purposes it's likely you are trying to do something too complicated for Dink anyway..