Choice when health is low.

Make Forums Get help Choice when health is low.

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  deWiTTERS 1 month ago. This post has been viewed 66 times

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4544

    DarkAbyss
    Participant

    So, I made a dungeon for my game, and I want to make a script to where once the player’s health is less than 60, then it gives the choice to use tea to heal (hard to explain why i picked tea) them. Here’s the script I tried, but didn’t work;

     

    if hero health value <= 60

    (four spaces)hero gives choices for “Darn.. I’m getting low on health. Maybe the tea will regenerate my health…”

    (eight spaces)in case “>Drink Tea”

    (twelve spaces)invisible_floor_switch6 says “*DRINKS TEA*”

    (twelve spaces)hero loses token “Tea”

    (twelve spaces)hero health value becomes 110

    (twelve spaces)hero says “Guess that worked…”

     

    #4548

    deWiTTERS
    Keymaster

    Is the problem that the script never runs at all? Because the script will not automatically run, it needs to be triggered by an actor. So the hero first needs to walk over some invisible actor to trigger this script.

    I know what you are trying to do, but automatically run this script isn’t supported yet. In the future, there will be multiple triggers of scripts. Right now it’s only when you bump into an actor, but in the future, scripts can react on:

    • Death of an actor
    • Actor gets hurt
    • Loading a level

    In your case you can then react on actor getting hurt. But that is not supported yet. So you will need to trigger it at certain points

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.