There are a few ways to make a pill that heals an exact amount of HP instantly.
1) Done in an X-LF2 mod. Weapon drops from sky, when it lands, it transforms into a criminal. This criminal has a catching itr kind 3. If anyone walks into it, it will catch the person and go into a frame with an itr that hits the person with negative injury values.
2) A better version of the above is to use itr kind 8 as it won't interrupt a character as badly and doesn't require transforming into a criminal. When a character touches the pill, the pill will go into the frame number that the itr kind 8 "dvx" uses. This frame will hit the person with an itr with negative injury values. The reason why the injury tag in itr kind 8 isn't used is because it only heals dark red HP.
To see how exactly itr kind 8 works, see John's D^J healing spell in john_ball.dat.
3) This pill is a weapon can be picked up when you want to take it, causing it to go a specific on_hand frame (24 for all characters I think), which has a next leading to a frame that opoints a ball. This ball needs to have state 18(unless you change the characters' pickup frame to use state 12) and hits the character with an itr.
Normally you can stop there, but if you're going for a full mod anyway, the ball can then grab the character and bring him into a special frame. In the special frame, he will spawn a hidden milk and then drink it just for a very short while, then destroy the milk. The purpose of this is to prevent HP from exceeding 500.
Hope that helps.
1) Done in an X-LF2 mod. Weapon drops from sky, when it lands, it transforms into a criminal. This criminal has a catching itr kind 3. If anyone walks into it, it will catch the person and go into a frame with an itr that hits the person with negative injury values.
2) A better version of the above is to use itr kind 8 as it won't interrupt a character as badly and doesn't require transforming into a criminal. When a character touches the pill, the pill will go into the frame number that the itr kind 8 "dvx" uses. This frame will hit the person with an itr with negative injury values. The reason why the injury tag in itr kind 8 isn't used is because it only heals dark red HP.
To see how exactly itr kind 8 works, see John's D^J healing spell in john_ball.dat.
3) This pill is a weapon can be picked up when you want to take it, causing it to go a specific on_hand frame (24 for all characters I think), which has a next leading to a frame that opoints a ball. This ball needs to have state 18(unless you change the characters' pickup frame to use state 12) and hits the character with an itr.
Normally you can stop there, but if you're going for a full mod anyway, the ball can then grab the character and bring him into a special frame. In the special frame, he will spawn a hidden milk and then drink it just for a very short while, then destroy the milk. The purpose of this is to prevent HP from exceeding 500.
Hope that helps.
~Spy_The_Man1993~
Steiner v3.00 (outdated), Challenge Stage v1.51
Luigi's Easier Data-Editor, A-Man's Sprite Mirrorer
Working on the LF2 Rebalance mod.
Avatar styled by: prince_freeza