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 2
Category: CoD2 SP Mapping
Call of Duty 2 single player mapping, scripting and everything single player.
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: FOY...or ...um ...whatever
antonio.horvatovic0
General Member
Since: Jan 31, 2014
Posts: 225
Last: Jul 14, 2017
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Wednesday, Feb. 26, 2014 11:07 am
Do I have to add a trigger covering the water and add the script to it?
I want to make it just that the player not be able to crouch under it cause I dont want to make underwater world.

edited on Feb. 26, 2014 08:13 am by antonio.horvatovic0

Estonian, could I use your script you've posted b4 and just add "level.player allowProne(true);" ?
Share |
antonio.horvatovic0
General Member
Since: Jan 31, 2014
Posts: 225
Last: Jul 14, 2017
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Monday, Mar. 31, 2014 09:34 am
Yes, it worked. tnx 3st0nian...
I've maid it like this:


trigger = getent("trigger", "targetname");
isInWater = false;

for(;;)
{
if(level.player isTouching(trigger) && !isInWater)
{
setsavedcvar("g_speed", 100);
isInWater = true;
level.player allowProne(false);
level.player allowCrouch(false);

if(!(level.player isTouching(trigger)) && isInWater)
{
setsavedcvar("g_speed", 190);
isInWater = false;
level.player allowProne(true);
level.player allowCrouch(true);
}
wait 0.1;
}
Share |
antonio.horvatovic0
General Member
Since: Jan 31, 2014
Posts: 225
Last: Jul 14, 2017
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Monday, Mar. 31, 2014 09:36 am
Now I'll try to make it for 2 triggers...one for disallownig crouch and prone, and one for just prone position...
Share |
3st0nian
General Member
Since: Jan 14, 2008
Posts: 291
Last: Dec 4, 2017
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 SP Mapping
Posted: Monday, Mar. 31, 2014 04:39 pm
Glad you got it working [rocking]
Sorry about not answering, I somehow forgot [ohwell]
Share |
3st0nian
General Member
Since: Jan 14, 2008
Posts: 291
Last: Dec 4, 2017
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 SP Mapping
Posted: Monday, Mar. 31, 2014 04:49 pm
Havent tested it:
Code:

main()
{
	maps\_load::main();
	trigger = getent("trigger", "targetname");
	trigger2 = getent("trigger2", "targetname");
//Use false if you want to disable that stance, otherwise use true
	trigger thread waterCheck(false, false, true);//Disable prone and crouch
	trigger2 thread waterCheck(false, true, true);//Disable prone only
}

waterCheck(prone, crouch, stand)
{
	isInWater = false;

	for(;;)
	{
	if(level.player isTouching(trigger) && !isInWater)
	{
		setsavedcvar("g_speed", 100);
		isInWater = true;
		if(!prone)
			level.player allowProne(false);
		if(!crouch)
			level.player allowCrouch(false);
		if(!stand)
			level.player allowStand(false);
	}
	if(!(level.player isTouching(trigger)) && isInWater)
	{
		setsavedcvar("g_speed", 190);
		isInWater = false;
		if(!prone)
			level.player allowProne(true);
		if(!crouch)
			level.player allowCrouch(true);
		if(!stand)
			level.player allowStand(true);
	}
	wait 0.1;
	}
}
Share |
antonio.horvatovic0
General Member
Since: Jan 31, 2014
Posts: 225
Last: Jul 14, 2017
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Monday, Mar. 31, 2014 07:06 pm
There's no need for you to apologize for anything. I'm really glad you're helping me out (it's like 50% of my map created thanks to you) and you're answering all my questions...[thumbs_up]
Share |
Restricted Access Topic is Locked
Page
Previous Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 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

»