View Single Post
AvalancheMaster AvalancheMaster's Avatar

JCF Member

Joined: Sep 2013

Posts: 89

AvalancheMaster is doing well so far

Jul 20, 2014, 06:05 PM
AvalancheMaster is offline
Reply With Quote
Quote:
Originally Posted by Violet CLM View Post
Code:
void onLevelLoad() {
	jjWeapons[WEAPON::BLASTER].maximum = 35;
	jjWeapons[WEAPON::BLASTER].infinite = false;
}
I would think?
No, it didn't work. But I managed to find a workaround with several ifs doing the job.

However, I've got another problem at hand. I'm trying to tint the ball platform to blue, but when I put jjObectPresets[OBJECT::BOLLPLATFORM].behavior = IceballPlatform; in onLevelLoad, no part of the code loads up. I even tried it with the simple rat example, given in the AngelScript guide (void MyRat(jjOBJ@ rat) {rat.behave(BEHAVIOR::LABRAT);}). It didn't work as well.

Here's the relevant part of the code:

Code:
onLevelLoad(){
	jjObectPresets[OBJECT::BOLLPLATFORM].behavior = IceballPlatform;
}
void IceballPlatform(jjOBJ@ plat) {
	plat.behave(BEHAVIOR::PLATFORM, false);
	jjDrawSpriteFromCurFrame(plat.xPos, plat.yPos, plat.curFrame, plat.direction, SPRITE::TINTED, 151);
}