| Author |
Topic: CoD2 Bubble Problem! |
| tHMatt |
 |
General Member Since: Sep 11, 2007 Posts: 473 Last: Mar 20, 2013 [view latest posts] |
|
|
|
|
| liltc64 |
General Member Since: Feb 12, 2007 Posts: 906 Last: Oct 22, 2012 [view latest posts] |
|
|
 |
|
Category: CoD2 Scripting Posted: Saturday, Jan. 7, 2012 10:33 am |
 |
Dobriy writes...Quote: IzNoGoD writes...Quote: Dobriy writes...Quote: nemanja-1997
U can use my script
Code: main
{
level._effect["nuk"] = loadfx ("fx/zombie/dbubble_deploy.efx");
level._effect["nuks"] = loadfx ("fx/zombie/dbubble_hit.efx");
level._effect["nu"] = loadfx ("fx/zombie/dbubble_green.efx");
level._effect["s"]= loadfx ("fx/zombie/dbubble_powerdown.efx");
self.hudbuble destroy();
self.hudbuble = newClientHudElem(self);
self.hudbuble.alignx = "center";
self.hudbuble.x = 330;
self.hudbuble.y = 120;
self.hudbuble.fontscale = 1.2;
self.hudbuble.label = &"^2`^9[^1For Delete^9]^2:";
bubble = spawn( "script_model",self.origin+(0,0,20));
bubble setModel("xmodel/bx_dbubble");
time=60;
while(1)
{
time-=0.1;
self.hudbuble setValue(int(time));
bubble rotateto((0, randomfloat(360), randomfloat(360)), 0.4);
playFx( level.fx_dbubble_loop, bubble.origin + (0,0,15));
wait 0.1;
if(time<=0 || self.pers["team"]!="allies" )
{
self.hudbuble destroy();
bubble hide();
playFx( level._effect["s"], bubble.origin );
bubble delete();
self.spawnprotected=false;
break;
}
players = getEntArray( "player", "classname" );
for( i = 0; i < players.size; i++ )
{
if(players[i].pers["team"]=="axis" && distance(bubble.origin, players[i].origin ) < 100 && isAlive(players[i]))
{
playFx( level._effect["nuks"],players[i].origin+(0,0,15));
players[i].health = players[i].health + 300;
players[i] finishPlayerDamage(players[i], players[i], 300, 0, "MOD_PROJECTILE", "panzerschreck_mp", bubble.origin, vectornormalize(players[i].origin - bubble.origin), "none", 0);
}
if(players[i].pers["team"]=="allies" && distance(bubble.origin, players[i].origin ) < 100 && isAlive(players[i]))
{
players[i].spawnprotected=true;
}
if(players[i].pers["team"]=="allies" && distance(bubble.origin, players[i].origin ) >= 100 && isAlive(players[i]))
{
players[i].spawnprotected=false;
}
}
}
}
at least 3 things wrong witht his code: the loadfx() is called too late, so it runs after a wait. Dont ever do this.
The typo: main should be main()
And last but not least: having a while(true) loop which breaks on one condition. Put it in the fkcing loop if you dont mind. thx.
IzNoGoD,You consider yourselves as the cleverest at the given forum? Can before criticising that that is checked really up and works, you show something the instead of will philosophise before those who understands of nothing in cod2 scripting and your advice are not necessary to them, scripts are necessary to them.thx
i dont know if its your spelling or its cause iv been up all night. but the only reason why people like Matty Iznogod reply to what they say. is because you are just handing this dude your code and not teaching him 1 damn thing... how are you about to say his advice is not necessary and the giving the codes are? are you stupid. and of course im already waiting for it cause every time i throw my opinion out at someone like this this thread will probs get locked and this post probs wont even get to you in time. but try and understand iznogod is like every normal person... he dosnt want to see codes being thrown around that people do no understand and that are not trying to learn and trying to find the easy route out. if someone for once could even just pretend to care and say. "hey i got this code i dont know exactly how it works im trying to understand it could someone help me along these lines" everyone would love to help! but someone posting iznogods code in particular that dosnt know sh!t about it and saying dosnt work help. yeah your not getting the easy card. for you just giving this dude a code you probs didnt even make your self throws you into the "dont help this dude to much on modsonline category". atleast thats how i see it. k bye. |
 |
|
|
| Dobriy |
General Member Since: Mar 31, 2011 Posts: 96 Last: May 23, 2012 [view latest posts] |
|
|
|
|
| BraX |
 |
General Member Since: Apr 29, 2008 Posts: 413 Last: May 26, 2012 [view latest posts] |
|
|
 |
|
Category: CoD2 Scripting Posted: Monday, Jan. 9, 2012 04:14 pm |
 |
