Quote:
Originally Posted by AvalancheMaster
Single Player indeed. I included that line, but it still doesn't seem to work.
|
My bad; I overlooked the fact that your code was probably intended for SP and forgot to accommodate it accordingly.
The following script has been tested and works perfectly for me, so if this still doesn't work it means that there may be an error elsewhere in your script.
Code:
void onLevelBegin() {
for (int x = 0; x < jjLayerWidth[4]; x++) {
for (int y = 0; y < jjLayerHeight[4]; y++) {
if (jjEventGet(x,y) == AREA::SLIDE) {
jjOBJ@ o = jjObjects[jjAddObject(OBJECT::STEADYLIGHT, (x*32)+16, (y*32)+16)]; //add in middle of tiles
o.light = 20;
o.lightType = 3;
o.deactivates = false;
}
}
}
}
void onLevelReload() {
onLevelBegin(); //add lights again after death
}
|