View Single Post
DoubleGJ DoubleGJ's Avatar

JCF Member

Joined: Sep 2002

Posts: 3,049

DoubleGJ has disabled reputation

Aug 16, 2017, 09:27 AM
DoubleGJ is offline
Reply With Quote
Great, it works! I don't really need #3 since this is going to be a boss fight, so the gem ring spawn point will always be nearby. Right now the last thing I'm trying to figure out is creating a new hourglass shield a while after the current one is destroyed by touching it. I can't really find what's wrong in the code, but for some reason it makes the bee create new rings regardless if it already has one or not:

Code:
void testBee(jjOBJ@ bee) {

	
	if (bee.state == STATE::START || bee.counter == 255) {
		bee.counter = 0;
		bee.special = jjAddObject(192, 50, 50, 0, CREATOR::OBJECT);
		
	}

	bee.behave(BEHAVIOR::BEE);

	if (bee.state == STATE::ATTACK || bee.state == STATE::FLY || bee.state == STATE::IDLE) {
		jjObjects[bee.special].xPos = bee.xPos;
		jjObjects[bee.special].yPos = bee.yPos;
		if (jjObjects[bee.special].state == STATE::KILL) {
			bee.counter++;
		}
	}
	
	if (bee.state == STATE::KILL) {
		jjObjects[bee.special].behavior = BEHAVIOR::EXPLOSION2;
	}
}
__________________
"So unless I overwrote my heart with yours, I think not. But I might have." - Violet CLM

Two Games Joined releases:
Control / Splinter (twin singles)
|| Ballistic Bunny (EP)
||
Beyond (maxi-single)
|| Beyond: Remixed (remix EP)
|| Inner Monsters OST (mini-album)
||
Shadows (album)