Author Topic: Invincible Playertype that isn't affected by explosions [SOLVED]  (Read 726 times)

/title

The current invincible playertype is affected by explosions and can be thrown across the map.
« Last Edit: September 21, 2015, 08:04:51 PM by --LegoPepper-- »

Would you like a playertype or an event, or both?

I remember the ZAPT Tank playertype receiving less knockback from explosives. I wonder what makes it do such thing

The mass is usually what holds them down, so that's the resistance of impulse from explosions and other things.

Would you like a playertype or an event, or both?
Playertype

I tried editing the mass but it ended up screwing up the running speed

Playertype

I tried editing the mass but it ended up screwing up the running speed
i haven't fooled around with playertypes in a while, but couldn't you jack up the run speed and increase the friction to keep them controllable?

Code: [Select]
package swol_noKnockbackInvinc
{
function ProjectileData::radiusImpulse(%this,%proj,%obj,%a,%pos,%b,%c)
{
if(%obj.getDatablock().getId() == InvinciblePlayer.getId())
return;

parent::radiusImpulse(%this,%proj,%obj,%a,%pos,%b,%c);
}
};
activatePackage(swol_noKnockbackInvinc);

i dont know the name of the invincible player datablock but thats how you should do it

Code: [Select]
package swol_noKnockbackInvinc
{
function ProjectileData::radiusImpulse(%this,%proj,%obj,%a,%pos,%b,%c)
{
if(%obj.getDatablock().getId() == InvinciblePlayer.getId())
return;

parent::radiusImpulse(%this,%proj,%obj,%a,%pos,%b,%c);
}
};
activatePackage(swol_noKnockbackInvinc);

i dont know the name of the invincible player datablock but thats how you should do it
Most people in Suggestions & Requests don't know how to do this.
But luckily some do and take the time to do this simple task for them.
Thanks for the piece of code by the way, it worked right away. :)
Take this Dropbox link to download the modified Invincible Playertype add-on.

By the way, there will be console spam if someone tries to Self Delete even if they are dead.

Using .getID() can sometimes also create errors if the object doesn't exist, for object names when using .getID(), you can also use nameToID(%objectName)
« Last Edit: September 21, 2015, 12:29:47 PM by Kyuande »

By the way, there will be console spam if someone tries to Self Delete even if they are dead.

Using .getID() can sometimes also create errors if the object doesn't exist, for object names when using .getID(), you can also use nameToID(%objectName)
While minor issues, i did address them right now.
Thank you for your feedback. :)
Redownload the add-on (via the same link or this one, both the same either way, thank dropbox).

While minor issues, i did address them right now.
Thank you for your feedback. :)
Redownload the add-on (via the same link or this one, both the same either way, thank dropbox).
Thanks! I'll check this out when i get home

edit: works great! Thanks again!
« Last Edit: September 21, 2015, 08:04:07 PM by --LegoPepper-- »