SCRIPTING HELP

Have questions about CoD4 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
bigbabol
CJ Newbie
CJ Newbie
Posts: 50
Joined: January 9th, 2011, 11:13 am

SCRIPTING HELP

Post by bigbabol » January 9th, 2011, 11:20 am

first of all sorry for my bad english.... :mrgreen:
i have created a trigger multiple and i want that when a player touches it the player dies like the first part in mp_dungeon

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Re: SCRIPTING HELP

Post by Pedsdude » January 9th, 2011, 2:43 pm

Give your trigger_multiple a targetname (in this case I've used 'deathtrigger'), and add this to your .gsc:

Code: Select all

deathtrigger()
{
trigger = getent("deathtrigger","targetname");

	while (1)
	{
		trigger waittill ("trigger", user);
		user suicide();
	}
}
(making sure you thread it in main())
Image
Image

bigbabol
CJ Newbie
CJ Newbie
Posts: 50
Joined: January 9th, 2011, 11:13 am

Re: SCRIPTING HELP

Post by bigbabol » January 9th, 2011, 3:59 pm

thanks very much :D

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Re: SCRIPTING HELP

Post by Pedsdude » January 9th, 2011, 4:33 pm

No problem :)
Image
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests