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

Members Online

»
0 Active | 58 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
Next Page
subscribe
Author Topic: enable linkto
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Tuesday, Jul. 20, 2010 11:42 am
i was wondering how to use "enable link to" i remember doing it on a script when attacting a trigger damage to a door.

Quote:
main()
{
thread slidedoor_slider ();
}

slidedoor_slider()
{
slidedoor=getent("slidedoor","targetname");
trig=getent("slideopen","targetname");
while(1)
{
trig waittill ("trigger");
wait (1);
slidedoor movez (-64,2,0.5,0.5);
slidedoor waittill ("movedone");
wait (5);
trig waittill ("trigger");
slidedoor movez(64,2,0.5,0.5);
slidedoor waittill ("movedone");

}
}


anyway can someone tell me what to do or were to put it?

Thanks, Ukdjaj[thumbs_up]
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Tuesday, Jul. 20, 2010 12:03 pm
As you arent using Linkto() in that code there is no need to use it.

You only need to use EnableLinkto() for entities which dont normally support it. Its a work-around for legacy coding from the vCOD engine, where entities like player entities didnt support Linkto().

The easiest way to find out whether its needed or not is to use Linkto() and see if the game kicks off an error about it. Then, if it does, use it. However, you cannot enable Linkto() on all entities. I dont think it works well (if at all if memory serves me correctly) on triggers. You wont get an error, but the trigger refuses to link to the other entity.
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Tuesday, Jul. 20, 2010 12:09 pm
hmm, but on my other map im sure it worked when the door came down i remeber there was a offsite tutorial about adding triggers to brushmodels but i cant think of it
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Tuesday, Jul. 20, 2010 12:12 pm
Well, your script doesnt use Linkto() so what are you worrying about it for?
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Tuesday, Jul. 20, 2010 12:16 pm
no thats the script which i need to add it to, i just have no idea where [sad]
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Tuesday, Jul. 20, 2010 12:23 pm
ukdjaj writes...
Quote:
no thats the script which i need to add it to, i just have no idea where [sad]


Why do you need to add Linkto()? What purpose would it serve? The script moves the brushmodel when a player is on the trigger. Why would you need to link the trigger to the brushmodel?
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Tuesday, Jul. 20, 2010 12:24 pm
hmm i just a error, my trigger damages are not working fullstop..

in .gsc i have line map/mp/_load

and in the trigger texture for damage i did

"damage" "400"

without the quote marks so whats wrong there?
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Tuesday, Jul. 20, 2010 12:25 pm
and what im trying to do is i have a trigger_use to open the door. but the door has spikes at the bottom and i would like to trigger damage them but as the door moves up i need the trigger hurt moving with it
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Tuesday, Jul. 20, 2010 12:27 pm
BTW i fixed trigger error i was using trigger_damage but thats the 1 you shoot or bash at to make a script work i was looking for trigger_hurt works now =) but i still need help on the script
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2726
Last: Nov 15, 2020
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Tuesday, Jul. 20, 2010 12:32 pm
because when i use the trigger_hurt with a targetname slidedoor the hurt trigger works but the thing does not move up and down
Share |
Restricted Access Topic is Locked
Page
Next 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

»