Possible through a map script?


(Dragonji) #1

Hello folks.

I tried to change one thing on Caen but I’m not sure if it’s possible to do by editing a map script only.

The thing I want to change is gate’s behaviour. I’d like it to be non-repairable after it’s destroyed for the first time.

My current script:
http://pastebin.com/s1yBAd3J

Any solutions? (I just don’t want to recompile the whole map)


(Mateos) #2

It’s possible, just disable the crate and build entity, I did it on 1944 Nordwind because Kommando disabled the crates for Truck Barrier but not the Build entity, so people got blown up while trying to build it x) No need to recompile.

Will do it :slight_smile:

Edit:
Yeah, you disabled crates (materials) but not build entity. I will open the BSP and original script in ETScript.

Is it original Caen, or Caen 1/2/3/4?

Edit 2:
Decompilated because couldn’t find a misc_constructiblemarker… Because there isn’t for it, just for Bridge and Barrier. There’s the gate_toi to turn off maybe, materials are models and the mover.

Maybe kill gate_target? Will try it on my install

Edit 3:
Got it to work the way expected. Here is the code:

gate
{
	spawn
	{
		wait 200
		constructible_class 3
		setstate gate_materials invisible
	}

	buildstart final
	{
	}

	built final
	{
	}

	decayed final
	{
	}

	death
	{
		remove
		setstate gate_toi invisible
		wm_announce   "Axis team has destroyed the gate!"
	}
}

(Dragonji) #3

You must spread some Reputation around before giving it to Mateos again. :frowning:

Anyway, thank you so much!