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

Members Online

»
0 Active | 7 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 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
Next Page
subscribe
Author Topic: mapping
NoNam3
General Member
Since: Mar 18, 2011
Posts: 7
Last: Dec 10, 2011
[view latest posts]
Level 0
Category: CoD2 Scripting
Posted: Friday, Mar. 18, 2011 09:10 pm
hello, I'm a mapper and I am doing a zombie map. I have a question: can do a wall on the guid?. Please script, thx (I'm Polish, translators on google): D
Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Friday, Mar. 18, 2011 09:15 pm
Sorry, your translator hasn't translated your question very well. I cannot understand it.
Share |
DownloadAcc
General Member
Since: Nov 28, 2010
Posts: 70
Last: Apr 1, 2011
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Mar. 18, 2011 09:16 pm
http://www.freetranslation.com/
Share |
liltc64
General Member
Since: Feb 12, 2007
Posts: 906
Last: Oct 22, 2012
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Saturday, Mar. 19, 2011 06:58 pm
haha although that was a fail translator. iv had so many people that dont know english that xfires me randomly. so i actually think i know what he means [duh]. i think hes asking if he can pass threw a wall depending on what your guid number is. and im pretty sure there are allot of posts about this but ill just make this again for yah.

1. first you need to go into your map select your brush and then make it a brush model. with the selected brush press N and key = targetname. value = rawr.

2. make a trigger infront of your wall and make it a trigger_multiple then while you have that trigger selected you then press N and key = targetname. value = rawrtrig.

3. save your map then compile it. now its time for the scripting.

Code:
main()
{
	privateguid = 0; // <----- make any guid you want.
	thread cool(privateguid);
}

cool(pguid)
{
	wall = getent("rawr","targetname");
	walltrig = getent("rawrtrig","targetname");
	
	while(1)
	{
		walltrig waittill("trigger", player);
		
		checkguid = player getGuid();
		
		if(checkguid == pguid)
		{
			wall hide();
			wall notsolid();
			wait 2;
			wall show();
			wall solid();
		}
	}
}


if i miss spelt anything then my bad. but all that should work. good luck.
Share |
explo32
General Member
Since: May 8, 2008
Posts: 67
Last: Jan 7, 2015
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Monday, Aug. 15, 2011 09:39 pm
This script doesn't work. Can someone rewrite it to make it work properly?
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Monday, Aug. 15, 2011 10:54 pm
explo32 writes...
Quote:
This script doesn't work. Can someone rewrite it to make it work properly?


The script is correct.
You either have to post the error you are getting, or you are just not using it right.
Share |
explo32
General Member
Since: May 8, 2008
Posts: 67
Last: Jan 7, 2015
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Tuesday, Aug. 16, 2011 10:43 am
I made simple multiplayer map with wall and trigger_use_touch on it and compiled it. Then I made a gsc file:
Quote:

main()
{
maps\mp\_load::main();

ambientPlay("ambient_france");

game["allies"] = "american";
game["axis"] = "german";
game["attackers"] = "allies";
game["defenders"] = "axis";
game["american_soldiertype"] = "normandy";
game["german_soldiertype"] = "normandy";


maps\mp\_guid::main();

}


and put the script in another file:

Quote:
main()
{
privateguid = d88108d8; // <----- make any guid you want.
thread cool(privateguid);
}

cool(pguid)
{
wall = getent("rawr","targetname");
walltrig = getent("rawrtrig","targetname");

while(1)
{
walltrig waittill("trigger", player);

checkguid = player getGuid();

if(checkguid == pguid)
{
wall hide();
wall notsolid();
wait 2;
wall show();
wall solid();
}
}
}


After I launched the map I got this error:

******* script compile error *******
uninitialised variable 'd88108d8': (file 'maps/mp/_guid.gsc', line 3)
privateguid = d88108d8; // <----- make any guid you want.
*


Then I changed the line
Quote:
privateguid = d88108d8; // <----- make any guid you want.

to
Quote:
privateguid = "d88108d8"; // <----- make any guid you want.


And now after I launch my map and I walk to the trigger I get this:


so it must be problem with this line:
Quote:
walltrig waittill("trigger", player);


edited on Aug. 16, 2011 07:06 am by explo32
After opening console I can see these errors repeating all the time:
http://img829.imageshack.us/img829/74/plikm.jpg
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: CoD2 Scripting
Posted: Tuesday, Aug. 16, 2011 11:29 am
in a non dedicated server your guid will ALWAYS be zero (0) , so its senseless to use this there.

your guid from getGuid() is a number (integer), not a string (text) , as it was print in the error msg.

simply try:
Quote:
privateguid = 0;


Share |
explo32
General Member
Since: May 8, 2008
Posts: 67
Last: Jan 7, 2015
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Tuesday, Aug. 16, 2011 11:37 am
Sorry for my useless talking about problem with such a simple solution [duh] I didn't know about it, so I changed 0 to my guid at the very beginning. Now when it's 0 again, it works properly [tongue]

edited on Aug. 16, 2011 07:58 am by explo32
but a yet a small question: When I put my map on a non-local server, should this line look like this:
Quote:
privateguid = d88108d8;

or that
Quote:
privateguid = "d88108d8";

?
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Tuesday, Aug. 16, 2011 12:44 pm
Guid==a number
SO DO NOT USE ANY OTHER CHARACTERS!
dont use your pb guid, use your normal guid.
Share |
Restricted Access Topic is Locked
Page
Next 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

»