Moderator: Forum Guards
class DrunkFxZone extends ZoneInfo;
event ActorEntered( actor Other )
{
Super.ActorEntered(Other);
if (Other.isA('DeusExPlayer'))
{
DeusExPlayer(Other).drugEffectTimer += 10.0;
}
}
defaultproperties
{
}
class ScreenZone extends ZoneInfo;
event ActorEntered( actor Other )
{
Super.ActorEntered(Other);
if (Other.isA('DeusExPlayer'))
{
DeusExRootWindow.hud.SetBackground(Texture'DrunkFX');
}
}
class ScreenZone extends ZoneInfo;
event ActorEntered( actor Other )
{
Super.ActorEntered(Other);
local DeusExRootWindow root;
root = DeusExRootWindow(rootWindow);
if (Other.isA('DeusExPlayer'))
{
root.hud.SetBackground(Texture'DrunkFX');
}
}
WeeCrab wrote:Local is not allowed here
class DrunkFxZone extends ZoneInfo;
event ActorEntered( actor Other )
{
Super.ActorEntered(Other);
if (Other.isA('DeusExPlayer'))
{
DeusExRootWindow(DeusExPlayer(Other).rootWindow).hud.SetBackground(WetTexture'DrunkFX');
}
}
defaultproperties
{
}
DeusExRootWindow(DeusExPlayer(Other).rootWindow).hud.SetBackgroundSmoothing(True);
DeusExRootWindow(DeusExPlayer(Other).rootWindow).hud.SetBackgroundStretching(True);
DeusExRootWindow(DeusExPlayer(Other).rootWindow).hud.SetBackgroundStyle(DSTY_Modulated);
WeeCrab wrote:Yeah, single player. I will try in multiplayer and then I'll try adding those other commands too, very strange
else
{
if ((root != None) && (root.hud != None))
{
if (root.hud.background != None)
{
root.hud.SetBackground(None);
root.hud.SetBackgroundStyle(DSTY_Normal);
DesiredFOV = Default.DesiredFOV;
}
}
}
state PlayerWalking
{
event PlayerTick(float deltaTime)
{
RefreshSystems(deltaTime);
DrugEffects(deltaTime);
Bleed(deltaTime);
HighlightCenterObject();
Stuff..
}
}
class DrunkFxZone extends ZoneInfo;
var int OldHealth;
var float HealthPlus;
event ActorEntered( actor Other )
{
Super.ActorEntered(Other);
if(Other.isA('DeusExPlayer'))
{
DeusExPlayer(Other).drugEffectTimer += 99999999999;
DeusExRootWindow(DeusExPlayer(Other).rootWindow).hud.SetBackground(WetTexture'DrunkFX');
DeusExRootWindow(DeusExPlayer(Other).rootWindow).hud.SetBackgroundSmoothing(True);
DeusExRootWindow(DeusExPlayer(Other).rootWindow).hud.SetBackgroundStretching(True);
DeusExRootWindow(DeusExPlayer(Other).rootWindow).hud.SetBackgroundStyle(DSTY_Modulated);
OldHealth = DeusExPlayer(Other).Health;
DeusExPlayer(Other).Health += HealthPlus;
}
}
event ActorLeaving( actor Other )
{
Super.ActorLeaving(Other);
if(Other.isA('DeusExPlayer'))
{
DeusExPlayer(Other).drugEffectTimer = 0;
DeusExRootWindow(DeusExPlayer(Other).rootWindow).hud.SetBackground(None);
DeusExRootWindow(DeusExPlayer(Other).rootWindow).hud.SetBackgroundSmoothing(False);
DeusExRootWindow(DeusExPlayer(Other).rootWindow).hud.SetBackgroundStretching(False);
DeusExRootWindow(DeusExPlayer(Other).rootWindow).hud.SetBackgroundStyle(DSTY_Normal);
DeusExPlayer(Other).Health = OldHealth;
DeusExPlayer(Other).DesiredFOV = DeusExPlayer(Other).Default.DesiredFOV;
}
}
function Tick(float deltaTime)
{
Super.Tick(deltaTime);
HealthPlus += deltaTime;
}
defaultproperties
{
}
~DJ~ wrote:OldHealth = DeusExPlayer(Other).Health;
Dae wrote:~DJ~ wrote:OldHealth = DeusExPlayer(Other).Health;
What if a player receives damage while being in zone?
Dae wrote:What if a player receives damage while being in zone?
Alex wrote:What if two people are in the same zone... player A gets player B's health?
event ActorEntered( actor Other )
{
Super.ActorEntered(Other);
if(Other.isA('DeusExPlayer'))
{
DeusExPlayer(Other).drugEffectTimer += 99999999999;
DeusExRootWindow(DeusExPlayer(Other).rootWindow).hud.SetBackground(None);
DeusExRootWindow(DeusExPlayer(Other).rootWindow).hud.SetBackground(WetTexture'CustomTexture');
DeusExRootWindow(DeusExPlayer(Other).rootWindow).hud.SetBackgroundSmoothing(True);
DeusExRootWindow(DeusExPlayer(Other).rootWindow).hud.SetBackgroundStretching(True);
DeusExRootWindow(DeusExPlayer(Other).rootWindow).hud.SetBackgroundStyle(DSTY_Modulated);
}
}
WeeCrab wrote:drugeffecttimer makes your vision sway around and zoom in
DeusExPlayer.fov = DeusExPlayer.Default.DesiredFOV;
DeusExPlayer.ViewRotation = 0;
DeusExPlayer(Other).ViewRotation = DeusExPlayer(Other).Default.ViewRotation;