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

Members Online

»
0 Active | 22 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
Previous Page Next Page
subscribe
Author Topic: enable linkto
hyper1234
General Member
Since: Mar 17, 2009
Posts: 358
Last: Apr 13, 2011
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Tuesday, Jul. 20, 2010 08:03 am
DemonSeed writes...
Quote:
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?


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 [thumbs_up]
Share |
hyper1234
General Member
Since: Mar 17, 2009
Posts: 358
Last: Apr 13, 2011
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Tuesday, Jul. 20, 2010 08:06 am
Also, for a trig_hurt, you need these values/keys for it to hurt somebody.

Code:
Key: dmg
Value: #


Where '#' is an integer.
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 09:20 am
If a trigger_hurt loses its damage when moving, I would approach the problem from a different angle - I would simply give up using trigger_hurt and use a trigger_radius instead and script the damage to the player manually by using radiusdamage(). Just look at iw_07.iwd\maps\mp\_minefields.gsc and customize the code accordingly.

I did a script once for COD2, where a trigger_radius followed a set of node points. If a player touched the trigger at any point while it was moving he was teleported to a Jail model (it was for a version of Liberation gametype). Getting the trigger to move was really easy, and didnt require the use of Linkto(). I just used the moveto() function.
Share |
clanhelio
General Member
Since: Aug 30, 2008
Posts: 223
Last: Mar 23, 2011
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Wednesday, Jul. 21, 2010 06:02 pm
You can link the trigger to the thing that moves though.

...Yes?
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Thursday, Jul. 22, 2010 07:34 am
i know what you mean but there is a way of simply attaching a trigger_hurt to a moving script brushmodel without it losing its power, it was a simple command called link to or something there was a forum on a different website about it.

All it does is "link" the trigger_hurt to the brushmodel. i no it works because i had it on my other map but my computer when dodgy and had to reformat and lost everything. so im trying to get everything back again and start up modding again that why im asking so many questions.

But the bottom line is there is a simple way to do it.
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Thursday, Jul. 22, 2010 08:45 am
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");

}
}

Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Thursday, Jul. 22, 2010 08:50 am
it was something like that although i might of made some blatent mistake as i am rubbish at scripting
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Thursday, Jul. 22, 2010 10:12 am
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.
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Thursday, Jul. 22, 2010 10:14 am
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");

}
}
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: Thursday, Jul. 22, 2010 10:57 am
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");
		}
	}
}
Share |
Restricted Access Topic is Locked
Page
Previous 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

»