Author Topic: Tumble & WhiteOut  (Read 1903 times)

Works for my taser, but not this.  I can't seem to figure out what's wrong with it.

Code: [Select]
function tranquilizerProjectile::onCollision(%this, %obj, %col, %fade, %pos, %normal)
{
if((%col.getType() & $typeMasks::playerObjectType) && isObject(%col.client))
{
%col.setVelocity(VectorScale(getRandom(0, 0.250) SPC getRandom(0, 0.250) SPC "1", 10));
tumble(%col);
//
if(%col.getClassName() $= "Player" || %col.getClassName() $= "AIPlayer")
{
%col.setWhiteOut(1);
}        

        }
}
function tranquilizerProjectile::damage(%this, %obj, %col, %fade, %pos, %normal)
{
if(%col.getClassName() $= "Player" || %col.getClassName() $= "AIPlayer")
{
%col.setWhiteOut(1);
}
parent::damage(%this, %obj, %col, %fade, %pos, %normal);
}

D: The tranquilizer tumble & whiteout is still not working.
« Last Edit: March 12, 2010, 08:07:35 PM by Tezuni »

Didn't badspot remove the tumble feature in v11?

I think he just broke the tumble mod, but that's it.
The ski's still tumble.

This is really puzzling, it works for my taser, but not for the tranquilizer.  I'm only doing this because Pandan's one line tumble code doesn't work for the tranquilizer.

Ever try completely remaking tumble? :cookieMonster:


Not sure what's wrong with the first code block, but for the name not showing up...

messageClient(%obj.client, '', '\c6You caught\c3', %col.client);
needs to be
messageClient(%obj.client, '', '\c6You caught\c3%1', %col.client.getPlayerName());

%mini.messageAll('',"\c3" @ clientTeamName(%obj.client) @ "\c6 captured\c3 " @ clientTeamName(%col.client) @ "\c6!");
also needs to be
%mini.messageAll('',"\c3" @ %obj.client.getPlayerName() @ "\c6 captured\c3 " @ %col.client.getPlayerName() @ "\c6!");
and for more network efficiency:
%mini.messageAll('','\c3%1\c6 captured\c3%2\c6!',%obj.client.getPlayerName(),%col.client.getPlayerName());
« Last Edit: March 11, 2010, 10:54:48 PM by Chrono »

Thanks Chrono.  Could it be possible v14 updates Badspot may have made are what's causing the tumble & white out not to work?

Also, I tried both of those and the second name is still not showing up.  =|
%mini.messageAll('',"\c3" @ %obj.client.getPlayerName() @ "\c6 captured\c3 " @ %col.client.getPlayerName() @ "\c6!");
and for more network efficiency:
%mini.messageAll('','\c3%1\c6 captured\c3%2\c6!',%obj.client.getPlayerName(),%col.client.getPlayerName());
« Last Edit: March 12, 2010, 08:33:15 PM by Tezuni »


The ::damage function won't be called if you don't do Parent::onCollision in the first one.

The OnCollision function isn't parented =|
Does that work vice versa?  If the Damage function is parented will the OnCollision function not be called?

I've tried only using one of the functions at once in the script and they still don't work. :|

The second name isn't showing up still, the %col.client
« Last Edit: March 13, 2010, 03:39:52 PM by Tezuni »


Any more ideas Chrono?  I'm really stumped as to why it's not working.

I have no idea. Are Skis enabled?