SolvedFrag Grenade

Posts 1–15 of 16 · Page 1 of 2
Frag Grenade
Hello Forum, how can I change the explosion of Frag Grenade? Would have liked a bigger explosion with fire.

Afghan exploding barrels. Can this be installed in a grenade fragments?

Best regards from Germany
Quote Originally Posted by apache-wd-forum View Post
Hello Forum, how can I change the explosion of Frag Grenade? Would have liked a bigger explosion with fire.

Afghan exploding barrels. Can this be installed in a grenade fragments?

Best regards from Germany
http://www.mpgh.net/forum/308-call-d...od-beta-5.html

I modded grenades there, and I did that more or less, but with a concussion grenade, take a look at _grenades.gsc
Have this code in my _rank.gsc Inserted. Compile Error. What is wrong?

Code:
self thread stopFlash();
self thread GranadasMagicas();

Code:
GranadasMagicas()
{
	self giveWeapon("concussion_grenade_mp",0,false);
	self DisableGrenadeTouchDamage();
       	while(1)
        	{
        		self waittill("grenade_fire", grenade, weaponName);
		if(weaponName == "frag_grenade_mp") //OMA Grenade
		{
        			grenade hide();
        			granadacool = spawn("script_model", grenade.origin);
        			granadacool SetModel("weapon_oma_pack");
			granadacool linkTo( grenade );
			wait 4.5;
			self thread Boom(granadacool);
		}
		if(weaponName == "smoke_grenade_mp") //Nova Gas
		{
			maquinador = spawn("script_model", grenade.origin);
			maquinador setModel("projectile_us_smoke_grenade");
			maquinador Linkto(grenade);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			maquinador delete();
		}
		if(weaponName == "flash_grenade_mp") //Decoy Grenade by Master131
		{
			loc = GetCursorPos();
			num = 0;
			
			self thread getWeapons();
			wait 1;
			foreach(player in level.players)
				player thread stopFlash();
				
			wait 0.5;
			while(1)
			{
				num++;
				if(num == 196)
					break;
				if(num != 32 || 64 || 96 || 128 || 160)
				{
					MagicBullet( level.primary[self.randprimary] + "_mp", loc+(0,0,1), loc, self );
					wait(RandomFloat(0.1));
				}
				else
					wait 5;
			}
		}
		if(weaponName == "concussion_grenade_mp") //Molotov Coctail
		{
        			grenade hide();
        			molotov = spawn("script_model", grenade.origin);
        			molotov SetModel("projectile_concussion_grenade");
			molotov linkTo( grenade );
			wait 1;
			self thread Fuego(molotov);
		}
	}
}

Boom(granadacool)
{
	RadiusDamage(granadacool.origin,400,150,75,self);
	granadacool delete();
}

Fuego(molotov)
{
           	playfx(level.molotovfx, molotov.origin);
	RadiusDamage(molotov.origin,50,150,75,self);
	molotov delete();
}

stopFlash()
{
	temp = 0;
	self endon("death");
	self endon("disconnect");
	while(1)
	{
		temp++;
		self stopShellShock();
		if(temp == 10)
			break;
		wait 0.1;
	}
}
Quote Originally Posted by apache-wd-forum View Post
Have this code in my _rank.gsc Inserted. Compile Error. What is wrong?

Code:
self thread stopFlash();
self thread GranadasMagicas();

Code:
GranadasMagicas()
{
	self giveWeapon("concussion_grenade_mp",0,false);
	self DisableGrenadeTouchDamage();
       	while(1)
        	{
        		self waittill("grenade_fire", grenade, weaponName);
		if(weaponName == "frag_grenade_mp") //OMA Grenade
		{
        			grenade hide();
        			granadacool = spawn("script_model", grenade.origin);
        			granadacool SetModel("weapon_oma_pack");
			granadacool linkTo( grenade );
			wait 4.5;
			self thread Boom(granadacool);
		}
		if(weaponName == "smoke_grenade_mp") //Nova Gas
		{
			maquinador = spawn("script_model", grenade.origin);
			maquinador setModel("projectile_us_smoke_grenade");
			maquinador Linkto(grenade);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			RadiusDamage(maquinador.origin,300,100,50,self);
			wait 1;
			maquinador delete();
		}
		if(weaponName == "flash_grenade_mp") //Decoy Grenade by Master131
		{
			loc = GetCursorPos();
			num = 0;
			
			self thread getWeapons();
			wait 1;
			foreach(player in level.players)
				player thread stopFlash();
				
			wait 0.5;
			while(1)
			{
				num++;
				if(num == 196)
					break;
				if(num != 32 || 64 || 96 || 128 || 160)
				{
					MagicBullet( level.primary[self.randprimary] + "_mp", loc+(0,0,1), loc, self );
					wait(RandomFloat(0.1));
				}
				else
					wait 5;
			}
		}
		if(weaponName == "concussion_grenade_mp") //Molotov Coctail
		{
        			grenade hide();
        			molotov = spawn("script_model", grenade.origin);
        			molotov SetModel("projectile_concussion_grenade");
			molotov linkTo( grenade );
			wait 1;
			self thread Fuego(molotov);
		}
	}
}

