Author Topic: Smash Bros. Teching  (Read 1206 times)

In Sm4sh, hitting the shield button right when you hit a surface will cancel momentum or allow you to get right back up once you hit the ground again, this is called a tech.

Can this effect be created in Blockland, to avoid fall/collision damage?
« Last Edit: February 11, 2016, 06:08:16 PM by Hansome dude »

i don't know how it would be recreated at all in blockland

right click right before impact to tech and neuter all momentum

the 'tech time' is a pref you can adjust to make teching easier or harder

It would be incredibly simple.

Press a button that sets a value to the player for like, 0.5 seconds.
When the player impacts something while this value is true, stop them, don't do anything else.


right click right before impact to tech and neuter all momentum

the 'tech time' is a pref you can adjust to make teching easier or harder
yeah thats true

right click right before impact to tech and neuter all momentum

the 'tech time' is a pref you can adjust to make teching easier or harder
The time in Smash 4 to tech is 1/3 of a second. Of course, that would be the default if preferences are wanted.
« Last Edit: February 11, 2016, 08:49:00 PM by Hansome dude »

The time in Smash 4 to tech is 1/3 of a second. Of course, that would be the default if preferences are wanted.
It should be higher than smash 4's because we have ping to account for.

Kinda loose and broken psuedocode, just make it so while the right click loop is in effect, the player has a variable that makes it immune to damage, that the ondamage package checks for. If the time exceeds that of the required techtime, then the player is no longer immune to fall damage.

Code: [Select]
on return of right click trigger of a player armor:
if(!%obj.fallImmunity)
%obj.techSchedule($pref::techtime);

techSchedule(%val)
{
     run schedule loop every 10 ms
     %obj.techTime = %time++;
     %obj.fallImmunity = 1;
     if(%time > $pref::techTime)
     {
         cancel(techschedule);
         %obj.fallimmunity = 0;
     }
}

damage package()
{
   if %obj.killer = falling && %obj.fallImmunity
               %damage = 0;
}

that sounds more like perfect shielding then

like what youre doing essentially is this


Kinda loose and broken psuedocode, just make it so while the right click loop is in effect, the player has a variable that makes it immune to damage, that the ondamage package checks for. If the time exceeds that of the required techtime, then the player is no longer immune to fall damage.

Code: [Select]
on return of right click trigger of a player armor:
if(!%obj.fallImmunity)
%obj.techSchedule($pref::techtime);

techSchedule(%val)
{
     run schedule loop every 10 ms
     %obj.techTime = %time++;
     %obj.fallImmunity = 1;
     if(%time > $pref::techTime)
     {
         cancel(techschedule);
         %obj.fallimmunity = 0;
     }
}

damage package()
{
   if %obj.killer = falling && %obj.fallImmunity
               %damage = 0;
}
no

something like this
Code: [Select]
$Pref::SwolFallTechTime = 333;
package swol_fallTech
{
function Armor::onTrigger(%db,%pl,%trig,%bool)
{
if(%trig == 4 && %bool && getSimTime()-%pl.fallTech > $Pref::SwolFallTechTime*2)
{
%pl.fallTech = getSimTime();
}
return parent::onTrigger(%db,%pl,%trig,%bool);
}
function Armor::damage(%db,%pl,%hit,%pos,%dmg,%type)
{
if(%type == $DamageType::Fall || %type == $DamageType::Impact)
{
if(getSimTime()-%pl.fallTech < $Pref::SwolFallTechTime)
{
%p = new Projectile()
{
datablock = CoolDamageNegateExplosionEffectProjectile;
initialPosition = %pl.getPosition();
};
%p.explode();
return 0;
}
}
return parent::damage(%db,%pl,%hit,%pos,%dmg,%type);
}
};
activatePackage(swol_fallTech);