Activated by an object ?

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

Moderator: Core Staff

Post Reply
Jumpy'z
CJ Wannabe
CJ Wannabe
Posts: 13
Joined: December 28th, 2006, 5:55 pm
Location: Quebec, Canada

Activated by an object ?

Post by Jumpy'z » July 12th, 2007, 2:16 am

Is this possible to activate a trigger with an object and not a player ??

Lethal323

Post by Lethal323 » July 12th, 2007, 2:32 am

Object in what way?

Bullets...yes
grenades....no
moveing platform...dont think so :?

Jumpy'z
CJ Wannabe
CJ Wannabe
Posts: 13
Joined: December 28th, 2006, 5:55 pm
Location: Quebec, Canada

Post by Jumpy'z » July 12th, 2007, 2:54 am

like a script_brushmodel

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » July 12th, 2007, 3:13 am

Yes it is possible, you can treat a brushmodel just like a user.
Like so:

Code: Select all

brushtrigger()
{
brush = getent ("brush","targetname");
trig = getent ("trigger","targetname");
while (1)
{
if (brush istouching(trig))
	{
         //Do Stuff Here
	}
}
}
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

Jumpy'z
CJ Wannabe
CJ Wannabe
Posts: 13
Joined: December 28th, 2006, 5:55 pm
Location: Quebec, Canada

Post by Jumpy'z » July 12th, 2007, 3:54 am

k thx... ill try it tomorrow :)

Lethal323

Post by Lethal323 » July 12th, 2007, 6:23 am

wOw, I learned something new today :)

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » July 12th, 2007, 11:28 am

Nightmare is correct, but I couldn't help but wondering about the reason behind this.

For your objects to ever touch, they need to be moving.
If your objects are moving, that means you have scripted them to move.
If you have scripted them to move, why not just script them to trigger when you want?
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests