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 02-26-2011, 08:20 PM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
Script crashed my systems.

So I was working on a buff that gave a particle effect that only the person with it could see. it was going fine, I just needed to figure out a way to stop the particles when the buff wore off.

So I did function doEffect(cmd){}
this housed the particle script, and if the player didn't have the buff, then cmd would == "destroy". it would then do:
with(findimg(200)){
with(emitter){
this.destroy();
}
}
return;

Once that ran, some problems came up and I immediately removed that portion of the script. my GUI that showed the player's current buffs vanished, but the script is still in the weapon. And I didn't identify any missing weapons.
Two more things are broken that I've seen so far. Major things.
1: I can no longer place buffs on myself.
2: I have GUI that pops up once you hit a certain level and it lets you pick your element. the GUI shows up fine, but the list doesn't show.

The biggest problem is, that because of whatever the hell happened, I can't get these scripts back on-line. I've tried updating the scripts, reconnecting, restarting my client, and restarting the NPC-server. all to no avail.

What happened to my scripts? and how can I get them working again?
__________________
MY POSTS ARE PRONE TO EDITS!

Last edited by Jiroxys7; 02-26-2011 at 08:35 PM..
Reply With Quote
  #2  
Old 02-26-2011, 08:36 PM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
Seems that this.destroy() deleted the weapon from my attributes. This fixed everything that broke. I figured that this.destroy() was going to destroy the emitter. So problem solved. I just freaked out. Sorry about that.

While I'm on the subject though, is there a way to destroy the emitter? I'm also concerned about any other images that might be using that index. or does it only count the images in it's own script? (since ive noticed that ganis with showimg(200) don't interfere with eachother)
__________________
MY POSTS ARE PRONE TO EDITS!
Reply With Quote
  #3  
Old 02-26-2011, 09:10 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Set emitter.emitautomatically to false instead of destroying it.
Reply With Quote
  #4  
Old 02-26-2011, 09:31 PM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
Quote:
Originally Posted by Crow View Post
Set emitter.emitautomatically to false instead of destroying it.
Ah, of course. Thank you, Crow.
__________________
MY POSTS ARE PRONE TO EDITS!
Reply With Quote
  #5  
Old 02-26-2011, 09:40 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Also (was in a hurry when I made the other post): You're right about every script having access to all image indexes, not interfering with other scripts using the same ones.
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:23 PM.


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