View Single Post
Love & Thunder Love & Thunder's Avatar

JCF Member

Joined: Sep 2011

Posts: 1,101

Love & Thunder has disabled reputation

Jan 11, 2015, 01:08 AM
Love & Thunder is offline
Reply With Quote
Ah, I thought it would be something simple like that.

Thank you very much.

EDIT:
Now having trouble adding a second wave to the surge.
I've added the following code:
Code:
} else if (slain < 30) {
    if (elapsed % 60 == 0) { //Once every just less than a second.
        uint16 randomTargetA = (237 + (jjRandom()%10)) * 32;
        jjOBJ@ obj = jjObjects[jjAddObject(OBJECT::FLOATLIZARD, randomTargetA, 1024)];
        obj.state = STATE::FALL;
        obj.var[5] = 0;
        obj.scriptedCollisions = true;
        obj.bulletHandling = HANDLING::DETECTBULLET;
    } else if (elapsed % 70 == 0) { //Once every second
        uint16 randomTarget = (237 + (jjRandom()%10)) * 32;
        jjOBJ@ obj = jjObjects[jjAddObject(OBJECT::BAT, randomTarget, 1008)];
        obj.scriptedCollisions = true;
        obj.bulletHandling = HANDLING::DETECTBULLET;
    }
} else { //slain >= 30: surge is over
But the bats spawned don't take damage.
EDIT 2: They can be killed with special attacks, but not bullets. Either way, though, they don't trigger the onObjectHit code.
EDIT 3: By removing the bullet handling part, I've fixed them being invulnerable to bullets, but they still don't activate the onObjectHit code.
EDIT 4: For debugging purposes, I've added the following code in the onObjectHit part, which should trigger every time I hit a bat:
Code:
if (object.eventID == OBJECT::BAT) {
    jjLocalPlayers[0].showText("@@@@@HIT", STRING::LARGE);
}
But it doesn't. This proves that it's not triggering the onObjectHit thing.
EDIT 5: Tried swapping the bats out for ravens. Still didn't work.
__________________

Last edited by Love & Thunder; Jan 11, 2015 at 03:16 AM.