Thank you for visiting Blazing Games

Nothing new About the Bee Hive

I have covered the inventory system that this game uses before. Technically, assembling puzzles has also been covered before but my favorite sequence in this episode is the bee hive so for the code that will be examined this chapter I will take a look at how the bee hive puzzle was assembled.

The code in the room with the hive will make the hive and the bad guy visible if the hive has not been knocked down. If the hive has been knocked down, then it will check if the player has already obtained the flashlight. If the player does not have the flashlight then it is made visible.

west_btn.onRelease = toNearWoodsCenter;
badguy2_btn._visible = !beehiveKnockedDown;
badguy2_btn.onRelease = handleBadguy2;
hive_btn._visible = !beehiveKnockedDown;
hive_btn.onRelease = handleHive;
flashlight_btn._visible = !hasFlashlight;
flashlight_btn.onRelease = getFlashlight;
stop();

The actual handling of the hive simply bases what it does on the inventory mode. If no inventory item is selected it will display a hint. If a non-rock object is being used on it, you will be warned that your plan won't work. If the rock is used on it, then the knocked down flag gets set and the special animation sequence of the bad guy getting the bee hive knocked onto his head is played.

function handleHive()
{
var imode = inv_movie.getInventoryMode();

if (imode == INV27_NORMAL) {
converseSetText("A bee hive. If that criminal wasn't under it and there weren't angry bees flying around it, I'd climb up the tree and grab it as I am starving!", CONMODE_THINK);
converseAddBubble("Continue", CON27_HIDE);
converseStart();
} else if (imode == INV27_ROCK) {
hasRock = false;
beehiveKnockedDown = true;
gotoAndPlay("hive");
} else {
converseSetText("No. That won't work. I better think of something else!", CONMODE_THINK);
converseAddBubble("Continue", CON27_HIDE);
converseStart();
}
}

Previous page
Chapter 27 Page 4

About - Privacy Policy - Contact - Links - FAQ
Copyright © 2008 Blazing Games Inc. All Rights Reserved