| Author |
Topic: Cold_Breath... |
| SgtCortes69us |
General Member Since: Jul 27, 2006 Posts: 295 Last: Feb 5, 2010 [view latest posts] |
|
|
|
|
| eganwotv |
 |
Deactivated Account Since: May 28, 2007 Posts: 961 Last: Oct 31, 2010 [view latest posts] |
|
|
 |
|
Category: CoD2 MP Mapping Posted: Friday, Dec. 18, 2009 01:47 am |
 |
Try adding this code below, into the first script brackets of your maps main script.
Code: setEnvironment ("cold");
Example.
Code: main()
{
setEnvironment ("cold");
}
|
 |
|
|
| SgtCortes69us |
General Member Since: Jul 27, 2006 Posts: 295 Last: Feb 5, 2010 [view latest posts] |
|
|
|
Category: CoD2 MP Mapping Posted: Friday, Dec. 18, 2009 06:29 am |
 |
vT-Ownage writes...Quote: Try adding this code below, into the first script brackets of your maps main script.
Code: setEnvironment ("cold");
Example.
Code: main()
{
setEnvironment ("cold");
}
Sorry bro, but that code it doesnt work. |
 |
|
|
| DemonSeed |
General Member Since: Apr 30, 2009 Posts: 1362 Last: Feb 19, 2018 [view latest posts] |
|
|
 |
|
Category: CoD2 MP Mapping Posted: Friday, Dec. 18, 2009 07:22 am |
 |
This should do it:
Code: main()
{
level.breathfx = loadfx( "fx/misc/cold_breath.efx" );
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;;)
{
level waittill( "connecting", player );
player thread onPlayerSpawned();
}
}
onPlayerSpawned()
{
self endon( "disconnect" );
for(;;)
{
self waittill( "spawned_player" );
self thread breath_fx();
}
}
breath_fx()
{
self endon( "disconnect" );
self endon( "death" );
wait ( 2 + randomint(3) );
while( isAlive( self ) && self.sessionstate == "playing" )
{
playfxontag( level.breathfx, self, "J_Head" );
wait randomfloatrange(1.5,3.5);
}
}
Add that to your map's level script, starting at the main() function.
Also, make sure you have the FX files in your IWD file, in the right folders. |
 |
|
|
| FAFFER |
General Member Since: May 1, 2005 Posts: 647 Last: Sep 17, 2011 [view latest posts] |
|
|
|
|
| tomv8 |
 |
General Member Since: Oct 5, 2008 Posts: 469 Last: Jul 14, 2010 [view latest posts] |
|
|
|
|
| SgtCortes69us |
General Member Since: Jul 27, 2006 Posts: 295 Last: Feb 5, 2010 [view latest posts] |
|
|
|
Category: CoD2 MP Mapping Posted: Friday, Dec. 18, 2009 06:01 pm |
 |
DemonSeed writes...Quote: This should do it:
Code: main()
{
level.breathfx = loadfx( "fx/misc/cold_breath.efx" );
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;;)
{
level waittill( "connecting", player );
player thread onPlayerSpawned();
}
}
onPlayerSpawned()
{
self endon( "disconnect" );
for(;;)
{
self waittill( "spawned_player" );
self thread breath_fx();
}
}
breath_fx()
{
self endon( "disconnect" );
self endon( "death" );
wait ( 2 + randomint(3) );
while( isAlive( self ) && self.sessionstate == "playing" )
{
playfxontag( level.breathfx, self, "J_Head" );
wait randomfloatrange(1.5,3.5);
}
}
Add that to your map's level script, starting at the main() function.
Also, make sure you have the FX files in your IWD file, in the right folders.
Thanks for answer. Well I'm having problems with the compiling bad syntax error message. It seems that some brakets are giving me those errors, I've tried already removing them and adding but nothing it seems to work properly.
I know that script should work is only maybe I dont know what to do with those brakets {}.
I've place them right where you said, after the main() so it looks like this:
Code: //#include maps\_utility;
main()
{
level.breathfx = loadfx( "fx/misc/cold_breath.efx" );
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;;)
{
level waittill( "connecting", player );
player thread onPlayerSpawned();
}
}
onPlayerSpawned()
{
self endon( "disconnect" );
for(;;)
{
self waittill( "spawned_player" );
self thread breath_fx();
}
}
breath_fx()
{
self endon( "disconnect" );
self endon( "death" );
wait ( 2 + randomint(3) );
while( isAlive( self ) && self.sessionstate == "playing" )
{
playfxontag( level.breathfx, self, "J_Head" );
wait randomfloatrange(1.5,3.5);
}
}
Ofcourse after that theres more scripts which make some other functions and at the end, the last braket }
What can I do?
Thanks!!! |
 |
|
|
| tomv8 |
 |
General Member Since: Oct 5, 2008 Posts: 469 Last: Jul 14, 2010 [view latest posts] |
|
|
|
Category: CoD2 MP Mapping Posted: Friday, Dec. 18, 2009 06:07 pm |
 |
Quote: //#include maps\_utility;
main()
{
level.breathfx = loadfx( "fx/misc/cold_breath.efx" );
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;;)
{
level waittill( "connecting", player );
player thread onPlayerSpawned();
}
}
onPlayerSpawned()
{
self endon( "disconnect" );
for(;;)
{
self waittill( "spawned_player" );
self thread breath_fx();
}
}
breath_fx()
{
self endon( "disconnect" );
self endon( "death" );
wait ( 2 + randomint(3) );
while( isAlive( self ) && self.sessionstate == "playing" )
{
playfxontag( level.breathfx, self, "J_Head" );
wait randomfloatrange(1.5,3.5);
}
}
#include maps\_utility;
main()
{
maps\_load::main();
level.breathfx = loadfx( "fx/misc/cold_breath.efx" );
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;;)
{
level waittill( "connecting", player );
player thread onPlayerSpawned();
}
}
onPlayerSpawned()
{
self endon( "disconnect" );
for(;;)
{
self waittill( "spawned_player" );
self thread breath_fx();
}
}
breath_fx()
{
self endon( "disconnect" );
self endon( "death" );
wait ( 2 + randomint(3) );
while( isAlive( self ) && self.sessionstate == "playing" )
{
playfxontag( level.breathfx, self, "J_Head" );
wait randomfloatrange(1.5,3.5);
}
}
try that :P |
 |
|
|
| FAFFER |
General Member Since: May 1, 2005 Posts: 647 Last: Sep 17, 2011 [view latest posts] |
|
|
|
Category: CoD2 MP Mapping Posted: Friday, Dec. 18, 2009 06:25 pm |
 |
anyway to get 3rd person view with one person to test this?
in waw.
edited on Dec. 18, 2009 01:44 pm by FAFFER
cg_thirdPerson 1
Turns on 3rd person view on.
can't see any breath tho
i dont have any errors either.... |
 |
|
|
| tomv8 |
 |
General Member Since: Oct 5, 2008 Posts: 469 Last: Jul 14, 2010 [view latest posts] |
|
|
|
|
|
|
mp_TempleCall of Duty: Mods: Multiplayer (624.12Kb)
|