BATTLE ITEM ID

Tracks used item ID

I finished this one before breakfast (literally), but making the tutorial was a little more tricky.

Basically you have the comment.

@item_id ID num, variable, switch, switch2(false)

Set the variable you want to store this to into the variable, and set the ID number to (let's say 1, which is usually potion), and set the switch to be turned on. What's the second switch for? It's for a SECOND switch if you use something other than the correct item.



You'll probably need to turn the variable to 0 and the switch off (this will keep things from repeating or otherwise acting screwy).

Note: After testing it, for some reason, it doesn't appear to work for skills, so I'm making it item only. Also, the way I've set it up, it appears to pause for one round (if the item uses targeting this means it re-targets if you attack), so generally letting it finish is a good idea.




Details

  • 1.4 MB
  • 80
  • 12/23/2023 04:32 PM

Actions

Posts

Pages: 1
It seems the best way to do this is make a item switch (you can do this for multiple items with the same switch) called Item_Used or something, and have various items turn it on. Then you can have some sort of thing where if it's the right item, you make a condition for the first switch (see parameter 3), and if not inside the second switch (see parameter 4) make a more or less empty switch, except to turn stuff off.

Doing it this way, you can also have multiple switches, and check for other items (you can't seem to have the same switch, running this process twice though).

Apparently, I must've cut this for size. To run the demo, use the RTP to put stuff back in.
Pages: 1