Cant get monster to ressurect itself with Thing_Raise(0)

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

Cant get monster to ressurect itself with Thing_Raise(0)

Post by Amuscaria »

Why does this work? I'm trying a beter method to get my Death Incarnate to come back to life without spawning that inivisible arch-vile like actor (since it can sometimes ressurect other monsters near it). Graf told me to use Thing_Raise(0), but i can't seem to get it to work. o_o
Spoiler:
User avatar
The NUtcracker
Posts: 843
Joined: Sun Jan 14, 2007 9:12 pm
Location: South Dakota
Contact:

Re: Cant get monster to ressurect itself with Thing_Raise(0)

Post by The NUtcracker »

I'm not sure, but you could try making it use a script in a separate ACS file.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Cant get monster to ressurect itself with Thing_Raise(0)

Post by Gez »

It's not Thing_Raise but here's something I've used that is kinda simpler (triming the code from a lot of unnecessary stuff):

Code: Select all

		Death:
			BDEM I 8
  			BDEM J 8 A_Scream
			BDEM KLM 4 
			BDEM N 70 
			BDEM N 0 A_NoBlocking
			BDEM N 0 A_SpawnItemEx("BDemon", 0, 0, 0, 0, 0, 0, 0, 112, 0)
			stop
As you can see, the monster simply disappears and spawns another monster of the same type. (The actual code has a lot of A_Jumps to randomize the time it takes and even if it resurrects or not.)
User avatar
Osiris Kalev
Posts: 290
Joined: Sun Aug 20, 2006 11:06 pm
Location: Australia, Elsewhere Within
Contact:

Re: Cant get monster to ressurect itself with Thing_Raise(0)

Post by Osiris Kalev »

Well, either use that or try giving the Thing_Raise(0) frame a duration of 1. I'm not sure whether this will make it work or not, but that may be what's causing it not to work.
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: Cant get monster to ressurect itself with Thing_Raise(0)

Post by InsanityBringer »

Try having it jump to a state after performing Thing_Raise(0)

Code: Select all

INCA Q 0 Thing_Raise(0)
Goto See
INCA Q -1 
You might need to rework your Jump statements though.
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: Cant get monster to ressurect itself with Thing_Raise(0)

Post by DBThanatos »

The problem in the code, is that the actor cant be resurrected if it isnt totally dead. For example, and archvile cant ressurrect a monster until the death sequence is over, the same happens here. To make it work you must put the ThingRaise in the last frame of the monster, because in the way you had it, you were trying to ressurrect the monster before the last (-1 duration) frame.

This is the code I gave to the DeathIncarnate for ÆoD using the same technique:

Code: Select all

   Death:
       INCA L 0 A_Jump(192,7)
       INCA LM 7 
       INCA N 7 A_Scream 
       INCA O 7 A_NoBlocking 
       INCA P 7 
       INCA Q -1 
       Stop
       INCA LM 7 
       INCA N 7 A_Scream 
       INCA O 7 A_NoBlocking
       INCA P 7 
       INCA Q 175
       INCA Q 0 A_Jump(128,7)
       INCA Q 120
       INCA Q 0 A_Jump(128,1)
       INCA Q 80
       INCA Q 0 A_Jump(128,1)
       INCA Q 80
       INCA Q 0 A_Jump(128,1)
       INCA Q 80
       INCA Q 0                              //dont even know why I left this here
//      NULL A 0 A_Jump(128,2)    //of course you dont need this
       INCA Q -1 Thing_Raise(0)       
       Stop                                 
 //      INCA Q -1 A_KillMaster      //nor the next lines
//       Stop                                
And that must work.


DBT
User avatar
Amuscaria
Posts: 6634
Joined: Mon Jul 26, 2004 12:59 pm
Location: Growing from mycelium near you.

Re: Cant get monster to ressurect itself with Thing_Raise(0)

Post by Amuscaria »

After some tweeking, i got it to work, somewhat. The only problem is i can't get the monster to respawn ALL the time. Am I doing something wrong here, cuz i really dont see it.

Code: Select all

   Death:
       INCA L 0 A_Jump(192,7)
       INCA LM 7 
       INCA N 7 A_Scream 
       INCA O 7 A_NoBlocking 
       INCA P 7 
       INCA Q -1 
       Stop
       INCA LM 7 
       INCA N 7 A_Scream 
       INCA O 7 A_NoBlocking
       INCA P 7
       INCA Q 0 A_Jump(192,4)
       INCA Q 0 A_Jump(128,4)
       INCA Q 0 A_Jump(96,4)
       INCA Q 0 A_Jump(64,4)
       INCA Q 115 
       INCA Q 115 
       INCA Q 115 
       INCA Q 115 
       INCA Q 115
       INCA Q -1 Thing_Raise(0)       
       Stop
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: Cant get monster to ressurect itself with Thing_Raise(0)

Post by DBThanatos »

Told you that was the problem :P



Eriance wrote:i can't get the monster to respawn ALL the time
if you mean "raise" instead of "respawn", this guy doesnt because of the initial chance of it to not raise.

Code: Select all

   Death:
