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

Members Online

»
0 Active | 66 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: 2 triggers, who works after each other
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Monday, Feb. 19, 2007 07:49 pm
Ok, this might do the trick.
Name the trigger_multiple in your map "hinttrigger"
Code:

main()
{
	thread _Doos1();
}


_Doos1()
{

	level.trig_damage = getent("slottrigger1","targetname");
	trig_use = getent("triggerdoos1","targetname");
	doos1 = getent("doos1","targetname");

	//new trigger_multiple for player hint
	hint_trig = getent("hinttrigger","targetname");
	
	//store trig_use origin in oldorg
	oldorg = trig_use.origin;
	
	//now move trig_use into Davey Jones Locker
	trig_use.origin = oldorg - (0,0,10000);

  hint_trig thread hint();
  	
	level.trig_damage waittill("trigger");
	level.trig_damage delete();

	//bring trig_use back
	trig_use.origin = oldorg;
  
	trig_use waittill("trigger");

	doos1 rotateroll (-90,0.5);
	doos1 waittill ("rotatedone");
	trig_use delete();

}

hint() {
	while( isDefined(level.trig_damage) )
	{
	  self waittill ("trigger",other);
	  other iprintlnbold("Shoot the Lock if you dare");
	  wait(2);
	}
	self delete();
}


Regards Grassy
Share |
haggis
General Member
Since: Apr 26, 2006
Posts: 109
Last: Mar 8, 2008
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Monday, Feb. 19, 2007 08:05 pm
Hey,

It works good thanks for that. But is it possible that the message stay a bit shorter. I think the text stays to long in your window. Can I make it a shorter time?
Share |
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Monday, Feb. 19, 2007 08:47 pm
You could just change iprintlnbold to iprintln, this will clear faster.
Share |
haggis
General Member
Since: Apr 26, 2006
Posts: 109
Last: Mar 8, 2008
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Monday, Feb. 19, 2007 10:07 pm
Thanks,

It works perfect now.[thumbs_up]
Share |
haggis
General Member
Since: Apr 26, 2006
Posts: 109
Last: Mar 8, 2008
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Wednesday, Feb. 21, 2007 09:43 pm
Hey,

Other small question: Is it possible that I can add more senses in the following script and then it will randomize the senses. So that you got an other sense if you shoot another lock or maybe the same.

Code:
hint() {
	while( isDefined(level.trig_damage) )
	{
	  self waittill ("trigger",other);
	  other iprintln("Shoot the Lock if you dare");
	  wait(2);
	}
	
	}
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

»