Author |
Topic: enable linkto |
hyper1234 |
|
General Member Since: Mar 17, 2009 Posts: 358 Last: Apr 14, 2011 [view latest posts] |
|
|
Category: CoD2 Scripting Posted: Tuesday, Jul. 20, 2010 03:03 pm |
|
DemonSeed writes...Quote: ukdjaj writes...Quote: no thats the script which i need to add it to, i just have no idea where
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?
Correct me if i'm wrong demonseed, but, he wants a trigger_hurt to link to a moving scriptbrushmodel and if you touch the trigger whilst the scriptbrushmodel is moving, if you touch it, you die. The trigger he is currently using is a trigger_use_touch (as he says).
I've had trouble with this as-well, when you move a trigger_hurt with the move command (movex, moveyy, moveyz(or any other movement for that matter)), it loses its damage value and theoretically because a moving trigger with not purpose (theroretical as we don't know its moving or not as we cannot see it).
I tried numerous things with this one and failed. I tried enabling the trigger to link with other things, then link it to the scriptbrushmodel.
That didn't work and i've also tried welding them together, nothing.
Would like to know if you solve this |
|
|
|
hyper1234 |
|
General Member Since: Mar 17, 2009 Posts: 358 Last: Apr 14, 2011 [view latest posts] |
|
|
Category: CoD2 Scripting Posted: Tuesday, Jul. 20, 2010 03:06 pm |
|
Also, for a trig_hurt, you need these values/keys for it to hurt somebody.
Code: Key: dmg
Value: #
Where '#' is an integer. |
|
|
|
DemonSeed |
General Member Since: Apr 30, 2009 Posts: 1362 Last: Feb 19, 2018 [view latest posts] |
|
|
|
|
clanhelio |
General Member Since: Aug 30, 2008 Posts: 223 Last: Mar 24, 2011 [view latest posts] |
|
|
|
ukdjaj |
|
General Member Since: Jun 1, 2008 Posts: 2726 Last: Nov 15, 2020 [view latest posts] |
|
|
|
ukdjaj |
|
General Member Since: Jun 1, 2008 Posts: 2726 Last: Nov 15, 2020 [view latest posts] |
|
|
Category: CoD2 Scripting Posted: Thursday, Jul. 22, 2010 03:45 pm |
|
all it was was connecting the trigger_hurt to the brushmodel without it losing power. using the "enablelinkto" function
something like this
Quote:
main()
{
thread slidedoor_slider ();
}
linkto(trigger_hurt);
enablelinkto(slidedoor);
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");
}
}
|
|
|
|
ukdjaj |
|
General Member Since: Jun 1, 2008 Posts: 2726 Last: Nov 15, 2020 [view latest posts] |
|
|
|
ukdjaj |
|
General Member Since: Jun 1, 2008 Posts: 2726 Last: Nov 15, 2020 [view latest posts] |
|
|
Category: CoD2 Scripting Posted: Thursday, Jul. 22, 2010 05:12 pm |
|
found here http://modsonline.com/Forums-top-101944.html
Quote: Posted: Monday, May. 11, 2009 03:21 pm
there is a way.... forget it now but i think you search
"enable link to" in google
othersomthing like that then website comes up and u use that script or somthing or other =D
thanks, ukdjaj
actually used to work to solve this problem only problem is the websites gone. |
|
|
|
ukdjaj |
|
General Member Since: Jun 1, 2008 Posts: 2726 Last: Nov 15, 2020 [view latest posts] |
|
|
Category: CoD2 Scripting Posted: Thursday, Jul. 22, 2010 05:14 pm |
|
managed to come up with this script idk how it will work but this is along the right lines.
Quote: self.bombtrigger EnableLinkTo();
main()
{
thread slidedoor_slider ();
}
trigger_hurt Enablelinkto();
linkto (slidedoor);
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");
}
}
|
|
|
|
DemonSeed |
General Member Since: Apr 30, 2009 Posts: 1362 Last: Feb 19, 2018 [view latest posts] |
|
|
|
Category: CoD2 Scripting Posted: Thursday, Jul. 22, 2010 05:57 pm |
|
Try this:
Code: main()
{
thread slidedoor_slider ();
}
slidedoor_slider()
{
slidedoor = getEnt( "slidedoor", "targetname" );
trig = getEnt( "slideopen", "targetname" );
trig EnableLinkto();
trig Linkto( slidedoor );
while( true )
{
trig waittill( "trigger", player );
if( isPlayer( player ) && player isTouching( trig ) )
{
slidedoor movez(-64, 2, 0.5, 0.5);
slidedoor waittill ("movedone");
wait (5);
slidedoor movez( 64, 2, 0.5, 0.5 );
slidedoor waittill ("movedone");
}
}
}
|
|
|
|