Making a Player with +Stealth?

Archive of the old editing forum
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.
Locked
User avatar
Amuscaria
Posts: 6634
Joined: Mon Jul 26, 2004 12:59 pm
Location: Growing from mycelium near you.

Making a Player with +Stealth?

Post by Amuscaria »

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.
User avatar
.+:icytux:+.
Posts: 2661
Joined: Thu May 17, 2007 1:53 am
Location: Finland

Re: Making a Player with +Stealth?

Post by .+:icytux:+. »

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.
User avatar
Rachael
Posts: 13931
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Making a Player with +Stealth?

Post by Rachael »

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.
User avatar
Ghastly
... in rememberance ...
Posts: 6109
Joined: Fri Jul 06, 2007 2:34 pm

Re: Making a Player with +Stealth?

Post by Ghastly »

SoulPriestess wrote:you would of course, not touch the missile and melee states.
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.
User avatar
Rachael
Posts: 13931
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Making a Player with +Stealth?

Post by Rachael »

Ghastly_dragon wrote:
SoulPriestess wrote:you would of course, not touch the missile and melee states.
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.
The whole point of that is the player would be actually visible when firing. ;)
User avatar
esselfortium
Posts: 3862
Joined: Tue Sep 19, 2006 8:43 pm
Contact:

Re: Making a Player with +Stealth?

Post by esselfortium »

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?
User avatar
Amuscaria
Posts: 6634
Joined: Mon Jul 26, 2004 12:59 pm
Location: Growing from mycelium near you.

Re: Making a Player with +Stealth?

Post by Amuscaria »

@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. :D
User avatar
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?

Post by DoomRater »

I didn't know infrared goggles could see stealth monsters!
User avatar
Medricel
Posts: 1138
Joined: Sat Nov 20, 2004 9:47 am

Re: Making a Player with +Stealth?

Post by Medricel »

DoomRater wrote:I didn't know infrared goggles could see stealth monsters!
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.
Locked

Return to “Editing (Archive)”