Removing Existing Models through Scripting

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
spy0012
Sergeant
Posts: 53
Joined: Thu Jun 17, 2004 10:09 pm

Removing Existing Models through Scripting

Post by spy0012 »

Hi Ya'll,

Is there a way to remove models through scripting, i am editing tunisia map and want to remove certain models, so they cqan't be seen, can this be done through scripting?

Thanks
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

If they have a targetname, yes. If not: I'm not sure, but I dont think so.
Admin .MAP Forums
Image
Head above heels.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

BSP

Post by tltrude »

I think so, but you must open the BSP file, with Wordpad, and find out the targetname that was assigned to the model.

$targetnaqme remove
Tom Trude,

Image
spy0012
Sergeant
Posts: 53
Joined: Thu Jun 17, 2004 10:09 pm

Fire hurt

Post by spy0012 »

I am using a fire burn script, basically you near the ire you die slowly until u move away, only problem it dosen't always burn

I go near it at start of map it burns, play a few games it doesn't can anyone help, I am posting in same topic to save multiple posting

Here is the script, was taken from another mod, you probably know it


firehurts:
self loopsound fire_large
while(1)
{
for(local.i=1;local.i <= $player.size ; local.i++)
{
if ( $player[local.i] istouching self)
{
self volumedamage 1
$player[local.i] playsound player_death
}
}
waitframe
}
end

It does work but not all the time, maybe a loop or something but nothing i do makes it burn all the time, burn as in hurt the player standing in it
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

EF2_axis_station

Post by tltrude »

Check out my map called EF2_axis_station. Click on my signature logo to download it.

It has a big blue window that, when borken by a player in front of it, will burn the player to death. It was hard getting the fire to appear on the body after it falls to the ground. It also has gas that hurts players who jump through the window opening after it has exploded.

Code: Select all

//*** --------------------------------------------
//*** "Gas Window threads"
//*** --------------------------------------------

gas_window:
	
	thread window_explode
	wait .2
	local.nothappy = parm.other
	if (local.nothappy istouching $gas_killer1)
	{
		local.nothappy damage local.nothappy 120 local.nothappy (0 0 0) (0 0 0) (0 0 0) 1 2 6 0
		volumedamage $gas_killer1 250
		wait 1
		local.fire = spawn script_model angle "-1"
		local.fire model "emitters/firegood.tik"
		local.fire.scale = .75 
		local.fire.origin = local.nothappy.origin + (0 0 16)
		local.player = parm.other
		$gas_killer1 remove
		wait 9.5
		local.fire remove
	}
	thread gaskill
	$gas1 anim start
	wait 5
	$gas1 anim stop
end

window_explode:

	wait .2
	$gas_window_clip remove
	spawn script_origin targetname "exp_speaker"
	$exp_speaker.origin = $gas_window_speaker.origin
	$exp_speaker playsound explode_flak884
	$gas_window_fire anim start
	$gas_window_speaker loopsound fire_large
	wait 5
	$gas_window_speaker stoploopsound
	$gas_window_fire remove

end

gaskill:

	local.sucker = parm.other
	if (local.sucker istouching $gas_killer2 == 1)
		{
        		radiusdamage local.sucker.origin 10 16 
		}
	wait 1
	goto gaskill

end
Tom Trude,

Image
Post Reply