View Full Version : Lost Helmet problem
Cz3koladowyPotwor
7th February 2013, 12:21
Hello everybody :)
I found _losthelmet in _ex_ mod but I've one problem. When I jump from a great height stops, helmet in the air and strange turns.
In general, there are no other problems.
Thread (in callback_playerDamage):
if(self.pers["team"] == "allies" && eAttacker != self) self thread scripts\systems\_lostHelmet::LostHelmet(vDir,iDama ge);
Script:
http://pastebin.com/2hTMA5GS
and video O_o:
http://www.xfire.com/videos/5d86cc
Thanks for help.
Do not look lines: 197-207
kung foo man
7th February 2013, 13:03
Replace every third argument of bullettrace() from true to false. I guess its colliding with the player.
And please indent your Code.
Cz3koladowyPotwor
7th February 2013, 13:08
eplace every third argument of bullettrace() from true to false.
Changed, but the error still occurs. :/
kung foo man
7th February 2013, 13:16
Can you make a video while the bug happens? First video just showed the end-result of the bug.
Cz3koladowyPotwor
7th February 2013, 13:33
Video for you :)
www.xfire.com/video/5e0bc4/
Tally
7th February 2013, 14:53
The helmet doesn't just come off the player avatar, no matter how high you jump. There must be a script poping it off (both AWE and eXtreme+ mods have helmet popping scripts). That leads me to ask: are you actually using the eXtreme+ mod? If so, you need to disable the helmet popping thread to stop it happening.
Cz3koladowyPotwor
9th February 2013, 12:24
The problem fixed. I found a better working script than that ;)
kung foo man
9th February 2013, 12:43
Thanks for your feedback, please post the script though :)
Cz3koladowyPotwor
10th February 2013, 07:53
script, maybe someone needed.
Callback_StartGameType()
thread [...]\_lostHelmet::init();
callback_playerDamage
self thread [...]\_lostHelmet::popHelmet();
Callback_playerKilled
dopop = false;
// Check for headpopping
switch(sHitLoc)
{
case "head":
case "helmet":
self thread Splatter_View();
if( randomInt(100) < level.awe_pophelmet && !self.awe_helmetpopped)
self popHelmet( vDir, iDamage );
if( level.awe_popheadbullet && sMeansOfDeath != "MOD_MELEE" && (awe\_util::isWeaponType("rifle",sWeapon) || awe\_util::isWeaponType("sniper",sWeapon) || awe\_util::isWeaponType("turret",sWeapon)) )
dopop = true;
break;
default:
break;
}
iprintln("sMoD:"+sMeansOfDeath + " iDmg:" + iDamage + " sHL:" + sHitLoc);
switch(sMeansOfDeath)
{
case "MOD_MELEE":
if(level.awe_popheadmelee && iDamage>=100 )
dopop = true;
break;
case "MOD_PROJECTILE":
case "MOD_PROJECTILE_SPLASH":
case "MOD_GRENADE_SPLASH":
case "MOD_EXPLOSIVE":
if(level.awe_popheadexplosion && iDamage>=100 )
dopop = true;
break;
default:
break;
}
if(dopop)
{
if(randomInt(100) < level.awe_pophead && !self.awe_headpopped)
self [...]\_lostHelmet::popHead( vDir, iDamage);
else if(randomInt(100) < level.awe_pophelmet && !self.awe_helmetpopped)
self [...]\_lostHelmet::popHelmet( vDir, iDamage);
}
.cfg
// Pop helmets (0 = off, other value = chance in percent that helmet will pop) (default 50)
//set awe_pophelmet "50"
// Pop heads (0 = off, other value = chance in percent that head will pop) (default 0)
//set awe_pophead "0"
// The following cvars controls which things trigger the pophead code (0 = off, 1 = on) (default 1)
//set awe_pophead_bullet "1" // rifles, snipers and turrets
//set awe_pophead_melee "1" // Melee
//set awe_pophead_explosion "1" // Explosions
scripts in attachment. I think that's all. In my mod works :)
(awe: util.gsc + _losthelmet.gsc)
138
Tally
10th February 2013, 09:15
The pop helmet code will crash a server when it has more than 26 players on it due to the "exceeded max number of entities" error. This was a big drawback to it, and is why eventually we gave up trying to get it to work in all circumstances. I personally don't advise anyone to do it. It just isn't worth the hassle.
Tally - developer for both AWE and eXtreme+ mods for COD2. Lead developer for AWE4 for COD4.
serthy
10th February 2013, 09:59
If you dont care about the helmets to bounce, you could do it abit simplier:
detach(helmet);
vel = vectorScale(vDir,0 - iDamage); <<calculate velocity by the damage, try it out...
vel = (vel[0],vel[1],randomIntRange(300,600));
helmet = spawn(model,head)
helmet moveGravity(vel,10);
wait(10) helmet delete;
or maybe cap the amount of max helmets at the same time
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.