Hello, I am using the browser version, so bear with me.
As the title says, I need help making enemy encounters. If you're confused to what version I'm using, here's a screen shot.
Your link leads to a blank page.
Also, there's more ways to create enemy encounters than I can count, depending on how in-depth you want your fight system to be, if you're using someone else's premade fight system or making your own from scratch, etc.
I just want it to be either you can >Use knife on Troll or >south Which runs away from fight
This is the first encounter, so I want it to be easy.
For the knife, select the object Knife's feature tab, and check 'use/give/. In the newly appeared Use/Give tab, put in the 'use this on (other object)' case for using the knife on the Troll object.
Similar things for South; select the specific exit you want to be running away, and check the 'Run a script' box, and put in the needed script.
Thanks! For later fights on, how would I make an HP system for the enemies?
There is, like I said, hundreds of ways under the sun to make an HP system.
The way I, personally, would do it is give the enemies the Health and MaxHealth integer attributes. So you'd have something like Orc.Health=50 and Orc.MaxHealth=50. You'd have the code:
msg("Orc Health: "+Orc.Health+"/"+Orc.MaxHealth)
To get a display of the current/max health. If the orc has been damaged (Like say, the orc was bitten by a snake before you fight him) you could see "Orc Health: 48/50"
I'd also give the Player an object attribute called Target. This would be the target of their current action; whether it's stabbing, or using a healing spell on an ally, etc.
In simple terms, when you used Knife on Orc, it'd go:
Player.Target=Orc Player.Target.Health=Player.Target.Health-5 if Player.Target.Health<=0: msg("The "+Player.Target.alias+" dies!")
This way, you can have the player attack, and damage, just about anything as long as it has a Health attribute.
That is, of course, just the bare bones. You can add the meat as your game necessitates.
You might want to look at this in the docs too: