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
  #1  
Old 06-08-2005, 05:27 AM
calani calani is offline
Scriptess
calani's Avatar
Join Date: Aug 2003
Location: asmgarden.gmap
Posts: 606
calani is on a distinguished road
Send a message via AIM to calani
Multidimentional arrays

I recently started a project that should have been fairly simple - a rudimentary 2d gravity simulator. I was later going to make this into 3d and have some fun with it after i got the basics working.. however, I encountered a very annyoing problem: I couldn't get my array to work.
Hearing that GS2 had multidimentional array support (yes, I'm behind the times a bit due to being extremely busy), I arranged everything so it would be easy access and keep the script looking clean.

here's my array format:
objects_array={object,object,object,..}
object={image,{x,y},{dx,dy},{movable,mass}}

so, a sample two object array would be:
{{"crystalflash.gif",{3,-3},{-2,1.8},{1,500}},{"crystalflash.gif",{60,28},{-3,-1},{1,256}}

I haven't been able to get setarray( ) to work with this... I tried setting it to the number of sub-arrays, and then setting each individual array element, but reading them always returns a zero.


What am I doing wrong?
__________________
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 07:04 AM.


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