Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #16  
Old 08-15-2014, 03:45 AM
PiX PiX is offline
Registered User
PiX's Avatar
Join Date: Jul 2014
Posts: 9
PiX will become famous soon enough
For future references, this is how a particle emitter which follows the owner can be created in a gani file. Test by setting some attr of a player or npc to the gani file name including the file extension.
PHP Code:
GANI0001
SCRIPT
function onPlayerEnters() {
  
with (findimg(200)) {
    if (
this.iscreated)
      return;
    
player.0.5;
    
player.1;
    
attachtoowner true;
    
with (emitter) {
      
delaymin delaymax 0.05;
      
nrofparticles 1;
      
with (particle) {
        
lifetime 1;
        
image "block.png";
      }
    }
    
this.iscreated true;
  }
}
SCRIPTEND 
If you want to put the effect into a gani which also has animation part, you can put everything SCRIPT through SCRIPTEND at the end of the gani file. If it does not work, check in a npc script or weapon script that the emitter portion of your script actually works. Sometimes the behavior of certain code in a gani script can be unexpected, so be aware.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 10:23 PM.


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