How would go about creating Custom pickup that make the player invisible for a short period of time ?
for example i followed a tutorial that showed when a player fires using the link gun he appears, but when he doesn't he goes invisible.
could i copy of any of this code which will help me to create the invisibility pickup?
for example i followed a tutorial that showed when a player fires using the link gun he appears, but when he doesn't he goes invisible.
Code:
class AwesomePlayerController extends UTPlayerController;
function NotifyChangeWeapon( Weapon PrevWeapon, Weapon NewWeapon)
{
super.NotifyChangedWeapon(PrevWeapon, NewWeapon);
if(Pawn == none)
return;
if(UTWeap_LinkGun(NewWeapon) != none)
Pawn.SetHidden(true);
else
Pawn.SetHidden(false);
}
exec function StartFire( optional byte FireModeNum)
{
super.StartFire(FireModeNum);
if (Pawn !=none && UTWeap_LinkGun(Pawn.Weapon) !=none)
{
Pawn.SetHidden(false);
SetTimer(1,False, 'MakeMeInvisible');
}
}
function MakeMeInvisible()
{
if(Pawn != none && UTWeap_LinkGun(Pawn.Weapon) != none)
Pawn.SetHidden(true);
}
simulated event GetPlayerViewPoint(Out vector out_Location, out Rotator out_Rotation)
{
super.GetPlayerViewPoint(out_Location, out_Rotation);
if(Pawn != none)
{
Pawn.Mesh.SetOwnerNoSee(false);
if(Pawn.Weapon != none)
Pawn.Weapon.SetHidden(true);
}
}
defaultproperties
{
}
could i copy of any of this code which will help me to create the invisibility pickup?
Last edited by a moderator: