UnrealScript: DrunkFx Zone?
Posted: Fri Aug 06, 10 4:44 pm
I would like to create a zone that, upon entering, gives a player the DrunkFx screen texture, and upon leaving, removes the screen texture.
I'm not a modder but usually I can copy and paste and change properties to get what I want for simple things but this is a little more difficult. First I assumed, I'd make a new zone class that expands ZoneInfo (like waterzone does), put only the ActorEntered and ActorLeaving functions in the new zone class (like Super.ActorEntered() ) and then add the hud effects I copied from DX player:
for entering:
root.hud.SetBackground(Texture'DrunkFX');
root.hud.SetBackgroundSmoothing(True);
root.hud.SetBackgroundStretching(True);
root.hud.SetBackgroundStyle(DSTY_Modulated);
for leaving:
root.hud.SetBackground(None);
root.hud.SetBackgroundStyle(DSTY_Normal);
DesiredFOV = Default.DesiredFOV;
Problem is it doesn't seem to work (gives errors) because A) the ActorEntered and ActorLeaving aren't functions, they are "events" so the Super() thing doesn't work I guess and B) I'm assuming because I'm mixing variables from a Player and those of a Zone.. I don't know. Is this possible without a new player class?
Note that I don't want the zone to hurt the player or make the player go 'argh' or anything, just have the DrunkFx texture over the screen as long as he is in that zone, just like how as long as you are in a "WaterZone," your screen is blue.
I'm not a modder but usually I can copy and paste and change properties to get what I want for simple things but this is a little more difficult. First I assumed, I'd make a new zone class that expands ZoneInfo (like waterzone does), put only the ActorEntered and ActorLeaving functions in the new zone class (like Super.ActorEntered() ) and then add the hud effects I copied from DX player:
for entering:
root.hud.SetBackground(Texture'DrunkFX');
root.hud.SetBackgroundSmoothing(True);
root.hud.SetBackgroundStretching(True);
root.hud.SetBackgroundStyle(DSTY_Modulated);
for leaving:
root.hud.SetBackground(None);
root.hud.SetBackgroundStyle(DSTY_Normal);
DesiredFOV = Default.DesiredFOV;
Problem is it doesn't seem to work (gives errors) because A) the ActorEntered and ActorLeaving aren't functions, they are "events" so the Super() thing doesn't work I guess and B) I'm assuming because I'm mixing variables from a Player and those of a Zone.. I don't know. Is this possible without a new player class?
Note that I don't want the zone to hurt the player or make the player go 'argh' or anything, just have the DrunkFx texture over the screen as long as he is in that zone, just like how as long as you are in a "WaterZone," your screen is blue.