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

Members Online

»
0 Active | 74 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 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 subscribe
Author Topic: Simpliest scripts crash my cod2 :S
Slipknot14
General Member
Since: Feb 23, 2005
Posts: 109
Last: Sep 4, 2012
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Friday, Nov. 21, 2008 03:16 pm
main()
{
maps\mp\_load::main();

setExpFog(0.99, 0.99, 0.99, 0.99, 0);
setCullFog(0.99, 6000, 0.99, 0.99, 0.99, 0);

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

thread ship_teleport();

}

ship_teleport()
{
trigger = getent ("start1","targetname");
while(1)
{
trigger waittill ("trigger", user);
user setOrigin( (30,260,-200) );
}
}


this is my script, and whenever I want to test my map with this, the cod2 stops at loading screen, and I can't do anything :S
I tried it with simply iprintlnbold or suicide but nothing. Happens the same.
Share |
BraX
General Member
Since: Apr 29, 2008
Posts: 413
Last: May 26, 2012
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Friday, Nov. 21, 2008 03:36 pm
allways give wait in while ;]

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

setExpFog(0.99, 0.99, 0.99, 0.99, 0);
setCullFog(0.99, 6000, 0.99, 0.99, 0.99, 0);

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

thread ship_teleport();

}

ship_teleport()
{
trigger = getent ("start1","targetname");
while(1)
{
trigger waittill ("trigger", user);
user setOrigin( (30,260,-200) );
wait 0.01;
}
}
Share |
Slipknot14
General Member
Since: Feb 23, 2005
Posts: 109
Last: Sep 4, 2012
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Friday, Nov. 21, 2008 09:11 pm
ah lol, I didn't think it's must be in:) many thanks
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: CoD2 Scripting
Posted: Monday, Jan. 12, 2009 07:21 am
As NovemberDobby told me.....


Don't put wait 0.01 in your while loop

NovemberDobby quote:
Quote:
Or your server will explode![lol]




make it a wait 0.05 instead.[thumbs_up]

edited on Jan. 12, 2009 02:21 am by INSANE{H|S}
Share |
Restricted Access Topic is Locked 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

»