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

Members Online

»
1 Active | 26 Guests
Online:

LATEST FORUM THREADS

»
Call of DutyŽ: WWII
CoD WW2 General
SOF2 Prefabs map
SoFII Mapping
coduo mapping tools
CoDUO 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 08:16 am
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 08:36 am
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 02:11 pm
ah lol, I didn't think it's must be in:) many thanks
Share |
_INSANE_
General Member
Since: Nov 6, 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 12: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

»