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

Members Online

»
0 Active | 74 Guests
Online:

LATEST FORUM THREADS

»
run artillery on maps
CoD+UO Map + Mod Releases
Call of DutyŽ: WWII
CoD WW2 General

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: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Tuesday, Jul. 20, 2010 04: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 05:03 am
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: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Tuesday, Jul. 20, 2010 05:09 am
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 05:12 am
Well, your script doesnt use Linkto() so what are you worrying about it for?
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Tuesday, Jul. 20, 2010 05:16 am
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 05:23 am
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: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Tuesday, Jul. 20, 2010 05:24 am
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: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Tuesday, Jul. 20, 2010 05:25 am
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: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Tuesday, Jul. 20, 2010 05:27 am
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: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Tuesday, Jul. 20, 2010 05:32 am
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

»