I wanted to make an enemy that resorects after it dies. I tried making the death state go to the rise state, and that seemed to work. But after it raised it was unshootable and I could walk through it but it could shoot me.
I thought maby it still had the same flags as a corpse so I tried changing the flags to monster mode. And then tried +shootable on the first frame of the rise state and that still didn't work.
The good news is, it looks sooo badass when I shoot my zombieman down and he rises again in thirty seconds. I made it so XDeath made him stay dead. Nifty, eh?
Edit: Oh, when I make him +shootable, he's then shootable but he's invulnerable. Thats not good. I want him to keep dieng and coming back so you can atleast keep a horde at bay until you can gib'em for good.
Self resorecting enemy?
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.
-
- Posts: 572
- Joined: Sun Dec 11, 2005 9:17 pm
- Location: Hell.
- Contact:
Re: Self resorecting enemy?
Well, you could hack it so he "drops" an enemy with a spawn state that resembles him "resurrecting" and then make it so the original monster has no corpse.
- DBThanatos
- Posts: 3101
- Joined: Fri Apr 14, 2006 3:17 pm
- Location: in "the darkness that lurks in our mind"
Re: Self resorecting enemy?
or this:
This is best method unless you want to be able to ressurect the monster by other means (let's say, an archvile)
DBT
Code: Select all
actor FQuakeZombie 7026
{
Blah blah...
States
{
blah....
Death:
ZOMP A 6
ZOMP B 6 A_Scream
ZOMP C 5 A_NoBlocking
ZOMP D 5
ZOMP E 4
ZOMP F 200
ZOMP F -1 Thing_Raise(0) //this is what matters
Stop
}
}
DBT
-
- Posts: 3975
- Joined: Fri Jul 06, 2007 9:16 am
Re: Self resorecting enemy?
Lol, that zombie is so cool but totally frustrating!
- RaptorFarmer
- Posts: 37
- Joined: Fri Oct 26, 2007 12:42 pm
Re: Self resorecting enemy?
Thanks DBThanatos, I wasn't aware of that option. I didn't see it in the Wiki.
- MartinHowe
- Posts: 2085
- Joined: Mon Aug 11, 2003 1:50 pm
- Preferred Pronouns: He/Him
- Location: East Suffolk (UK)
Re: Self resorecting enemy?
Both ACS and DECORATE can use most action specials as if they were functions (or "codepointers"). The exceptions are specials that are only valid at level initialisation and those, such as sector specials, that do not work on things; (the use of a sector lighting special with a 0 tag in my atomic cannon warhead actor is a rare case where the effect looks good in context; normally that kind of thing simply does not work as intended, if at all).
For DECORATE, the primary requirement to use a special as a function is that it works implicitly on "the activator" or can accept a value (normally 0) for the TID field that means "the activator". I seem to recall that the DECORATE expression parser understands "tid" as a variable, so actors that are guaranteed to have a defined TID when actually used could work anyway, though I've not tried this personally.
For DECORATE, the primary requirement to use a special as a function is that it works implicitly on "the activator" or can accept a value (normally 0) for the TID field that means "the activator". I seem to recall that the DECORATE expression parser understands "tid" as a variable, so actors that are guaranteed to have a defined TID when actually used could work anyway, though I've not tried this personally.
Re: Self resorecting enemy?
I could see this is in a game with actual headshots, to simulate the whole "zombies only die by a headshot" ideal. In Doom it's just going to be nothing but frustration.
-
- Posts: 3975
- Joined: Fri Jul 06, 2007 9:16 am
Re: Self resorecting enemy?
Yeah, I was going to do a whole "behead the undead" thing a while ago but was kinda put off by the hacky methods and code
I might give it a go sometime though
