mapscripted entites not working with scripted events?

Discussion for any ET/ETPro/BayonET bugs or cheats you find...

Moderators: Forum moderators, developers

Post Reply
McNite
Posts: 63
Joined: Tue Jan 11, 2005 10:18 am
Contact:

mapscripted entites not working with scripted events?

Post by McNite »

Hi guys,

I just tried to set up ammocrates with an etpro mapscript which works fine.
Then I wanted to address them with a scriptblock so they will only be there when the CP is built by Axis.
That doesnt work.
I can setstate them in a spawn-block of the script though. Isn't that a bit weird?

Code: Select all

//--------------ETPRO MAPSCRIPT CHANGES-----------------------------
		create
		{
			scriptname "scrf_ammo"
			targetname "scrf_ammo"
			origin "-960 -3576 176"
			classname "misc_cabinet_supply"
			angle "90"
			mins "-20 -8 -25"
			maxs "20 8 25"
			ammototal "12"
			modelscale "1"
			contents "1"
			clipmask "1"
			model "models/mapobjects/supplystands/stand_ammo.md3"
		}

		create
		{
		        scriptname "scrf_ammotr"
	        	targetname "scrf_ammotr"
		        classname "trigger_ammo"
		        target "scrf_ammo"
	        	origin "-960 -3568 208"
		        mins "-45 -45 -25"
		        maxs "45 45 25"

		        ammototal "12"
		        ammorate "1"

		       	contents "1"
		        clipmask "1"
		} 

		create
		{
			scriptname "scrf_ammoempty"
			targetname "scrf_ammoempty"
			origin "-1056 -3576 176"
			classname "misc_gamemodel"
			angle "90"
			mins "-20 -8 -25"
			maxs "20 8 25"
			contents "1"
			clipmask "1"
			model "models/mapobjects/supplystands/stand_ammo_damaged.md3"
		}

Code: Select all

scrf_ammo
{
	spawn
	{
		wait 1000
		setstate scrf_ammo default //invisible
	}
	on
	{
		setstate scrf_ammo default
		wm_announce "^3scrf_ammo default"
	}
	off
	{
		setstate scrf_ammo invisible
	}
}

scrf_ammotr
{
	spawn
	{
		wait 1000
		setstate scrf_ammotr default //invisible
	}
	on
	{
		setstate scrf_ammotr default
		wm_announce "^3scrf_ammotr default"
	}
	off
	{
		setstate scrf_ammotr invisible
	}
}

scrf_ammoempty
{
	spawn
	{
		wait 1000
		setstate scrf_ammoempty default
	}
	on
	{
		setstate scrf_ammoempty default
	}
	off
	{
		setstate scrf_ammoempty invisible
		wm_announce "^3scrf_ammoempty invisible"
	}
}
So what we got now here is: both crates are there at the start, and the ammo works, but triggering the empty one off doesnt have any effects... i don't even get the wm_announces.
User avatar
mortis
Posts: 360
Joined: Tue Jul 06, 2004 11:57 pm
Location: at the center of the e-universe
Contact:

Post by mortis »

The extra spawns/TWO in fueldump can be turned on and off sequentially from scripted events, but I have found that some entities are more touchy than others when scripted in.
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Post by ReyalP »

Your script is malformed. on and off do not exist as scripting events like spawn or death.

Maybe you meant trigger on and trigger off, but in that case you don't seem to be triggering them anywhere
send lawyers, guns and money
McNite
Posts: 63
Joined: Tue Jan 11, 2005 10:18 am
Contact:

Post by McNite »

Shit now that you say it... i think that s my most common scripting error, forgetting about the "trigger"...
User avatar
mortis
Posts: 360
Joined: Tue Jul 06, 2004 11:57 pm
Location: at the center of the e-universe
Contact:

Post by mortis »

lol, I didn't notice that until reyalp pointed it out too...
Post Reply