Mustard Gas Chamber

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
erick
Major
Posts: 280
Joined: Wed May 30, 2007 1:14 am
Location: USA

Mustard Gas Chamber

Post by erick »

I have this little one room house in my SP map that I want fill up with gas when triggered. Everything works fine with the gassing of the player but how do you get the gas to spread out and go throughout the room without a billion animate/adam-mustard-gas 's :wink:
I want the gas to fill the room slowly (as in dont just have gas just appear suddenly around the player)
Everything in the script works fine except the mustard gas doesnt spread out
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

scale

Post by tltrude »

Make the scale of the entity bigger. Setting the angle might help too.
Tom Trude,

Image
User avatar
erick
Major
Posts: 280
Joined: Wed May 30, 2007 1:14 am
Location: USA

Post by erick »

i know how to make the scale of the entity bigger :D , but what would the angle do?
User avatar
erick
Major
Posts: 280
Joined: Wed May 30, 2007 1:14 am
Location: USA

Post by erick »

okay I made the scale of the entity from 1 to 5 and angled all of the entities in towards where the player is. I have like a wave setup effect to start the gas anims but the gas still doesnt fill the room like i want it to. :(
Here is what i have in my script:

Code: Select all

///////////////////////////////
/////MUSTARD GAS HOUSE/////////
///////////////////////////////
mustard_gas:
	$killgas_trigger waittill trigger
	$killgas_switch anim turnon
	$killgas_trigger nottriggerable
	
if ($player isTouching $killgas_check)
{	
	$killgas anim start
		wait .3
	$killgas1 anim start
	$killgas2 anim start
		wait .5
	$killgas3 anim start
		wait .25
	$killgas4 anim start
		wait .25
	$killgas5 anim start
	$killgas6 anim start
}
thread killem
end
//////////////////////
//Internal Thread/////
//////////////////////
killem:
	thread stopgas
		wait 1.35
while ($player isTouching $killgas_check)
{
	$killgas_check volumedamage 77
	wait 1
}
end
////////////////////////
////Internal Thread/////
////////////////////////
stopgas:
	$killgas_trigger triggerable
	$killgas_trigger waittill trigger
	$killgas_switch anim turnoff
	$killgas anim stop
	$killgas_trigger volumedamage 0
goto mustard_gas
There is also a problem with the mustard gas to stop hurting the player.
Nothing happens when you hit the switch off.
Could anyone tell me how to get a good transition effect with the gas and to make it so the player doesnt get hurt anymore when you hit the switch off
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

nottriggerable

Post by tltrude »

Have you tried turning the trigger off in the stopgas thread?

$killgas_trigger nottriggerable

Also, you are only stopping one of the 7 $killgas entities.

If you can't get the "adam-mustard-gas.tik" to work the way you want, you can always make your own. Its not that hard to modify a tik file.

Code: Select all

TIKI
setup
{
	scale 1.0
	path models/fx/dummy
	skelmodel dummy3.skd
}

init
{
	server
	{
		classname animate
		notsolid
		rendereffects +dontdraw
	}
	client
	{
		cache vsssource.spr
		
		originemitter mustard_gas
		(
			spawnrate 5.00
			model vsssource.spr
			alpha 0.80
			color 0.7 0.6 0.3
			scale 0.25
			life 1.00
			scalerate 8.00
			velocity 60.00
			randvelaxis range 10 -10 range 10 -10 range 10 -10
			accel 0.00 0.00 90.00
			fade
		)
	}
}

animations
{
        idle dummy3.skc
	start dummy3.skc
	{
		client
	        {
			enter loopsound steamloop
			enter emitteron mustard_gas
	        }
	}
	stop dummy3.skc
	{
		client
	        {
	    		enter emitteroff mustard_gas
		}
	}
}

/*QUAKED animate_fx_adam-mustard-gas(0.0 0.5 0.5) (-8 -8 -8) (8 8 8)
Senn's Sexy Mustard Gas
*/
After you change it, give it a new name like "erick_mustard_gas.tik". Then put it in main\models\animate. You'll have to include the models\animate folders and new tik file in your final pk3. By the way, the "QUAKED" line at the bottom makes it show up in Radient.
Tom Trude,

Image
User avatar
erick
Major
Posts: 280
Joined: Wed May 30, 2007 1:14 am
Location: USA

Post by erick »

Sorry I didnt reply fast.
I was gone for the weekend.
I will make the $killgas_trigger nottriggerable and try to modify the tik file.
In the tik file would you set the
randvelaxis to like 100 -100
If i wanted the model to spread more and/or put the velocity up higher?
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

randvelaxis

Post by tltrude »

I don't really know. Make the new file and open it on your desktop. Then you can play with the numbers, save, and test it over and over.
Tom Trude,

Image
Post Reply