Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #25  
Old 07-17-2004, 04:49 AM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
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?
__________________
V$:CONFL16T
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:24 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.