//       INCA L 0 A_Jump(192,7)
//       INCA LM 7
//       INCA N 7 A_Scream
//       INCA O 7 A_NoBlocking
//       INCA P 7
//       INCA Q -1
//       Stop
       INCA LM 7
       INCA N 7 A_Scream
       INCA O 7 A_NoBlocking
       INCA P 7
       INCA Q 0 A_Jump(192,4)
       INCA Q 0 A_Jump(128,4)
       INCA Q 0 A_Jump(96,4)
       INCA Q 0 A_Jump(64,4)
       INCA Q 115
       INCA Q 115
       INCA Q 115
       INCA Q 115
       INCA Q 115
       INCA Q -1 Thing_Raise(0)       
       Stop
The commented lines are the ones that prevents the monster to raise all the time. But I think is too obvious :?. Now if you really meant "respawn" (like in nightmare skill), I dont see why you even need that :P, because would be redundant... and impossible if you actually delete the commented lines.



DBT
User avatar
Cutmanmike
Posts: 11353
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Re: Cant get monster to ressurect itself with Thing_Raise(0)

Post by Cutmanmike »

Probably unrelated but are you making sure there's enough for the monster to respawn?
CaptainToenail
Posts: 3975
Joined: Fri Jul 06, 2007 9:16 am

Re: Cant get monster to ressurect itself with Thing_Raise(0)

Post by CaptainToenail »

Could you not just use
'goto raise'
:lol:
User avatar
Amuscaria
Posts: 6634
Joined: Mon Jul 26, 2004 12:59 pm
Location: Growing from mycelium near you.

Re: Cant get monster to ressurect itself with Thing_Raise(0)

Post by Amuscaria »

CaptainToenail wrote:Could you not just use
'goto raise'
:lol:
That doesn't work. It turns the monster into a "ghost" where you can't shoot him but he can shoot you. Atleast the last time i checked. That was what i did when i first sprited the Death Incarnate.
DBThanatos wrote:Told you that was the problem :P



Eriance wrote:i can't get the monster to respawn ALL the time
if you mean "raise" instead of "respawn", this guy doesnt because of the initial chance of it to not raise.

Code: Select all

   Death:
//       INCA L 0 A_Jump(192,7)
//       INCA LM 7
//       INCA N 7 A_Scream
//       INCA O 7 A_NoBlocking
//       INCA P 7
//       INCA Q -1
//       Stop
       INCA LM 7
       INCA N 7 A_Scream
       INCA O 7 A_NoBlocking
       INCA P 7
       INCA Q 0 A_Jump(192,4)
       INCA Q 0 A_Jump(128,4)
       INCA Q 0 A_Jump(96,4)
       INCA Q 0 A_Jump(64,4)
       INCA Q 115
       INCA Q 115
       INCA Q 115
       INCA Q 115
       INCA Q 115
       INCA Q -1 Thing_Raise(0)       
       Stop
The commented lines are the ones that prevents the monster to raise all the time. But I think is too obvious :?. Now if you really meant "respawn" (like in nightmare skill), I dont see why you even need that :P, because would be redundant... and impossible if you actually delete the commented lines.



DBT
I think you mis understood what i mean. I want the monster to be ressurected each time it's killed (with some randomized duration between death and ressurect. The problem is, despite what I did in it's decorate, it doesn't ressurect each time, even though the last frame's action is Thing_Raise. It does most of the time, however. Also, this happens even if there is plenty of room.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Cant get monster to ressurect itself with Thing_Raise(0)

Post by Gez »

Eriance wrote:The problem is, despite what I did in it's decorate, it doesn't ressurect each time, even though the last frame's action is Thing_Raise. It does most of the time, however. Also, this happens even if there is plenty of room.
A possible reason for why sometimes it doesn't resurrect is if, at the crucial moment where the raise is initiated, there's an obstacle (like a player) blocking it.

Which is why I ended up using spawn instead of raise (same result in the end) with the telefrag flag so that it wouldn't be hindered.
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: Cant get monster to ressurect itself with Thing_Raise(0)

Post by DBThanatos »

Gez wrote:Which is why I ended up using spawn instead of raise (same result in the end) with the telefrag flag so that it wouldn't be hindered.
Actually that sounds as the perfect solution (if handled correctly), because the monster could even be resurrected by another monster before it raises itself :P, thing that cant be done via Thing_raise(0).


DBT
User avatar
Macil
Posts: 2529
Joined: Mon Mar 22, 2004 7:00 pm
Preferred Pronouns: He/Him
Location: California, USA. Previously known as "Agent ME".
Contact:

Re: Cant get monster to ressurect itself with Thing_Raise(0)

Post by Macil »

Could you make the monster call an ACS script in a library with ACS_ExecuteAlways that delays a few tics, and tries to raise the monster, and keep doing that if it doesn't succeed?
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: Cant get monster to ressurect itself with Thing_Raise(0)

Post by DBThanatos »

Eriance wrote:I think you mis understood what i mean. I want the monster to be ressurected each time it's killed (with some randomized duration between death and ressurect. The problem is, despite what I did in it's decorate, it doesn't ressurect each time, even though the last frame's action is Thing_Raise. It does most of the time, however. Also, this happens even if there is plenty of room.
Would you please post the actual (problematic) code to make some tests? Im really interested in this matter.


DBT
Locked

Return to “Editing (Archive)”