Author |
Topic: Snow problem |
cod2fun |
General Member Since: Aug 26, 2009 Posts: 75 Last: Sep 13, 2010 [view latest posts] |
|
|
Category: CoD2 MP Mapping Posted: Friday, Sep. 10, 2010 02:01 pm |
|
every time my map load and i start get this error message...and after that ctd ...
******* script runtime error *******
type undefined is not an int: (file 'maps/mp/mp_snow.gsc', line 37)
if(trace["fraction"] != 1) playfx(level.rasta_cod2_rain,trace["position"]);
*
started from:
(file 'maps/mp/mp_snow.gsc', line 38)
wait 0.05;
*
************************************
this is snow gsc
Code: //Script by rasta, please credit if used
main()
{
level thread rasta_cod2_rain();
}
rasta_cod2_rain()
{
zufall = RandomInt(100);
while(1) {
players = getentarray("player", "classname");
if(players.size > 0) {
max_nodes = 20;
max_nodes_per_player = max_nodes/players.size;
for(ii=0;ii<max_nodes_per_player;ii++) {
for(i = 0; i < players.size; i++) {
player = players[i];
if(isAlive(player)) {
x= 350-randomfloat(700);
y= 350-randomfloat(700);
pos = player.origin +(x,y,200) ;
trace = bulletTrace(pos,pos +(0,0,-250), true, undefined);
if(trace["fraction"] != 1) playfx(level.rasta_cod2_rain,trace["position"]);
wait 0.05;
}
}
}
}
wait 0.05;
}
}
|
|
|
|
ivan_cro |
|
General Member Since: Jul 21, 2008 Posts: 463 Last: Oct 27, 2010 [view latest posts] |
|
|
Category: CoD2 MP Mapping Posted: Friday, Sep. 10, 2010 05:19 pm |
|
This has to work.
Your mapname.gsc:
Code: main()
{
maps\mp\_load::main();
maps\mp\YOURMAPNAME_fx::main();
level.rasta_cod2_rain = loadfx ("fx/misc/snow_light.efx");
}
Your mapname_fx.gsc:
Code: //Script by rasta, please credit if used
main()
{
level thread rasta_cod2_rain();
}
rasta_cod2_rain()
{
zufall = RandomInt(100);
while(1) {
players = getentarray("player", "classname");
if(players.size > 0) {
max_nodes = 20;
max_nodes_per_player = max_nodes/players.size;
for(ii=0;ii<max_nodes_per_player;ii++) {
for(i = 0; i < players.size; i++) {
player = players[i];
if(isAlive(player)) {
x= 350-randomfloat(700);
y= 350-randomfloat(700);
pos = player.origin +(x,y,200) ;
trace = bulletTrace(pos,pos +(0,0,-250), true, undefined);
if(trace["fraction"] != 1) playfx(level.rasta_cod2_rain,trace["position"]);
wait 0.05;
}
}
}
}
wait 0.05;
}
}
Hope this works for ya.
ivan_cro
|
|
|
|
cod2fun |
General Member Since: Aug 26, 2009 Posts: 75 Last: Sep 13, 2010 [view latest posts] |
|
|
|
lineage2soul |
General Member Since: Oct 25, 2010 Posts: 24 Last: Nov 8, 2010 [view latest posts] |
|
|
|
clanhelio |
General Member Since: Aug 30, 2008 Posts: 223 Last: Mar 24, 2011 [view latest posts] |
|
|
|
lineage2soul |
General Member Since: Oct 25, 2010 Posts: 24 Last: Nov 8, 2010 [view latest posts] |
|
|
|
IzNoGoD |
General Member Since: Nov 29, 2008 Posts: 694 Last: Nov 10, 2012 [view latest posts] |
|
|
|
BraX |
|
General Member Since: Apr 29, 2008 Posts: 413 Last: May 26, 2012 [view latest posts] |
|
|
|
Category: CoD2 MP Mapping Posted: Tuesday, Oct. 26, 2010 04:28 pm |
|
IzNoGoD writes...Quote: Snow in air is possible. Snow on ground is impossible.
It is possible but you will have to create new effect for that or edit old one.
lineage2soul writes...Quote: its able to get snow or rain efx for Graphic Directx7?
Sure it is rain and snow are just 2d particles, they can be rendered in both modes.
I will correct ivan's script:
Code: main()
{
maps\mp\_load::main();
level.rasta_cod2_rain = loadfx ("fx/misc/snow_light.efx"); // this must be before calling fx script
maps\mp\YOURMAPNAME_fx::main();
}
|
|
|
|
clanhelio |
General Member Since: Aug 30, 2008 Posts: 223 Last: Mar 24, 2011 [view latest posts] |
|
|
Category: CoD2 MP Mapping Posted: Tuesday, Oct. 26, 2010 07:53 pm |
|
IzNoGoD writes...Quote: Snow in air is possible. Snow on ground is impossible.
Wat. |
|
|
|
IzNoGoD |
General Member Since: Nov 29, 2008 Posts: 694 Last: Nov 10, 2012 [view latest posts] |
|
|
Category: CoD2 MP Mapping Posted: Tuesday, Oct. 26, 2010 08:31 pm |
|
clanhelio writes...Quote: IzNoGoD writes...Quote: Snow in air is possible. Snow on ground is impossible.
Wat.
Snow in air (aka: snowing) is possible, but snow on ground like in cod4 crash snow is impossible, it requires a whole new map |
|
|
|