A new version for Windows and Linux has been released. Sorry to the Mac users, we are still working on some speed improvements for Graal 3D and the microphone support.
Updates:
- Fixed a problem with disappearing npcs when reentering a level after more than 5 minutes and having active npcs there
- Fixed the position of gani-sounds on maps and gmaps
- Particle engine: it is possible to let showimgs automatically follow the player, npc or projectile by using the attachtoowner variable:
PHP Code:
with (findimg(200)) {
attachtoowner = true;
attachoffset = {0,0,0};
}
'attachoffset' is optional. This new variables can be used to let a showimg, or a particle emitter of a showimg (showimg.emitter) automatically follow the player or npc, and so making the scripting of particle effects simplier (also works in gani scripts, just create a particle effect on the playerenters event).
- Particle engine: using the new emitter.continueafterdestroy flag (true or false) you can let the particles smoothly fade out - by default all showimgs and particles are removed once the object (player, npc, projectile) is disappearing; with this option the existing particles will continue to fly, but new particles are not emitted.
A simple effect for projectile ganis (shoot command):
PHP Code:
SCRIPT
function onPlayerEnters() {
with (findimg(200)) {
attachtoowner = true;
layer = 2;
// Emitter attributes
emitter.continueafterdestroy = true;
emitter.delaymin = 0.05;
emitter.delaymax = 0.05;
emitter.nrofparticles = 1;
// Basic particle attributes
emitter.particle.lifetime = 3;
emitter.particle.image = "g4_particle_smoke.png";
emitter.particle.mode = 1; // alpha transparent
emitter.particle.alpha = 0.8;
emitter.particle.zoom = 1;
// Movement
emitter.particle.angle = pi / 2;
emitter.particle.speed = 8;
emitter.addglobalmodifier("range", 0, 100000, "movex", "add", -4, -5);
emitter.addglobalmodifier("impulse", 0.2, 0.2, "spin", "multiply", 0.9, 0.9);
emitter.addlocalmodifier("once", 0, 0, "angle", "add", -0.2, 0.2);
emitter.addlocalmodifier("once", 0, 0, "rotation", "replace", 0, 2*pi);
emitter.addlocalmodifier("range", 1, 3, "alpha", "replace", 0.8, 0);
emitter.addlocalmodifier("range", 0, 3, "zoom", "add", 0.25, 0.25);
emitter.addlocalmodifier("range", 0, 0.5, "speed", "replace", 12, 4);
emitter.addlocalmodifier("range", 0.5, 3, "speed", "replace", 4, 1.5);
emitter.addlocalmodifier("once", 0, 0, "spin", "replace", 2, 4);
}
}
SCRIPTEND
- More gani effects:
PHP Code:
ROTATEEFFECT sprite angle
STRETCHXEFFECT sprite factor (default 1)
STRETCHYEFFECT sprite factor (default 1)
Works similar to the showimg and particle attributes rotation, stretchx and stretchy.