25.12.2012 Views

Ultimate Game Design : Building game worlds

Ultimate Game Design : Building game worlds

Ultimate Game Design : Building game worlds

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

those warriors, who initially greeted you, to seek to your position on the map in a killing<br />

mood. The crowd trigger changes the warriors from a greeting state to a searchfor-player<br />

attack state.<br />

You can also use a crowd trigger less aggressively. A player might break a crowd<br />

trigger that causes warriors seated in a circle at their drums to start playing them. In<br />

this case, the crowd trigger simply tells the warrior actors to change from their<br />

seated-at-drum animation state to their playing-the-drums animation state. The<br />

crowd trigger also triggers an audio trigger (the warrior’s drum sounds).<br />

Many triggers “cascade” like this. A crowd trigger triggers an animation and audio<br />

trigger, which might trigger a particle event (for example, the fire starts to grow as the<br />

warrior drummers play their drum music).<br />

Here’s a sample script for controlling a given number of warriors, making them aware<br />

that the player has taken a sacred object from their village, and making them seek out the<br />

player in a killing mood:<br />

Weather Effects<br />

// JavaScript sample of "crowd" trigger support<br />

if(player.pickedUp(sacredObject)) {<br />

for(var n=0;n

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!