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

Members Online

»
0 Active | 95 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 SP Mapping
CoD 4 mapping and level design for single player.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Shoot then level ends
4codrazor
General Member
Since: Feb 23, 2012
Posts: 95
Last: Apr 7, 2016
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Monday, Jan. 26, 2015 07:14 am
Hey guys, i have a stealth level i have been working on and i want it so that when you are in the building at the beginning of the level if you shoot the level ends or the ai stop ignoring you. Does anyone know how to do this ? thanks [rocking]
Share |
MODDER_BC
General Member
Since: Oct 17, 2012
Posts: 54
Last: Jan 30, 2015
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Monday, Jan. 26, 2015 08:40 am
Here's an easy way to do that.

- Create a trigger_damage have it cover entire room.

Then use a function like so.
Code:
room_one()
{
enemies = getaiarray( "axis" );
for ( i=0; i < enemies.size; i++ )
	{
enemies[i].pacifist = true;
              }

room_trigger = getent("room_trig","targetname");
room_trigger waittill("trigger");

enemies = getaiarray( "axis" );
for ( i=0; i < enemies.size; i++ )
	{
enemies[i].pacifist = false;
// or end your level here.
              }

}
Share |
4codrazor
General Member
Since: Feb 23, 2012
Posts: 95
Last: Apr 7, 2016
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Monday, Jan. 26, 2015 11:20 am
hmm im a little bit confused with this script. so when i shoot inside the trigger the player dies and it comes up with a deathquote?
Share |
MODDER_BC
General Member
Since: Oct 17, 2012
Posts: 54
Last: Jan 30, 2015
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Monday, Jan. 26, 2015 07:46 pm
Here are the files including the map.
Check them out , see if they can help you.

Room Trigger Example

You can also use a Function like this:
Code:

room_trigger()
{
level.player.ignoreme = true;
room_trigger = getent("room_trig","targetname");
room_trigger waittill("trigger");
level.player.ignoreme = false;
}


It just depends on how you want to do it.
Share |
4codrazor
General Member
Since: Feb 23, 2012
Posts: 95
Last: Apr 7, 2016
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Tuesday, Jan. 27, 2015 02:36 am
--
See image: http://prntscr.com/5xjsg2
--

Okay so when my ai reaches that white node he plays an animation and says stop! enemy patrol dead ahead, follow me. and then he goes into the bathroom and the player follows then the player and the ai wait in there while the patrol passes. I think i know what im doing for this bit but i was wondering if you can make a script so that when a trigger_multiple is activated it damages the player.
Share |
MODDER_BC
General Member
Since: Oct 17, 2012
Posts: 54
Last: Jan 30, 2015
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Tuesday, Jan. 27, 2015 03:49 am
When the player touches the trigger?

Code:
hurt_player_trig()
{
Trig_HurtPlayer = getent("hurt_player_trigger","targetname");
Trig_HurtPlayer waittill("trigger");
level.player dodamage( level.player.health + 99999, ( 0, 0, 0 ) ); //99999 is amount of damage to do, this will kill the player
}
Share |
4codrazor
General Member
Since: Feb 23, 2012
Posts: 95
Last: Apr 7, 2016
[view latest posts]
Level 3
Category: CoD4 SP Mapping
Posted: Tuesday, Jan. 27, 2015 05:33 am
yeah thats what i wanted, thanks man. ill continue working on that scene when i get a chance and ill see how it turns out. thanks for all the help !
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 SP 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

»