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;
x = player.x + 0.5;
y = player.y + 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.