dynamite to make hole in the floor and related problems


(Noldor) #1

Hello!
This thread originally started in another place, but well, it was a bit out of topic, so i decided to create a new topic, maybe can be of some interest for the other newbies.

I was trying to make some constructible items (and destructible) in my test map, when i get this simple idea.
Basically axis have to make a hole in the floor. i made some “broken-like” lines in the floor with the clipper, i made the hole with csg subtract function, then i created another brush and csg-subtract the rest of the floor to create the brush that match perfectly with the hole, as a stopper. i assigned the func_explosive entity to brushes (like in goldrush when the tank hit the walls) and they target a target_explosion entity. then the first problem: how to activate the explosion when the dynamite esplodes. My idea was to make a Clip brush over the hole and make it func_constructible allied, with a toi that i really don’t need (but with my poor basis i didn’t have a better idea). so, when the explosion radius hit the clip, i can alertentity the “stopper” throught scripting. it works, but the TOI continue to show “you are near” also after the hole is made. Any way to turn off that warning? i want to make this destructible hole like something you shouldn’t know it exist (so nothing have to warn you can dynamite there,neither before).
Then, i wanted to show some allied crates when the hole is done, so the allies can construct a sort of protection (with wood axis). i made the classic script, with things turning default and invisible when they need to, but for some reason, when allied engineers construct the protection, the crates don’t become invisible, i don’t get xp points, even if in the script seems ok to me.

I will post the script code here, some names are in italian, but i think you should understand :


protezione //routine name
{
	spawn
	{
		wait 200
		constructible_class 2
		trigger self setup
	}

	trigger setup
	{	
		setstate astedilegno invisible //wood axis
		setstate astedilegno_clip invisible //wood axis clip to walk easily on (probably i could move it into the func_constructible entity)
		setstate materiali invisible //crates (note: is a brush, not model, i wanted to make easy things to help me individuate the error)
	
	}
	
	built final
	{	
		setstate astedilegno default //wood axis
		setstate astedilegno_clip default //wood axis clip
		setstate materiali invisible //crates
		wm_announce "E' stato costruita la protezione che piu' schifosa non si poteva!!"	
	}

	decayed final
	{
		setstate astedilegno invisible //wood axis
		setstate astedilegno_clip invisible //wood axis clip
		setstate materiali default //crates

	}

	death
	{
		setstate astedilegno invisible //wood axis
		setstate astedilegno_clip invisible //wood axis clip
		setstate materiali default //crates
		wm_announce "l'hanno di nuovo bucato sti ricchioni!"
	}
}

but it doesn’t work. :???:

any help?


(Ifurita) #2

http://www.wolfensteinx.com/surface/tutorials/damage.html

works like a charm


(Noldor) #3

thanx ifurita, i’ll have to read it (now it’s late night here, 2:16 AM), but it doesn’t seem to help me with the “crates-that-don’t-become-invisible” problem. Thank you anyway for the link, tomorrow with time i’ll read it!


(Noldor) #4

note about the explosion: i would make it damageable only by axis, for this reason i made it allied objective. but i don’t want it to show the “you are near”, and actually i don’t want it is an allied_objective (=mapcommand shouldn’t show the icon). Also, it would be better if it can be destroyed only by dynamite - for this reason i used a clip as func_constructible start_built class 3.

The script i pasted refers to the wood axis after the explosion, that is the second problem, about the crates.


(Noldor) #5

any idea?


(TFate) #6

Change the constructible_class to 3.

With the crates-that-don’t-become-invisible you have to make the crates and crates’s clip brushes into a script_mover entity. Otherwise it won’t be affected by the script.

Of course you do need the following keys on the script_mover crates.

targetname: materali
scriptname: materali

For the XP points, I’m not sure what you’re doing wrong. I think it has to do with your func_constructible brushes.