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

Members Online

»
0 Active | 12 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 4
Category: CoD4 MP Mapping
CoD 4 mapping and level design for multiplayer.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Help with trigger
darkpheonixz4x
General Member
Since: Jul 7, 2012
Posts: 17
Last: Nov 7, 2012
[view latest posts]
Level 1
Category: CoD4 MP Mapping
Posted: Wednesday, Sep. 5, 2012 08:08 am
Im making a deathrun map and its going well. My problem is that i have 2 out of 5 triggers that are not working. This means the map works without errors but the hintstring of the triggers are not showing and the original trigger itself is not working. The trigger is a trigger_use.

Here is the two triggers that don't work's script.
Code:
trap_1() { bounce = getEnt("trap1_bounce","targetname"); trig = getEnt("decision_trap1_trig","targetname"); { trig waittill ("trigger"); bounce rotatePitch(-90,1,0,0); bounce waittill ("rotatedone"); wait(5); bounce rotatePitch(90,5,0,0); } } platform_hollow() { trig = getEnt("decision_trap2_trig","targetname"); { trig waittill ("trigger"); getEnt("trap2_plat1","targetname") notsolid(); } }


Any help would be appreciated. Please do tell me if you need anything more.
Share |
serthy
General Member
Since: Sep 8, 2010
Posts: 482
Last: Jun 28, 2013
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Wednesday, Sep. 5, 2012 08:32 am
you totally forgot to use a loop in your snippets
Code:
trap_1()
{
	bounce = getEnt( "trap1_bounce" , "targetname" );
	trig = getEnt( "decision_trap1_trig" , "targetname" );

	while( isDefined( bounce ) && isDefined( trig ) )
	{
		trig waittill( "trigger" );

		bounce rotatePitch( -90 , 1 , 0 , 0 );

		bounce waittill( "rotatedone" );

		wait( 5 );

		bounce rotatePitch( 90 , 5 , 0 , 0 );
	}
}

platform_hollow()
{
	trig = getEnt( "decision_trap2_trig" , "targetname" );
	trap = getEnt( "trap2_plat1" , "targetname" );

	while( isDefined( trig ) && isDefined( trap ) )
	{
		trig waittill( "trigger" );
	
		trap notsolid();
	}
}
Share |
darkpheonixz4x
General Member
Since: Jul 7, 2012
Posts: 17
Last: Nov 7, 2012
[view latest posts]
Level 1
Category: CoD4 MP Mapping
Posted: Wednesday, Sep. 5, 2012 11:57 am
Thanks for the reply, but that didnt work [confused]

Any other ideas?
Share |
serthy
General Member
Since: Sep 8, 2010
Posts: 482
Last: Jun 28, 2013
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Wednesday, Sep. 5, 2012 01:18 pm
What does not work?... does the server crash?

ok i guess not so lets do some debugging....

Code:
trap_1()
{
	bounce = getEnt( "trap1_bounce" , "targetname" );
	trig = getEnt( "decision_trap1_trig" , "targetname" );

	while( isDefined( bounce ) && isDefined( trig ) )
	{
		trig waittill( "trigger" , player );

		if( isDefined( player ) && isPlayer( player ) )
			player iPrintLn( "You triggered decision_trap1_trig and activated trap1_bounce" );

		bounce rotatePitch( -90 , 1 , 0 , 0 );

		bounce waittill( "rotatedone" );

		wait( 5 );

		bounce rotatePitch( 90 , 5 , 0 , 0 );
	}

	iPrintLnBold( "This should never happen! (trap_1: decision_trap1_trig or trap1_bounce not found!)" );
}

platform_hollow()
{
	trig = getEnt( "decision_trap2_trig" , "targetname" );
	trap = getEnt( "trap2_plat1" , "targetname" );

	while( isDefined( trig ) && isDefined( trap ) )
	{
		trig waittill( "trigger" , player );

		if( isDefined( player ) && isPlayer( player ) )
			player iPrintLn( "You triggered decision_trap2_trig and activated trap2_plat1" );

		trap notsolid();
	}

	iPrintLnBold( "This should never happen! (platform_hollow: decision_trap2_trig or trap2_plat1 not found!)" );
}
Share |
darkpheonixz4x
General Member
Since: Jul 7, 2012
Posts: 17
Last: Nov 7, 2012
[view latest posts]
Level 1
Category: CoD4 MP Mapping
Posted: Wednesday, Sep. 5, 2012 03:34 pm
Thanks for the reply, but it still doesn't work. The map runs fine but the trigger doesn't work. Please tell me if you something to look over it (eg my.map and my script)

Share |
serthy
General Member
Since: Sep 8, 2010
Posts: 482
Last: Jun 28, 2013
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Wednesday, Sep. 5, 2012 03:44 pm
Uhm... when you start your map, does is there a hint on the center of the screen? (if the script didnt found your elements, it should print you something)
or if you use your trigger, is there something pronted to you?...

how do you call your script?

like thread maps\mp\_traps::trap_1(); or how?
Share |
darkpheonixz4x
General Member
Since: Jul 7, 2012
Posts: 17
Last: Nov 7, 2012
[view latest posts]
Level 1
Category: CoD4 MP Mapping
Posted: Friday, Sep. 7, 2012 04:32 am
Hey thanks for your help. I just re-made the trigger and it worked like a charm! [rocking]

But i have another problem now.

I made a misc/model and chose a xmodel, and it doesn't allow me to make it a script model. I want it to be moving in my map. Any ideas of what to do?


Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 MP Mapping

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

»