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-03-2002, 04:47 AM
zallus-k zallus-k is offline
Registered User
Join Date: Sep 2001
Location: AC0265, Zaroke
Posts: 122
zallus-k is on a distinguished road
Dumb String Array Question

NPC Code:

function destroyBoxes() {
if(strtofloat(#I(clientr.boxes,0))>=1 && mousedown && leftmousebutton && !noclose) {
for(this.i=1;this.i<=strtofloat(#I(clientr.boxes,0 ));this.i++) {
if(mousescreenx in |strtofloat(#I(clientr.boxes,this.i*2-1))+189,strtofloat(#I(clientr.boxes,this.i*2-1))+198| && mousescreeny in |strtofloat(#I(clientr.boxes,this.i*2))+3,strtoflo at(#I(clientr.boxes,this.i*2))+16|) {
set noclose;
deletestring clientr.boxes,strtofloat(#I(clientr.boxes,this.i*2-1));
deletestring clientr.boxes,strtofloat(#I(clientr.boxes,this.i*2-1));
replacestring clientr.boxes,0,#v(strtofloat(#I(clientr.boxes,0))-1);
unset noclose;
}
}
}
}



Can anyone suggest what this code needs, besides cleaning up? Currently, it'll only work (to delete a box object) if there is something at the x,y coordinates specified, and even then it'll only delete the end box. Anyone have an idea? Also, the strings are a necessity, as the script is multi-level.
__________________

Solemn Destiny - Owner
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 12:01 AM.


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