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 02-08-2007, 10:31 PM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
Scripted ani+show ani destroy itself..

I have a scripted ani being shown by a weapon NPC.

I want that ani to hide itself after it's finished (i tried destroy() in the ani but it didn't work) so I thought I could do something like:

PHP Code:
showani(i,x,y,0,"ani",i); 
Then in the ani:
PHP Code:
SCRIPT
function onPlayerEnters() {
    
this.indexnum params[0];
    
setTimer(0.05);

}
function 
onTimeout() {
    
this.count++;
...
    if (
this.count == 100) {
         
with(findweapon("weapon")) {
             
hideimg(this.indexnum);
         }
    }
setTimer(0.05);

}
SCRIPTEND 
This causes an access violation... but as far as I can tell the logic is correct.


Is what I want to do possible?
__________________

Coming soon (Hopefully:P)
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:57 AM.


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