Here's how I did this. Let's start with the easiest bit, creating actors that aren't actually in the actor list. IF supports the idea of a hidden actor. Placing an invisible actor on top of an object on the map (the grain and the bunny in this example) allows you to apply a script to anything in the game. Let's look at our actors one by one, starting with the simplest, Sir Robin.
Click for larger image |
Click for larger image |
- If he's been appeased, head for node 4, a simple fluffy bunny dialog.
- If he hasn't been appeased, head for node 2, which describes the fierce guard bunny, and offers the opportunity to feed him.
- If you try to feed him without the grain, the action fails, leading to node 6
- If you have the grain, the Appease the Bunny task gets flagged as finished in node 8, then the happy node 7 response is displayed.
Click for larger image |
Now there are a couple things to note here. First I've only used the unset and finished states of the two tasks involved. This is fine, but when you do it, just be sure you treat the unused state consistently. I've treated started as finished, so if I accidentally trigger the task somewhere else it doesn't break anything. I've also been pretty sloppy with the Take Grain task here. If I were being picky I could reset the task to unset when you feed the rabbit, and have a third task to track the status of the grain pile itself. In this case the extra work isn't necessary, but using a tracking task for object state that's separate from the activity tracking task is sometimes necessary. More on that in a future post.
I think that about covers the bases for a simple guard creature tutorial. I hope you've found this useful. If so you can find other tutorials in the Island Forge tag. Enjoy!
No comments:
Post a Comment
Note: all comments are moderated to block spammers. Please be polite.