Project X Forums
http://px.worms2d.info/forum/

Editing the Flame Thrower
http://px.worms2d.info/forum/viewtopic.php?f=15&t=495
Page 1 of 1

Author:  gemedet [ Thu Oct 04, 2012 4:10 am ]
Post subject:  Editing the Flame Thrower

Hi guys, I'm new to using PX, so forgive me if I missed something obvious.

I can't seem to modify the settings for the Flame Thrower; I click on the "Flamethrower..." button, but nothing happens. I want to adjust how long it lasts, how far it shoots, and its wind factor. Is this adjustable somewhere else, or can it be done with a script?

I tried this, but no effect:
Code:
void flame::FirstFrame() {
     CWeapon * theObj = GS->GetWeaponByName("Flame Thrower");
     theObj->launch.windFactor = 0;
}


Thanks!

Author:  StepS [ Thu Oct 04, 2012 2:39 pm ]
Post subject:  Re: Editing the Flame Thrower

the gui for flamethrower settings has not been done.
I can get chunk values from fiddler and then pasting them onto PX editor and editing the type of weapon

Author:  gemedet [ Fri Oct 05, 2012 12:21 am ]
Post subject:  Re: Editing the Flame Thrower

I'm not sure I understand. Can you explain how to get chunk values from Fiddler, and where to paste them in PX Editor?

Author:  Zed [ Sat Oct 06, 2012 10:10 am ]
Post subject:  Re: Editing the Flame Thrower

I dont really know if the wind influence of the Fire can be changed. But there are some unknown parameters in the CFireDesc.

There is the simple way to change CFireDesc of all appearing fire fragments after firing a flamethrower:
Code:
bool flamefired;
int flameint;

override void CWorm::FireFinal(CWeapon* Weap,CShootDesc* Desc)
{
     if(Weap->CheckName("Flame Thrower"))
     {
     flamefired = true;
     flameint = 240;
     }

super;
}

override void CFire::CFire(CObject* Parent,CFireDesc* Desc,int unk)
{
         if(flamefired == true)
         {
                       Desc->Duration = 100000000;
                       Desc->SpX = Desc->SpX * 2;
                       Desc->SpY = Desc->SpY * 2;
                       
         }   
 super(Parent,Desc,unk);     
}

override void CTurnGame::Message(CObject* sender,EMType Type,int MSize,CMessageData* MData)
{
         if(Type == M_FRAME)
         {
                 if(flamefired == true)
                 {
                              if(flameint != 0)
                              {
                              flameint = flameint - 1;
                              }
                              else
                              {
                              flamefired = false;
                              }
                 }
         }
super;
}


The only downside that if the barrel blows up while ure firing a flamethrower, it's fire fragments will be affected too. Much more effective (and complex) way is to make a scripted copy of flamethrower.

Author:  Twicken [ Sat Oct 06, 2012 10:25 am ]
Post subject:  Re: Editing the Flame Thrower

oo interesting, ive also been trying to do a similar flame edit on the hell grenade to make fire go high into the air after exploding to cover more area this script has given me some tips XD

Author:  gemedet [ Wed Oct 10, 2012 5:23 am ]
Post subject:  Re: Editing the Flame Thrower

Thanks, Zed! This will make the fire last longer after being shot out, right?

Do you know what variables I'd need to change to give the Flamethrower more fuel, or to make it shoot farther?

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/