Just wondering how does an element check the ctype/life/tmp, etc... of itself I'm making a force field element here's my current code:
//#TPT-Directive ElementHeader Element_FFLD static int update(UPDATE_FUNC_ARGS)
int Element_FFLD::update(UPDATE_FUNC_ARGS)
{
int r, rx, ry;
int temp = Temperature;
for(rx = -1; rx<2;rx++)
for(ry=-1;ry<2;ry++)
if(BOUNDS_CHECK)
{
r = pmap[y+ry][x+rx];
if (!r || (r&0xFF) == PT_FFLD)
r = sim->photons[y+ry][x+rx];
if (!r)
continue;
//CHECK TMP HERE SO IT CAN DO DIFFRENT EFFECTS
parts[r>>8].type = FIRE;
}
}
return 0;
}
Could you please give me an example of how it's used? I'm new
I'm not an expert, it's probably actually sim.
EDIT: parts[i].tmp
is the value. I'm more into lua
EDIT again: so erm, if(parts[i].tmp == 0) {
// do stuff
}
EDIT again...: i is the index of the currect particle.
Thanks
Also anyone know how to debug (run without compiling) in visual studio 2013)
As in which file to open to run with