Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-01-2002, 01:58 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
arrays

i was wondering what the number before the array is for, ie


this.arrayname = 0/{-2,0,2,0}

??
__________________
[signature]insert here[/signature]
Reply With Quote
  #2  
Old 06-01-2002, 02:23 AM
amonrabr amonrabr is offline
Scripter
Join Date: Nov 2001
Location: Brazil
Posts: 374
amonrabr is on a distinguished road
Re: arrays

Quote:
Originally posted by screen_name
i was wondering what the number before the array is for, ie


this.arrayname = 0/{-2,0,2,0}

??
its the number that its not an array..

this.a=1;
this.a={5,5,5}

so:
this.a = 1/{5,5,5}

this.a=1;
this.a[0]=5;
this.a[1]=5;
this.a[2]=5;
Reply With Quote
  #3  
Old 06-01-2002, 02:36 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
I wish we could use matricies using this
this.array[a+width*a] is getting tiresome. Id rather do
this.matrix[a][b]

But I think stefan is working on a more C++-ish Gscript. so All I can do is hope and wait.
__________________

subliminal message: 1+1=3
Reply With Quote
  #4  
Old 06-01-2002, 02:51 AM
BBflat BBflat is offline
Registered User
BBflat's Avatar
Join Date: Apr 2002
Location: United States of America
Posts: 573
BBflat is on a distinguished road
Quote:
Originally posted by Falcor
[B]I wish we could use matricies using this
this.array[a+width*a] is getting tiresome. Id rather do
this.matrix[a]

But I think stefan is working on a more C++-ish Gscript. so All I can do is hope and wait.
From what I heard, Stefan is avoiding any sort of object-oriented programming and C++ stuff. As far as I know, we won't get things like return functions, variable types, classes, switch statements, multidimensional vectors, etc. If we had them, we could do SO much more scripting-wise... =/
Reply With Quote
  #5  
Old 06-01-2002, 03:23 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
well, lets see

is there a way to clear a variable array without having to do

this.array = {0};??
__________________
[signature]insert here[/signature]
Reply With Quote
  #6  
Old 06-01-2002, 04:19 AM
amonrabr amonrabr is offline
Scripter
Join Date: Nov 2001
Location: Brazil
Posts: 374
amonrabr is on a distinguished road
Quote:
Originally posted by screen_name
well, lets see

is there a way to clear a variable array without having to do

this.array = {0};??
setarray this.array,;
Reply With Quote
  #7  
Old 06-01-2002, 04:22 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
this array={}; would probably work. although i never tried it. It might be more efficient then declaring the array all over again.
__________________

subliminal message: 1+1=3
Reply With Quote
  #8  
Old 06-01-2002, 06:40 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
o, dumb me, i should've figured that out, lol


thanks you guys
__________________
[signature]insert here[/signature]
Reply With Quote
Reply


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 04:01 PM.


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