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 10-02-2011, 04:19 AM
pig132 pig132 is offline
professional troll
Join Date: May 2006
Posts: 260
pig132 will become famous soon enough
Problem with moving a class-npc

So I have something made in a class-npc (a particle effect, placed in a weapon with putnpc2) and I would like the entire NPC to be moved by any means. (ive tried all ways and only setting its x and y work but they reset the particle). Anyways, I'm looking for a way to move the npc smoothly preferably with the move() function but it does not seem to be working...

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
setshape(13232);
  
with (findimg(1)) {
    
with (findplayer("pig132")) {

      
player.x;
      
player.y;
      
      
layer 2;
      
      
emitter.delaymin 0.1;
      
emitter.delaymax 0.1;
      
emitter.nrofparticles 2;
      
emitter.maxparticles 100;
      
      
emitter.particle.lifetime 4;
      
emitter.particle.image "g4_particle_tornado.png";
      
emitter.particle.mode 1;
      
emitter.particle.zoom 1;
      
emitter.particle.alpha 0.3;
      
      
emitter.particle.angle pi 2;
      
emitter.particle.speed 4.8;
      
emitter.addglobalmodifier("once"00"angle""add"00);
      
emitter.addemitmodifier("impulse"00"movex""replace", -0.750.75);
      
emitter.addlocalmodifier("once"00"rotation""replace"07);
      
      
emitter.addlocalmodifier("once"00"zoom""replace"0.60.6);
      
      
emitter.addlocalmodifier("once"00"spin""replace"8.310.3);
      
emitter.addlocalmodifier("range"0.154"zoom""add"0.22);
      
emitter.addlocalmodifier("range"33"alpha""replace"0.50.1);
    }
  }

not sure if it really matters but there is my code. using move() does not work at all
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 01:47 PM.


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