Repeatedly destroyable script_mover


(G0-Gerbil) #1

I want a script mover that can be destroyed (IE made to vanish) by damage of any description (limited to 1 team would be a bonus but not essential).

Basically I want a set of building materials that can be operated (activated with simple func_invisible_user) to ‘create’ a ladder that can then be destroyed. Once destroyed it can be activated to ‘create’ another ladder etc ad-nauseum.

Trouble is, I can’t seem to find the right combo of entities / scripting to do the above. Been away too long obviously :wink:

Help gratefully received!

(PS using a func_constructible is NOT an option because they require a TOI and I need all of them for other proper objectives).


(Oxygen - o2) #2

cant you just do trigger spawn in death like tanks in ET?

target the func_invisible_user to a target_script_trigger

do the script for that so that when activated it makes the script_mover appear (setstate ladder defualt), using spawnflags you can make it damageable by only 1 team, set the health and when it dies trigger spawning of the crates


(zl1corvette) #3

You could use a script_mover, that way you can set who damages it. They maybe something like this…


plane
{
	spawn
	{
	}

	death
	{
        //all broken so hide
	setstate plane invisible
	}
	
	rebirth
	{
        //fixed so make visible
	setstate plane default
	}
	
	trigger reborn
	{
        //Come back to life
	alertentity plane
	}
}

To bring it back you just do something like trigger plane reborn.


(G0-Gerbil) #4

Cheers guys will look into your leads and report back :slight_smile:


(CptnTriscuit) #5

Stupid TOI limit…


(Ifurita) #6

Actually, I was looking for the same thing, but for a returnable objective. I’d like to be able to spawn a single objective, but have it returnable an infinite amount of times. How could i respawn an objective once the death routine has executed?

This is what I tried, and I get all of the text prompts, but no reset. :frowning:


documents
{ 
	spawn 
	{ 
		wait 200 
		trigger self startup
	} 

	trigger stolen 
	{ 
		wm_announce "The Allies have stolen the documents" 
		setstate docs_cm_marker invisible 
	} 


	trigger returned 
	{ 
		wm_announce "The Axis have returned the documents" 
		setstate docs_cm_marker default 
	} 

	trigger captured 
	{ 
		wm_announce "The Allies have secured the documents" 
		setstate docs_red invisible 
		setstate docs_captured default 

		wait 100

		wm_announce "Initiating arena reset"
	} 

	trigger startup
	{
		setstate docs_captured invisible 
		setstate docs_red default
		setstate docs_cm_marker default 
	}	
} 


frostbite_reset //enter this as the scriptname value for the single trigger_flagonly_multiples entity 
{ 
	death 
	{ 
		wm_announce "Activating hurt brush"
		
		trigger documents spawn
	} 
} 

(CptnTriscuit) #7

Im not sure if this would work or not, but in the death routine of frostbite_reset, try changing the trigger from spawn to startup and see if it makes any difference.


(Ifurita) #8

that didn’t either - that’s what i tried before I used trigger spawn


(G0-Gerbil) #9

I must admit I spent a bit of time on it today myself and not had any luck…
In the end I just set it up so you can activate the top of the objective to retract it. Bit of a hack, but works quite nicely.
Not a possible alternative for all situations though…