hi guys
when i compile my game with this wdl file included in my main i get an error saying
var number_of_particles = nop;
forcefield.wdl (32.3) error(12) number sytax skill1
var particle_distance = pd;
forcefield.wdl (32.4) error(12) number sytax skill1
can anyone help with this
thanks
code is bellow
bmap redflare_pcx = <redflare.pcx>;
///////////////////////////////////////////////////////////////////////////////////////////////////////
DEFINE nop,skill1; //current HEALTH units
DEFINE pd,skill2; //current ACORNS units
///////////////////////////////////////////////////////////////////////////////////////////////////////
function particle_barrier();
function keep_particles();
function kill_them();
///////////////////////////////////////////////////////////////////////////////////////////////////////
action killer
{
my.invisible = on;
my.enable_impact = on;
my.enable_entity = on;
my.event = kill_them;
}
action force_field
{
var number_of_particles = nop; // number of particles (force field length)
var particle_distance = pd; // distance between two consecutive particles
if (my.nop == 0) {number_of_particles = 600;} // default number of particles
if (my.pd == 0) {particle_distance = 0.2;} // default distance between two consecutive particles
vec_set (temp, my.pos);
while (number_of_particles > 0) // don't use a wait(1) here
{
temp.x += particle_distance * cos(my.pan);
temp.y += particle_distance * sin(my.pan);
effect(particle_barrier, 1, temp, normal);
number_of_particles -= 1;
}
}
function particle_barrier()
{
my.bmap = redflare_pcx;
my.flare = on;
my.bright = on;
my.size = 10;
my.function = keep_particles;
}
function keep_particles()
{
my.lifespan = 10; // keep the particle alive
my.alpha = 30 + random(70); // show some activity
}
function kill_them()
{
wait (1);
if (you != null)
{
you.health = -10;
}
}