Making a Player with +Stealth?
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Making a Player with +Stealth?
I was messing around to see if I could make a power-up using ACS and Decorate to make the player stealth (only appears when attacking, in pain, or death). So, the most obviously way to see if it works or not was to just add the +Stealth to the playerpawn. This doesn't work. I'm not sure exactly how the flag works, but do I need a A_Chase and A_Look for the effect to be called?
If that's the case, then just ignore this thread. However if there was another way to get this done, i'd be happy to know. Also, this is meant to be a DM based Power up, because i'm aware that monster's "see" stealth actors.
If that's the case, then just ignore this thread. However if there was another way to get this done, i'd be happy to know. Also, this is meant to be a DM based Power up, because i'm aware that monster's "see" stealth actors.
- .+:icytux:+.
- Posts: 2661
- Joined: Thu May 17, 2007 1:53 am
- Location: Finland
Re: Making a Player with +Stealth?
A_SetTranslucent could be of good help. use it to be visible in pain, death, and missile states. then A_SetTranslucent in Spawn and see to be 0.0
you could try acchieving somekinda fading effect with that also, if called every tic and add to the numbers a bit by bit.
[EDIT]oh... so u wanted it to be a powerup?. well, probably with some A_CheckInventory or something in the states if thatd work (very hacky D:).
i guess u can do this in acs too in someway. SetActor State to goto a InvisSpawnState or something. dunno or even morphclasses. depends on exactly what you wanna do.
you could try acchieving somekinda fading effect with that also, if called every tic and add to the numbers a bit by bit.
[EDIT]oh... so u wanted it to be a powerup?. well, probably with some A_CheckInventory or something in the states if thatd work (very hacky D:).
i guess u can do this in acs too in someway. SetActor State to goto a InvisSpawnState or something. dunno or even morphclasses. depends on exactly what you wanna do.
Re: Making a Player with +Stealth?
Make a dummy powerup that sits in the inventory for X amount of time, then modify the PlayerPawn's states so that if it detects the powerup inventory item it jumps to different states which animate the player strictly through the TNT1 sprite. One side effect, though... make sure to disable skins (+NOSKIN), or the TNT1 references won't work.
Code: Select all
actor PowerStealthDummy : PowerProtection
{
damagefactor "normal", 1.0 //since you're using this as a dummy powerup, it shouldn't do anything at all.
}
actor Stealth : PowerupGiver
{
inventory.pickupmessage "Stealth Goggles!"
inventory.maxamount 0
powerup.duration -30
powerup.type "StealthDummy"
+COUNTITEM
+INVENTORY.AUTOACTIVATE
+INVENTORY.ALWAYSPICKUP
states
{
Spawn:
PVIS A 6
PVIS B 6 bright
loop
}
}
Code: Select all
//inside your playerpawn class
states {
Spawn:
TNT1 A 0 A_JumpIfInventory("PowerStealthDummy",1,"Stealth")
PLAY A 10
Loop
See:
TNT1 A 0 A_JumpIfInventory("PowerStealthDummy",1,"Stealth")
PLAY ABCD 4
Loop
Stealth:
TNT1 A 1
Goto Spawn
}
//you would of course, not touch the missile and melee states.
Last edited by Rachael on Fri Jan 30, 2009 1:35 pm, edited 1 time in total.
Re: Making a Player with +Stealth?
I don't think it'd work with the melee and missile states, anyway. If you watch yourself as you fire the chaingun, it jumps to a specific frame of the missile state, when you fire continuously.SoulPriestess wrote:you would of course, not touch the missile and melee states.
Re: Making a Player with +Stealth?
The whole point of that is the player would be actually visible when firing.Ghastly_dragon wrote:I don't think it'd work with the melee and missile states, anyway. If you watch yourself as you fire the chaingun, it jumps to a specific frame of the missile state, when you fire continuously.SoulPriestess wrote:you would of course, not touch the missile and melee states.

- esselfortium
- Posts: 3862
- Joined: Tue Sep 19, 2006 8:43 pm
- Contact:
Re: Making a Player with +Stealth?
I'm curious, too: exactly how does ZDoom's Stealth flag work? For monsters, is it something that could be recreated using ordinary states and codepointers, or does it somehow run in conjunction with the actual states in a way that'd make recreating the behavior manually effectively impossible?
Re: Making a Player with +Stealth?
@Soulpriestess: What you said was one of the thing I was trying to make it compatible with, skins. Also, I wanted it so that the Infrared goggles could see the stealth player like it can stealth monsters. But if there's really no good way of doing this, it's fine. I just thought it would be interesting to have a stealth player that can only be see by the infrared. 

- DoomRater
- Posts: 8270
- Joined: Wed Jul 28, 2004 8:21 am
- Preferred Pronouns: He/Him
- Location: WATR HQ
- Contact:
Re: Making a Player with +Stealth?
I didn't know infrared goggles could see stealth monsters!
Re: Making a Player with +Stealth?
It's only when you're using GZDoom's "enhanced" nightvision mode. It's a bit of a perk that would be nice to have for the standard mode (and the software renderer) as well.DoomRater wrote:I didn't know infrared goggles could see stealth monsters!