| Author |
Topic: SCRIPT EFFECT HELP |
| adam57 |
General Member Since: May 15, 2007 Posts: 23 Last: Aug 23, 2018 [view latest posts] |
|
|
|
|
| adam57 |
General Member Since: May 15, 2007 Posts: 23 Last: Aug 23, 2018 [view latest posts] |
|
|
|
Category: CoDUO Mapping Posted: Friday, Jun. 19, 2009 02:52 pm |
 |
![[banghead]](images/BBCode/smilies/banghead.gif)
last try
Code: bleeding()
{
self endon("death");
timer = 0;
while (isalive(self))
{
wait 5;
if (self.health < level.fd_healthymin)
{
self.laststance = self getstance();
self.bleeding = true;
while (self.health < level.fd_healthymin)
{
self shellshock("mc_hit6", 3);
self playlocalsound("heartbeat");
self disableweapon();
if(timer == 5) // decrease health every 5 seconds.
{
self.health -= 1; // Take of 1 health every time
timer = 0;
}
else
timer++; // increase timer
if(self.health <= 0)
self thread [[level.callbackPlayerKilled]](eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc);
if ((randomint(100) < level.fd_rdmpain) && (self.laststance != self getstance())) thread painsound("bleeding");
wait 1;
}
self.bleeding = undefined;
wait 1;
}
if (self.health > level.fd_healthymin)
{
self enableweapon();
}
}
}
but i have this eror
Code: ******* script runtime error *******
pair has unmatching types 'undefined' and 'string': (file 'maps\mp\gametypes\sd.gsc', line 877)
if(sHitLoc == "head" && sMeansOfDeath != "MOD_MELEE")
*
called from:
(file 'maps\mp\gametypes\_effets.gsc', line 533)
self thread [[level.callbackPlayerKilled]](eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc);
*
called from:
(file 'maps\mp\gametypes\_effets.gsc', line 536)
wait 1;
*
|
 |
|
|
| playername |
 |
Preferred Member Since: Aug 24, 2006 Posts: 821 Last: Apr 15, 2011 [view latest posts] |
|
|
 |
|
|
| adam57 |
General Member Since: May 15, 2007 Posts: 23 Last: Aug 23, 2018 [view latest posts] |
|
|
|
|
| adam57 |
General Member Since: May 15, 2007 Posts: 23 Last: Aug 23, 2018 [view latest posts] |
|
|
|
|
| .KiLL3R. |
 |
General Member Since: Oct 26, 2006 Posts: 1437 Last: Jul 3, 2017 [view latest posts] |
|
|
|
Category: CoDUO Mapping Posted: Saturday, Jun. 20, 2009 07:12 pm |
 |
Code:
bleeding()
{
timer = 0;
wait 5;
while(isValidPlayer(self) && self.sessionstate == "playing")
{
if(self.health < level.fd_healthymin)
{
self.laststance = self getstance();
self.bleeding = true;
while(self.health < level.fd_healthymin)
{
self shellshock("mc_hit6", 3);
self playlocalsound("heartbeat");
self disableweapon();
if(timer == 5) // decrease health every 5 seconds.
{
self.health -= 1; // Take of 1 health every time
timer = 0;
}
else
timer++; // increase timer
if(self.health <= 0)
{
self thread bleed_death();
break;
}
if(randomint(100) < level.fd_rdmpain && self.laststance != self getstance())
thread painsound("bleeding");
wait 1;
}
self.bleeding = undefined;
wait 1;
}
if (self.health > level.fd_healthymin)
self enableweapon();
wait 5;
}
}
bleed_death()
{
eInflictor = self.lastDamage["eInflictor"];
attacker = self.lastDamage["eAttacker"];
sMeansOfDeath = self.lastDamage["sMeansOfDeath"];
sWeapon = self.lastDamage["sWeapon"];
shitLoc = self.lastDamage["sHitLoc"]; // CHANGE HERE
self finishPlayerDamage(eInflictor, attacker, 100, 1, sMeansOfDeath, sWeapon, self.origin, (0,0,1), shitLoc); // CHANGE HERE
}
Not the best way, but then you'd have to change various other scripts
Don't forget to change poo-pooLoc to s HitLoc (without the space) |
 |
|
|
| adam57 |
General Member Since: May 15, 2007 Posts: 23 Last: Aug 23, 2018 [view latest posts] |
|
|
|
Category: CoDUO Mapping Posted: Sunday, Jun. 21, 2009 02:12 pm |
 |
Hello KILL3R and thanks for the help
i try this
Code: bleeding()
{
timer = 0;<br />
<br />
wait 5;<br />
<br />
while(isValidPlayer(self) && self.sessionstate == "playing")
{<br />
<br />
if(self.health < level.fd_healthymin)
{
self.laststance = self getstance();
self.bleeding = true;
while(self.health < level.fd_healthymin)
{
self shellshock("mc_hit6", 3);
self playlocalsound("heartbeat");
<br />
<br />
if(timer == 5) // decrease health every 5 seconds.
{
self.health -= 1; // Take of 1 health every time
timer = 0;
}
else
timer++; // increase timer<br />
<br />
if(self.health <= 0)
{
self thread bleed_death();
break;
}<br />
<br />
if(randomint(100) < level.fd_rdmpain && self.laststance != self getstance())
thread painsound("bleeding");<br />
<br />
wait 1;
}
self.bleeding = undefined;
wait 1;
}<br />
<br />
<br />
<br />
wait 5;
}<br />
<br />
}<br />
<br />
bleed_death()
{
eInflictor = self.lastDamage["eInflictor"];
attacker = self.lastDamage["eAttacker"];
sMeansOfDeath = self.lastDamage["sMeansOfDeath"];
sWeapon = self.lastDamage["sWeapon"];
sHitLoc= self.lastDamage[" sHitLoc"]; // CHANGE HERE<br />
<br />
self finishPlayerDamage(eInflictor, attacker, 100, 1, sMeansOfDeath, sWeapon, self.origin, (0,0,1), sHitLoc); // CHANGE HERE
}
i i put s Hitloc with space script error bad syntax
or i have this error
Code: ******* script runtime error *******
undefined is not an array, string, or vector: (file 'maps\mp\gametypes\_effets.gsc', line 554)
eInflictor = self.lastDamage["eInflictor"];<br />
<br />
*
called from:
(file 'maps\mp\gametypes\_effets.gsc', line 532)
self thread bleed_death();<br />
<br />
*
called from:
(file 'maps\mp\gametypes\_effets.gsc', line 539)
wait 1;<br />
<br />
*
************************************
********************
ERROR: script runtime error
(see console for details)
********************
|
 |
|
|
| .KiLL3R. |
 |
General Member Since: Oct 26, 2006 Posts: 1437 Last: Jul 3, 2017 [view latest posts] |
|
|
|
Category: CoDUO Mapping Posted: Sunday, Jun. 21, 2009 02:16 pm |
 |
When the player connects, add this line
Code:
self.lastDamage = [];
and in player damage
Code:
self.lastDamage["eInflictor"] = eInflictor;
self.lastDamage["eAttacker"] = attacker;
self.lastDamage["sMeansOfDeath"] = sMeansOfDeath;
self.lastDamage["sWeapon"] = sWeapon;
self.lastDamage["poo-pooLoc"] = poo-pooLoc; // CHANGE HERE
|
 |
|
|
| adam57 |
General Member Since: May 15, 2007 Posts: 23 Last: Aug 23, 2018 [view latest posts] |
|
|
|
|
|
|
mp_TempleCall of Duty: Mods: Multiplayer (624.12Kb)
|