Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 91 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page
subscribe
Author Topic: Moving a trigger
clanhelio
General Member
Since: Aug 30, 2008
Posts: 223
Last: Mar 24, 2011
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, Dec. 4, 2010 06:05 am
Leal writes...
Quote:
Mystic writes...
Quote:
Try something like

Code:
brushEnt = getEnt( "movingbrush", "targetname" ); // name of brush you linking trigger too
trigEnt = getEnt( "movingtrigger", "targetname" ); // name of trigger
trigEnt linkTo( brushEnt );


The same, if you link it to the moving brush, it moves too, and this is not supported:

Code:
******* script runtime error *******
entity (classname: 'trigger_use_touch') does not currently support linkTo: (file 'maps/mp/mp_parlament.gsc', line 197)
 trig linkTo ( cockpit );
 *
[...]

Why are people not understanding this? Before you try to link the trigger, do

Code:
Trigger EnableLinkTo();

There...

By the way, this has exact topic is posted about every 2 months...try the search function, seriously.

Share |
Leal
General Member
Since: Feb 5, 2010
Posts: 196
Last: Aug 18, 2013
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, Dec. 4, 2010 09:21 am
Pedro699 writes...
Quote:
You may need to add an origin brush to the trigger, otherwise the game assumes its origin is at (0,0,0).

Check out the sd_bombtrigger.map file in radient to see how to create one. This is a moveable use trigger for defusing the bomb in S&D.


Okay I will check it.
Share |
Leal
General Member
Since: Feb 5, 2010
Posts: 196
Last: Aug 18, 2013
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, Dec. 4, 2010 09:23 am
clanhelio writes...
Quote:
Leal writes...
Quote:
Mystic writes...
Quote:
Try something like

Code:
brushEnt = getEnt( "movingbrush", "targetname" ); // name of brush you linking trigger too
trigEnt = getEnt( "movingtrigger", "targetname" ); // name of trigger
trigEnt linkTo( brushEnt );


The same, if you link it to the moving brush, it moves too, and this is not supported:

Code:
******* script runtime error *******
entity (classname: 'trigger_use_touch') does not currently support linkTo: (file 'maps/mp/mp_parlament.gsc', line 197)
 trig linkTo ( cockpit );
 *
[...]

Why are people not understanding this? Before you try to link the trigger, do

Code:
Trigger EnableLinkTo();

There...

By the way, this has exact topic is posted about every 2 months...try the search function, seriously.



So only if you move a trigger you need to enable it? Will see....

I'm sorry that I didn't find it, I searched, but if they don't put a sensible name I can not find it. (I deduce it because I did not find it...)

P.D.: Yes, it works very fine, thank you! Does somebody know how would it be with the distance, and with setting a different distance in the different axis?

edited on Dec. 4, 2010 04:30 am by Leal
Share |
Restricted Access Topic is Locked
Page
Previous Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»