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

Members Online

»
0 Active | 9 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 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 4
Category: CoD4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Disallow Prone "Trigger"
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Monday, Feb. 16, 2009 01:17 am
Hey guys,

I'm trying to use a trigger_multiple to not allow players to go prone, while touching trigger. This is for a MP map.

I just can't figure out the right syntax here. Anyone have any ideas on how to make this work?

This is what I have right now that returns with an error:

unknown function
players[j] AllowProne( false );




Does this mean MP doesn't allow this function to be carried out?
Because I have tried many different instances of allowprone( false ); with the same error of unknown function. This only an SP thing?
Quote:
Here is the raw script, I had to put spaces in the
for(i
and
for(j
lines because it won't post the code otherwise. Unless spaces are allowed, I don't know. I have a screenshot of the correct script above, without the spaces.


Code:
main()
{
	thread no_prone();

}
no_prone()
{
	noprone = getentarray("prone","targetname");
	for(i = 0 ; i < noprone.size; i++)
	{
		noprone[i] thread no_prone_player();
	}
}

no_prone_player()
{
	players = get_players();
	for( j = 0 ; j < players.size; j++ )
	{
		players[j] AllowProne( false );	
	}

	while(1)
	{
		self waittill("trigger");
		iprintlnbold("touching triggers");

	}
}


What am I missing? Anyone have any ideas?
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Monday, Feb. 16, 2009 02:36 am
allowprone() is SP only. the only way to prevent players from proning is a dirty menu-workaround
Share |
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Monday, Feb. 16, 2009 02:45 am
Just as I suspected, now that is a bummer.

Thanks for the info.
Share |
_INSANE_
General Member
Since: Nov 7, 2008
Posts: 352
Last: Jul 10, 2011
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Thursday, Feb. 19, 2009 09:33 pm
I don't think you could force them to stand back up... or prevent them from going prone... unless you do it a dirty way...

But you could just kill them... and in the future they would know not to go prone there..

try replacing your no_prone_player thread with this..

Code:
no_prone_player()
{
	players = get_players();
	while(1)
	{
		self waittill("trigger");
		for( j = 0 ; j < players.size; j++ )
		{
			if (players[j] GetStance() == "prone" && players[j] istouching(self))
			{
				players[j] suicide();
				players[j] iprintlnbold("Do not go prone here");
			}	<br />
<br />
		}<br />
<br />
	}<br />
<br />
}


Share |
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Thursday, Feb. 19, 2009 09:44 pm
Well, INSANE,

I have a map that has water all over the map, the whole thing is a trigger. Using the Drown script everyone was using, players could drown in the water, but because the spawn points were in the "Above trigger" not the actual "drown trigger" the servers would crash with script errors. My whole point was to try to get players to not go underwater. So I had to get rid of that script in this map because of the spawn points.

So what I wanted to attempt to do was to make a trigger where only the water was, or the height of the water. Allow players to not be able to go prone while they were in the trigger. Otherwise players hide under the water and can pretty much sit under there and do what they please. You can't shoot out of the water, and bullets can't penetrate the water, so you can't get hit, underwater.

Was trying to deter from using this glitch.

I will keep the snippet though in case more testing is needed. A final version of the map has already been released. I might do some testing with this anyways. Thanks for your help.
Share |
_INSANE_
General Member
Since: Nov 7, 2008
Posts: 352
Last: Jul 10, 2011
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Thursday, Feb. 19, 2009 09:47 pm
Ohhhhh.. I see now [casanova]

Sounds cool. Good luck on your quest[thumbs_up]
Share |
SniperUK
General Member
Since: Apr 5, 2007
Posts: 13
Last: Jul 21, 2011
[view latest posts]
Level 1
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Friday, Feb. 20, 2009 11:23 pm
May I do the honors, and point you in the direction of the Drowning in Water tutorial. It's COD 2 but it still works for COD 4.

Drowning in Water

Download the attached zip file.

Hope this helps

Edit: oops, just saw that you've already used that tute. Shame realy, its'a a good tute. I've never had a problem or known of a problem with the code or crashing etc.

SniperUK

edited on Feb. 20, 2009 06:29 pm by SniperUK
Share |
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Friday, Feb. 20, 2009 11:41 pm
The script works fine, you just can't have players spawn in the Drown trigger, which is the lower trigger. It causes Script errors on the server side. I use the drown script in two other of our maps, and no problems there, because players are Not spawning in the drown trigger.

Spawn in Drown Trigger = Server Crashes.
Share |
SniperUK
General Member
Since: Apr 5, 2007
Posts: 13
Last: Jul 21, 2011
[view latest posts]
Level 1
Im a fan of MODSonair
Category: CoD4 Scripting
Posted: Saturday, Feb. 21, 2009 02:39 am
Just a thought. What if you were to spawn on a high platform., into a trigger that was a teleport, down to the ground. Would that work?

As I said, just a thought.

Sniperuk.
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Saturday, Feb. 21, 2009 05:29 pm
is there any error message or something when server crashes? (make sure you run in dev mode, devmap / developer 1 / developer_script 1 (optional)
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 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

»