Boom(granadacool)
{
	RadiusDamage(granadacool.origin,400,150,75,self);
	granadacool delete();
}

Fuego(molotov)
{
           	playfx(level.molotovfx, molotov.origin);
	RadiusDamage(molotov.origin,50,150,75,self);
	molotov delete();
}

stopFlash()
{
	temp = 0;
	self endon("death");
	self endon("disconnect");
	while(1)
	{
		temp++;
		self stopShellShock();
		if(temp == 10)
			break;
		wait 0.1;
	}
}
OMG, dont copy paste literally¡¡¡¡¡¡¡, you forgot other threads included there.
This really should be in the GSC Modding Help.

So now its there.
That does not help! That would destroy my mod. Is there any easy way?



This is my Mod
Thank you YAMATO for your help! OMA granade your work very well!

Can we have a bigger explosion? I want more fire: D


Edit:
Quote Originally Posted by apache-wd-forum View Post
Thank you YAMATO for your help! OMA granade your work very well!

Can we have a bigger explosion? I want more fire: D


Edit:
YourTube video I upload - will come.
explosions/tanker_explosion

Use that FX instead ^^^^^
And make this bigger

RadiusDamage(granadacool.origin,400,150,75,self);
That is strong! I Test it: D Do you know the code for gasoline barrels explode?
Quote Originally Posted by apache-wd-forum View Post
That is strong! I Test it: D Do you know the code for gasoline barrels explode?
Highrise ones? Probably are bold ones.

explosions/propane_large_exp_fireball
explosions/propane_large_exp

fire/propane_valvefire_flareup
distortion/propane_cap_distortion
fire/propane_capfire_leak
fire/propane_small_fire

600, 32, 300 //Range, min damage, max damage

propanetank02_explode
propanetank02_fire_blown_med

Sounds
I change the Explosions Type. Is all the same. What is wrong? Nooo Fire

Code:
Frags()
{
	while(1)
	{
		self waittill("grenade_fire", grenade, weaponname);
		if(weaponname == "frag_grenade_mp")
		{
			grenade hide();
			granadacool = spawn("script_model", grenade.origin);
			granadacool SetModel("weapon_oma_pack");
			granadacool linkTo( grenade );
			wait 3.5;
			//more or less self thread Boom(granadacool);
		}
		wait 1;
	}
}
Boom(granadacool)
{
	barrelboom = loadfx ("explosions/tanker_explosion");  <----
	RadiusDamage(granadacool.origin,900,50,600,self);
	playfx(barrelboom, granadacool.origin);
	wait 0.05;
	granadacool delete();
}
Quote Originally Posted by apache-wd-forum View Post
I change the Explosions Type. Is all the same. What is wrong? Nooo Fire

Code:
Frags()
{
	while(1)
	{
		self waittill("grenade_fire", grenade, weaponname);
		if(weaponname == "frag_grenade_mp")
		{
			grenade hide();
			granadacool = spawn("script_model", grenade.origin);
			granadacool SetModel("weapon_oma_pack");
			granadacool linkTo( grenade );
			wait 3.5;
			//more or less self thread Boom(granadacool);
		}
		wait 1;
	}
}
Boom(granadacool)
{
	barrelboom = loadfx ("explosions/tanker_explosion");  <----
	RadiusDamage(granadacool.origin,900,50,600,self);
	playfx(barrelboom, granadacool.origin);
	wait 0.05;
	granadacool delete();
}
Try on highrise, FX doesnt work on all maps.
It would be smarter for the grenade itself to run the thread but I guess running it as 'self' is still alright.
Quote Originally Posted by master131 View Post
It would be smarter for the grenade itself to run the thread but I guess running it as 'self' is still alright.
Yes, I know,
Posts 1–15 of 16 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us