Getting hurt with passing time

Hi there, I'm quite new here. I'm looking for a way for a player to get hurt a bit every turn until he puts on a wearable item.
I'm working in the simple version of program btw. And I tried making a script using 'if', but I just can't get to it in any way.

if you mean you're in/using the 'simple mode', then most of the features are disabled, as this is only a 'sandbox' mode for just playing with the most basic stuff of quest, so you may need to turn this off and/or create a new game with it selected/turned-off

see Turnscripts

these do their scripting every internal turn (typed in stuff into the text/command bar at the bottom and/or mouse clicks on hypertexts and/or the verb buttons)

when you put on the wearable item, in its scripting, you need to enable a turnscript, which you created and set up to do damage to you

a very quick simple (there's many different designs/methods, as your using the built-in wearables library stuff, so it'll be a bit more complex for you to implement it) example:

<asl version="550">

  <game name="example">

  <object name="room">
    <inherit name="editor_room" />
    <turnscript name="example_of_a_local_turnscript">
     local turnscripts are contained within a Room Object, global turnscripts are NOT

  <object name="player">
    <inherit name="editor_object" />
    <inherit name="editor_player" />
    <attr name="parent" type="object">room</attr>
    <attr anme="weapon" type="object">unarmed</attr>
    <attr name="current_life_integer_attribute" type="int">999</attr>
    <statusattributes type="stringdictionary">
        <value>Current Life: !</value>

  <object name="unarmed">
    <inherit name="editor_object" />

  <object name="cursed_sword">
    <attr name="parent" type="object">room</attr>
    <attr name="equip" type="script">
      player.weapon = this
      EnableTurnscript (poisoned_global_turnscript)
    <attr name="unequip" type="script">
      player.weapon = unarmed
      DisableTurnscript (poisoned_global_turnscript)

  <turnscript name="poisoned_global_turnscript">
    <attr name="enabled" type="boolean">false</attr>
      player.current_life_integer_attribute = player.current_life_integer_attribute - 50

    <defaultexpression>You can't equip that!</defaultexpression>

    <defaultexpression>You can't unequip that!</defaultexpression>


If you have a healthattribute (for example) on the player object.
Put = - 1and put that in a turnscript.
That way the player's health will drop 1 HP for every turn.

When you character wears the desired object, just disable the timescript.

(What HK said... just fewer words :))

Thank you Guys it really helped me :D

This topic is now closed. Topics are closed after 60 days of inactivity.