Quote:
|
Originally Posted by Python523
|
Heyyyyyyy.... I get it now. Thanks Jagen!!! ^-^
Quote:
|
Originally Posted by jake13jake
I'm not a good scripter  . Storm remade my entire toy spaceship (which is now in the GC Prize Box on Classic as "Space Storm") from scratch, lmao, and it had like 3 less bugs and like 1000 less lines... lmao. Actually... I think I took it out of the closet and dusted off 1000 lines of my own before I gave up on it again, and then showed it to Storm. That was a pretty good thinking/learning script for me. So is my tailor script that I made, that works alright, but is unnecessarily big such as the toy spaceship was. It was a good learning script though. It taught me like what stuff to do and not to do in making a menu (like a weapons list, for instance). My #1 problem in scripting is that I can't do onwall checks for crap. My other problem is that I haven't grasped how to use arrays, which is probably because it isn't the kind of thing I use in every script I make. It's a shame someone can mention Kat and Malinko, though. Especially Kat. Kat isn't by any means a great scripter. He'll reply whining about me, I swear he will.
|
Arrays are simple...
To set an array (variable);
NPC Code:
setarray arrayname,length; // or
arrayname = {12,18,25,...};
To access them
NPC Code:
arrayname[index] // ie.
arrayname[0] = 5;
Indexes start with 0, so
NPC Code:
this.test = {5,10,15,29};
say2 I-1: #v(this.test[1]) | I-0: #v(this.test[0]);
It would show a sign that looks like;
I-1: 10 | I-0: 5
Understand somewhat?