-
Notifications
You must be signed in to change notification settings - Fork 1
Handy Dandy Guide to Actors
(Animals can roam around to different locations, actors have to stay in a single location)
-
Use the Actor or Animal command:
Actor_or_Animal()
Example for Actors:
Actor()
Example for Animals:
Animal() -
Insert the name of your new character:
Actor_or_Animal("name of character")
Examples:
Actor("angry elf")
Animal("sad polar bear") -
Store your new character in a variable:
actor_or_animal_variable = Actor_or_Animal("name of character")
Examples:
angry_elf = Actor("angry elf")
sad_polar_bear = Animal("sad polar bear")
-
Type in the actor or animal variable:
actor__or_animal_variable
Examples:
angry_elf
sad_polar_bear -
Attach the set_location command to it:
actor_or_animal_variable**.set_location()**
Examples:
angry_elf.set_location()
sad_polar_bear.set_location() -
Add the location_variable of the starting location:
actor_or_animal_variable.set_location(location_variable)
Examples:
angry_elf.set_location(playground)
sad_polar_bear.set_location(upstairs)
-
Choose what actor variable you want to attach a special command to:
actor_or_animal_variable
Examples:
angry_elf
sad_polar_bear -
Attach the add_phrase command to it:
actor_or_animal_variable**.add_phrase()**
Examples:
angry_elf.add_phrase()
sad_polar_bear.add_phrase() -
Add the in-game command as the first piece of info needed by the add_phrase command:
actor_or_animal_variable.add_phrase("in-game command")
Examples:
angry_elf.add_phrase("chat")
sad_polar_bear.add_phrase("chat") -
Add the Say command (Yes, we're putting a command INSIDE another command!): actor__or_animal_variable.add_phrase("in-game command", Say())
Examples:
angry_elf.add_phrase("chat", Say())
sad_polar_bear.add_phrase("chat", Say()) -
Add what the game says when the in-game command is used:
actor_or_animal_variable.add_phrase("in-game command", Say("What the game will say."))
Examples:
angry_elf.add_phrase("chat", Say("The angry elf glares at you as you attempt to start a conversation."))
sad_polar_bear.add_phrase("chat", Say("The polar bear groans sadly."))
-
Use the game variable:
game_variable
Example:
game -
Add the add_actor command to it:
game_variable**.add_actor()**
Example:
game.add_actor() -
Add the actor or animal variable:
game_variable.add_actor(actor_or_location_variable)
Examples:
game.add_actor(angry_elf)
game.add_actor(sad_polar_bear)
-
Type in the animal's variable:
animal_variable
Example:
sad_polar_bear -
Attach the set_allowed_locations command to it:
animal_variable**.set_allowed_locations()**
Example:
sad_polar_bear.set_allowed_locations() -
Add a list of location variables to the set_allowed_locations command. A list is made by using square brackets []. Each item in the list is separated by commas [list_item1, list_item2, list_item3]:
animal_variable.set_allowed_locations([location_variable1, location_variable2, location_variable3])
Example:
sad_polar_bear.set_allowed_locations([upstairs, vestibule,front])
-
Choose what item, actor, or animal variable you want to attach a special command to:
item_actor_or_animal_variable
Examples:
red_ball
angry_elf
sad_polar_bear -
Attach the add_phrase command to it:
item_actor_or_animal_variable**.add_phrase()**
Examples:
red_ball.add_phrase()
angry_elf.add_phrase()
sad_polar_bear.add_phrase() -
Add the in-game command as the first piece of info needed by the add_phrase command:
item_actor_or_animal_variable.add_phrase("in-game command")
Examples:
red_ball.add_phrase("bounce ball")
angry_elf.add_phrase("chat")
sad_polar_bear.add_phrase("pet polar bear") -
Add the Say command (Yes, we're putting a command INSIDE another command!):
item_actor_or_animal_variable.add_phrase("in-game command", Say())
Examples:
red_ball.add_phrase("bounce ball", Say())
angry_elf.add_phrase("chat", Say())
sad_polar_bear.add_phrase("pet polar bear", Say()) -
Add a list of things the game will say when the in-game command is used. This list will go in the Say command. Remember, a list is made by using square brackets []. Each item in the list is separated by commas [list_item1, list_item2, list_item3]:
item_actor_or_animal_variable.add_phrase("in-game command", Say(["A lot of text.","Some more text.","One other piece of text."]))
Examples:
red_ball.add_phrase("bounce ball", Say(["This is fun!","The ball bounces happily."]))
angry_elf.add_phrase("chat", Say(["The elf glares back at you.","The elf mutters to himself.","The elf turns his back on you."]))
sad_polar_bear.add_phrase("pet sad polar bear", Say(["The polar bear seems happier","The polar bear licks your face.","The polar bear closes its eyes, dreaming of playing in the snow."]))