| Blockland Forums > Modification Help |
| Scriptobjects |
| << < (2/3) > >> |
| Iban:
--- Quote from: HellsHero on March 14, 2011, 01:41:12 PM ---Thanks for the quick replies, I really had no idea of what I should have been doing. --- End quote --- Are you cataloging a single piece of information, or are you doing objects? |
| Truce:
--- Quote from: Iban on March 14, 2011, 01:40:06 PM ---I have never seen a ScriptGroup/SimSet/SimGroup ever shuffle the list of objects. Provide an example on how to produce this. Edit: You're right, but it doesn't shuffle, it just sticks the last object in the list in the place that the recently deleted object was in. --- End quote --- Ah yeah, I wasn't sure exactly what it did. I just knew I had been screwed over by it in the past. --- Quote ---==>new ScriptGroup(A_Group); ==>for(%i = 0; %i < 10; %i++) { %obj = new ScriptObject() { letter = getSubStr("ABCDEFGHIJ",%i,1); }; A_Group.add(%obj); } ==>function list() { for(%i = 0; %i < A_Group.getCount(); %i++) echo(A_Group.getObject(%i).letter); } ==>list(); A B C D E F G H I J ==>echo(6772.letter); F ==>A_Group.remove(6772); ==>list(); A B C D E J G H I --- End quote --- |
| HellsHero:
--- Quote from: Iban on March 14, 2011, 01:43:45 PM ---Are you cataloging a single piece of information, or are you doing objects? --- End quote --- Just one piece of information. |
| Iban:
--- Quote from: HellsHero on March 14, 2011, 01:45:17 PM ---Just one piece of information. --- End quote --- I wouldn't go with SG/SS/SGs, then. I'm sure Truce has a ScriptObject that can do that. However, if the information is anything more complex than just a list, I'd go with the fancy stuff. |
| HellsHero:
--- Quote from: Iban on March 14, 2011, 01:46:35 PM ---However, if the information is anything more complex than just a list, I'd go with the fancy stuff. --- End quote --- Using your fancy way, how do I refer to a ScriptObject that's in a ScriptGroup? |
| Navigation |
| Message Index |
| Next page |
| Previous page |