Friday, March 2, 2012

New Feature (1.12): specialCaseIsDoorTrigger

This is currently a placeholder until I have the time to flesh it out with more details and screenshots.

Go back to main tutorial page

While working with your High Hrothgar cell, I noticed that it would be nice to be able to easily enable/disable all the lights attached to balls that are attached to specific controllers when the player enters/leaves the cell.

You can do this easily in 1.12, and here's how:

1) Create a LightingBallController without any LightingBalls.

2) Position it near a door, so that the player is inside it whenever s/he uses the door.

3) Set its specialCaseIsDoorTrigger property to True, and then rig some ALREADY EXISTING LightingBalls to it (or make new ones, whatever's easier for you).

So, now there's no need to use a 3rd and/or 4th helper script near or on the door itself. I'll explain how it works:

Now whenever the player enters the cell using that door, it will enable any lights attached to those balls.

Also, (and this is more than half the point) whenever the player leaves the cell, it will also disable any lights attached to those balls... very useful when there multiple entrances/exits.

When using specialCaseIsDoorTrigger, that's all that controlller does -- nothing more. And, due to how everything works together, you shouldn't need to actually create any additional balls (In v1.1+, commands propogate down through ball chains).

While doing this is most useful when the cells has multiple exits/entrances, that's still most of cells in the game.

Go back to main tutorial page

No comments:

Post a Comment