Player Health Problems
Storyteller
04 Jul 2013, 02:59<!--Saved by Quest 5.4.4873.16527-->
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Shelter">
<gameid>f0cc23b4-03a6-4ba0-b607-36cb59bfea9a</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
<cover>hand.png</cover>
<subtitle>Survive The Zombie Apocalypse</subtitle>
<author>The Storyteller</author>
<description>Zombies have taken over the world! You knew this would happen some day.</description>
<autodescription_youarein_useprefix />
<category>Horror</category>
<difficulty>Hard</difficulty>
<cruelty>Cruel</cruelty>
<showhealth type="boolean">false</showhealth>
<povstatusattributes type="stringdictionary" />
<showcommandbar />
<backgroundimage type="string"></backgroundimage>
<pov type="object">player</pov>
</game>
<object name="room">
<inherit name="editor_room" />
<descprefix>You are in</descprefix>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<prefix type="string"></prefix>
<dark />
<darkroomdescription>Your eyelids roll back, and you sit up. You can barely make out the room around you.</darkroomdescription>
<description type="string"></description>
<alias>your bedroom</alias>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<Health type="int">79</Health>
<alias>me</alias>
<maxobjects type="int">0</maxobjects>
<look type="script">
</look>
<attr name="pov_look" type="script">
if (player.Health = 100) {
msg ("You give yourself a once-over, checking for cuts and bruises. Not a scratch on you.")
}
else if (player.Health = ? ) {
msg ("You check yourself, noticing a few scratches. Nothing serious.")
}
</attr>
</object>
</object>
</asl>
Trying to make a player health system where if the players health is (for example) lower than 100 but greater than 80 it will give a specific output when the character looks at themselves.
HegemonKhan
04 Jul 2013, 04:06okay, this should work... let me test it really fast, though, just in case, lol.
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Shelter">
<gameid>f0cc23b4-03a6-4ba0-b607-36cb59bfea9a</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
<cover>hand.png</cover>
<subtitle>Survive The Zombie Apocalypse</subtitle>
<author>The Storyteller</author>
<description>Zombies have taken over the world! You knew this would happen some day.</description>
<autodescription_youarein_useprefix />
<category>Horror</category>
<difficulty>Hard</difficulty>
<cruelty>Cruel</cruelty>
<showhealth type="boolean">false</showhealth>
<povstatusattributes type="stringdictionary" />
<showcommandbar />
<backgroundimage type="string"></backgroundimage>
<pov type="object">player</pov>
</game>
<object name="room">
<inherit name="editor_room" />
<descprefix>You are in</descprefix>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<prefix type="string"></prefix>
<dark />
<darkroomdescription>Your eyelids roll back, and you sit up. You can barely make out the room around you.</darkroomdescription>
<description type="string"></description>
<alias>your bedroom</alias>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<Health type="int">79</Health>
<alias>me</alias>
<maxobjects type="int">0</maxobjects>
<look type="script">
</look>
<attr name="pov_look" type="script"><![CDATA[
if (player.Health = 100) {
msg ("You give yourself a once-over, checking for cuts and bruises. Not a scratch on you.")
}
else if (player.Health < 100 and player.Health >= 80) {
msg ("You check yourself, noticing a few scratches. Nothing serious.")
} else {
msg ("You are injured.")
}
]]></attr>
</object>
</object>
</asl>