WatchNon-threaded

Forums » Advanced Editor Forum » Read Message

Talk about it. Ask for help on it. Compliment it.

Item script: using an item sometimes costs health

5 months 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

5 months 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.