Dobriy writes...Quote: nemanja-1997
U can use my script
Code: main
{
level._effect["nuk"] = loadfx ("fx/zombie/dbubble_deploy.efx");
level._effect["nuks"] = loadfx ("fx/zombie/dbubble_hit.efx");
level._effect["nu"] = loadfx ("fx/zombie/dbubble_green.efx");
level._effect["s"]= loadfx ("fx/zombie/dbubble_powerdown.efx");
self.hudbuble destroy();
self.hudbuble = newClientHudElem(self);
self.hudbuble.alignx = "center";
self.hudbuble.x = 330;
self.hudbuble.y = 120;
self.hudbuble.fontscale = 1.2;
self.hudbuble.label = &"^2`^9[^1For Delete^9]^2:";
bubble = spawn( "script_model",self.origin+(0,0,20));
bubble setModel("xmodel/bx_dbubble");
time=60;
while(1)
{
time-=0.1;
self.hudbuble setValue(int(time));
bubble rotateto((0, randomfloat(360), randomfloat(360)), 0.4);
playFx( level.fx_dbubble_loop, bubble.origin + (0,0,15));
wait 0.1;
if(time<=0 || self.pers["team"]!="allies" )
{
self.hudbuble destroy();
bubble hide();
playFx( level._effect["s"], bubble.origin );
bubble delete();
self.spawnprotected=false;
break;
}
players = getEntArray( "player", "classname" );
for( i = 0; i < players.size; i++ )
{
if(players[i].pers["team"]=="axis" && distance(bubble.origin, players[i].origin ) < 100 && isAlive(players[i]))
{
playFx( level._effect["nuks"],players[i].origin+(0,0,15));
players[i].health = players[i].health + 300;
players[i] finishPlayerDamage(players[i], players[i], 300, 0, "MOD_PROJECTILE", "panzerschreck_mp", bubble.origin, vectornormalize(players[i].origin - bubble.origin), "none", 0);
}
if(players[i].pers["team"]=="allies" && distance(bubble.origin, players[i].origin ) < 100 && isAlive(players[i]))
{
players[i].spawnprotected=true;
}
if(players[i].pers["team"]=="allies" && distance(bubble.origin, players[i].origin ) >= 100 && isAlive(players[i]))
{
players[i].spawnprotected=false;
}
}
}
}
Another moroon modified my script and shared here. "U can use my script" made me laugh.. Oh there's also bx_ ( Bra X_) prefixed model and my effects.
|
 |
|
|
| Dobriy |
General Member Since: Mar 31, 2011 Posts: 96 Last: May 23, 2012 [view latest posts] |
|
|
|
Category: CoD2 Scripting Posted: Wednesday, Jan. 11, 2012 07:44 am |
 |
BraX writes...Quote: Dobriy writes...Quote: nemanja-1997
U can use my script
Code: main
{
level._effect["nuk"] = loadfx ("fx/zombie/dbubble_deploy.efx");
level._effect["nuks"] = loadfx ("fx/zombie/dbubble_hit.efx");
level._effect["nu"] = loadfx ("fx/zombie/dbubble_green.efx");
level._effect["s"]= loadfx ("fx/zombie/dbubble_powerdown.efx");
self.hudbuble destroy();
self.hudbuble = newClientHudElem(self);
self.hudbuble.alignx = "center";
self.hudbuble.x = 330;
self.hudbuble.y = 120;
self.hudbuble.fontscale = 1.2;
self.hudbuble.label = &"^2`^9[^1For Delete^9]^2:";
bubble = spawn( "script_model",self.origin+(0,0,20));
bubble setModel("xmodel/bx_dbubble");
time=60;
while(1)
{
time-=0.1;
self.hudbuble setValue(int(time));
bubble rotateto((0, randomfloat(360), randomfloat(360)), 0.4);
playFx( level.fx_dbubble_loop, bubble.origin + (0,0,15));
wait 0.1;
if(time<=0 || self.pers["team"]!="allies" )
{
self.hudbuble destroy();
bubble hide();
playFx( level._effect["s"], bubble.origin );
bubble delete();
self.spawnprotected=false;
break;
}
players = getEntArray( "player", "classname" );
for( i = 0; i < players.size; i++ )
{
if(players[i].pers["team"]=="axis" && distance(bubble.origin, players[i].origin ) < 100 && isAlive(players[i]))
{
playFx( level._effect["nuks"],players[i].origin+(0,0,15));
players[i].health = players[i].health + 300;
players[i] finishPlayerDamage(players[i], players[i], 300, 0, "MOD_PROJECTILE", "panzerschreck_mp", bubble.origin, vectornormalize(players[i].origin - bubble.origin), "none", 0);
}
if(players[i].pers["team"]=="allies" && distance(bubble.origin, players[i].origin ) < 100 && isAlive(players[i]))
{
players[i].spawnprotected=true;
}
if(players[i].pers["team"]=="allies" && distance(bubble.origin, players[i].origin ) >= 100 && isAlive(players[i]))
{
players[i].spawnprotected=false;
}
}
}
}
Another moroon modified my script and shared here. "U can use my script" made me laugh.. Oh there's also bx_ ( Bra X_) prefixed model and my effects.
BraX,Yes, anybody here also doesn't tell that models and effects are made by me, alas, I am not able to make it |
 |
|
|
|
|
mp_TempleCall of Duty: Mods: Multiplayer (624.12Kb)
|