Game Development Reference
In-Depth Information
"You can walk around your house to the northwest.";
}
sw = Clearing
nw = FrontOfHouse
;
Here's some sample Inform 6 code. This is some of the code that goes with the Centipede
transcript, showing a player character with a variable self-description property and some of his
items of inventory. The syntax is cosmetically different from TADS 2 but shares an underlying
approach to defining objects and descriptions.
Object Mitchum "Mitchum"
with name 'Ray' 'Mitchum' 'Corporal' 'cpl',
description [;
if ( combat_suit hasnt worn )
"You're buck naked and freezing. We're talking major
shrinkage, soldier. ";
if ( game_counter.number > 66 )
"You are quickly drowning in poisonous marshwater.";
switch ( game.state ) {
0,1,2,4,5:
if ( helmet has general )
"You're feeling a little shaky from that blow to the
head, and there's a searing pain in your right arm.
The stimulants are giving you the adrenaline to
ignore all of this, and you're still alert and ready
to kill some bugs for God, planet and country. ";
"You're in good health for a guy who's been awake and
on active duty for 76 straight hours. The stimulants
they rationed you seem to be working fine with no side
effects. You're pumped and ready to kill some bugs for
God, planet and country. ";
3: "You're freezing to death, and in imminent danger of
drowning. ";
6: "You're pumped and ready. The pain in your arm is a
distant annoyance.";
7: "You're almost hyperactive now, alert to every sound,
every movement.
You feel nothing but your own body heat, like a roaring
furnace. ";
}
],
has male proper
;
Search Nedrilad ::




Custom Search