Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Item script: using an item sometimes costs health

6 years ago

What I'm trying to do is if a certain situation arises, using a certain item will result in you losing health. Would Item Script be how I do that?

For example, say,

If %EVENTISTRU := 1 then %HEALTH := %HEALTH - 5

Would something like that do the trick if it's put in the Item Script, and would it take effect as soon as the item is used?

Item script: using an item sometimes costs health

6 years ago
Yeah, using an item runs the script. Although you use := to change the value of a variable. = alone is to compare values.

So itd be IF %EVENTISTRU = 1

rest is fine. May want to add a check to make sure they have enough health first though.