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(1, 32, 32);
with (findimg(1)) {
with (findplayer("pig132")) {
x = player.x;
y = 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", 0, 0, "angle", "add", 0, 0);
emitter.addemitmodifier("impulse", 0, 0, "movex", "replace", -0.75, 0.75);
emitter.addlocalmodifier("once", 0, 0, "rotation", "replace", 0, 7);
emitter.addlocalmodifier("once", 0, 0, "zoom", "replace", 0.6, 0.6);
emitter.addlocalmodifier("once", 0, 0, "spin", "replace", 8.3, 10.3);
emitter.addlocalmodifier("range", 0.15, 4, "zoom", "add", 0.2, 2);
emitter.addlocalmodifier("range", 3, 3, "alpha", "replace", 0.5, 0.1);
}
}
}
not sure if it really matters but there is my code. using move() does not work at all