[Weapon] is it possible? new weapon - Printable Version +- Little Fighter Empire - Forums (https://lf-empire.de/forum) +-- Forum: Little Fighter 2 Zone (https://lf-empire.de/forum/forumdisplay.php?fid=7) +--- Forum: Data Changing (https://lf-empire.de/forum/forumdisplay.php?fid=11) +--- Thread: [Weapon] is it possible? new weapon (/showthread.php?tid=9175) |
|||||
is it possible? new weapon - kakuratso - 04-04-2014 Hello. I would like to create a weapon like painkiller. When the charakter eat it, painkiller gain his life about 1/4. Painkiller may be like a milk or a beer but char can make only one sip. RE: is it possible? new weapon - STM1993 - 04-04-2014 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. RE: is it possible? new weapon - YinYin - 04-04-2014 @STM1993: I think it's still supposed to be a normal bottle object you can drink from, but it should instantly heal a big chunk with just one sip and be empty. RE: is it possible? new weapon - STM1993 - 04-04-2014 Oh. Only thing I can add on so far is to ensure the weapon is type 6 on the data.txt, make the weapon opoint an itr kind 8 ball in frame 31, have a bdy on drinking frames. If drinking is detected, the ball will activate, get the state 18 negative injury itr. Catch character, force him into a specific new frame to drop/destroy the drink. If need be, after dropping, give him milk to deal with the 500HP exceed. I tried giving a test weapon the itr k8 directly in frame 31, but it didn't work. Can't figure something better without a full mod change and without more details on what he wants RE: is it possible? new weapon - kakuratso - 04-04-2014 I have got a idea. In all chars I will change drink frame:
and in frame of weapon:
but i don't know how i must change the john ball data to ball hit char with negative injury values. this is the data of john ball -> heal ball:
RE: is it possible? new weapon - YinYin - 04-04-2014 That's a good idea. Here are a few tweaks to it: (04-04-2014, 04:16 PM)kakuratso Wrote: In all chars I will change drink frameDon't change the characters drinking frame. That will mess up all normal bottle drinking and you would have to edit every character it is supposed to work with. (04-04-2014, 04:16 PM)kakuratso Wrote: and in frame of weaponSpawning a healing object is a good idea. However Johns heal is a little unfitting, so let's just spawn a new frame from the bottle object itself:
That new frame will look like this:
The injury 1 may not be a high healing value, but it won't make the hp bar flash like Johns heal does. Also the on_hand frame 31 will opoint this frame pretty often. That way it should heal rather fast (only all dark red hp though). To make sure this bottle empties out quickly, just give it a low weapon_hp. Only problem with this method is, that the character will hold the bottle in frame 31 at other times too (not just drinking). |