View Single Post
A.I.T.

JCF Member

Joined: Feb 2014

Posts: 2

A.I.T. is doing well so far

Mar 11, 2014, 06:19 AM
A.I.T. is offline
Reply With Quote
Is there any way of giving objects shields(namely enemies so that they can shoot with them and pickups so that they hurt the player upon contact until shieldTime runs out)?

I have disabled the functions of the fire shield so far:


void onLevelLoad() {
jjObjectPresets[OBJECT::FIRESHIELD].behavior = Incendie;
}

void Incendie(jjOBJ@ boule) {
boule.behave(BEHAVIOR::MONITOR, false);
if (boule.state == STATE::KILL) boule.state = STATE::ACTION;
}
void onPlayer(jjPLAYER@ play) {
if (play.shieldType == 1) play.shieldTime = 0;
}

Pointing out the position of the specific object afterwards does not seem to work. Besides, I have gone through about 80 animations in the ''Pickups'' section and still have not found one of an active shield. I suppose the parameters shieldType and shieldTime should also somehow be added to the jjOBJ class(?).

Thank you in advance!