NoVertugo Posted December 26, 2012 Hey everyone, just had some questions about some doom editing. Recently I coded a monster to respawn upon death. How ever I was wondering if there is a way to make the monster respawn at the location it was killed/died instead of respawning at its initial spawn location. My second question is about path node editing in Doom builder 2. What i did was I set up a series of path nodes for the monster to follow. The monster successfully follows the nodes, however once it is killed, and respawns, it tries to go to the node it left off at and it fails. Is there a way for a monster to follow the path nodes from the first node again after it is killed? Any help is greatly appreciated. Thank you. 0 Share this post Link to post
Cacowad Posted December 26, 2012 meh, i am trying to to the same thing in Decorate, failing, trought the use of ACS you can easily resurrect dead monsters on ther death location, it could be easier knowing how is handled the resurrection in zdoom, which flags are involved? how is handled the hits points restoration? regarding the path nodes, upon death all monster specials are lost and all flags reset. you have to readd the special manually using a script (i think, i may be wrong here). 0 Share this post Link to post
Gez Posted December 26, 2012 How are you making the monster resurrect? If you make it respawn, it'll go back to its starting position; but if you make it resurrect, it'll happen right where it died. 0 Share this post Link to post
Cacowad Posted December 26, 2012 i'm trying to resurrect it in place trougth decorate, so i have not to make a script on every level where i use it. but all what i got so far is an invincible zombieman that can't enter it's death state. 0 Share this post Link to post
Krispy Posted December 26, 2012 Here's a way: Create two monsters. For this example two imps. For one of them, put A_SpawnItemEx in its death state. For the other, leave it alone. Put the Spawnitemex monster in your map and make it spawn a regular monster, in this case a plain imp.ACTOR CrazyRespawningDoomImp 9000 { Game Doom SpawnID 5 Health 60 Radius 20 Height 56 Mass 100 Speed 8 PainChance 200 Monster +FLOORCLIP SeeSound "imp/sight" PainSound "imp/pain" DeathSound "imp/death" ActiveSound "imp/active" HitObituary "$OB_IMPHIT" Obituary "$OB_IMP" States { Spawn: TROO AB 10 A_Look Loop See: TROO AABBCCDD 3 A_Chase Loop Melee: Missile: TROO EF 8 A_FaceTarget TROO G 6 A_TroopAttack Goto See Pain: TROO H 2 TROO H 2 A_Pain Goto See Death: TROO I 8 TROO J 8 A_Scream TROO K 6 TROO L 6 A_NoBlocking TROO M -1 A_SpawnItemEx("DoomImp", 0, 0, 28, 0, 0, 0, 0, 0) <<<<<LOOK HERE Stop XDeath: TROO N 5 TROO O 5 A_XScream TROO P 5 TROO Q 5 A_NoBlocking TROO RST 5 TROO U -1 Stop Raise: TROO MLKJI 8 Goto See } } 0 Share this post Link to post
NoVertugo Posted December 26, 2012 Im making it respawn with A_Respawn in the Dead script. How can I make it resurrect at its death position? Also with path nodes, would you know how to make the monster target the first initial path node after death and respawn? 0 Share this post Link to post
NoVertugo Posted December 26, 2012 Krispy said:Here's a way: Create two monsters. For this example two imps. For one of them, put A_SpawnItemEx in its death state. For the other, leave it alone. Put the Spawnitemex monster in your map and make it spawn a regular monster, in this case a plain imp.ACTOR CrazyRespawningDoomImp 9000 { Game Doom SpawnID 5 Health 60 Radius 20 Height 56 Mass 100 Speed 8 PainChance 200 Monster +FLOORCLIP SeeSound "imp/sight" PainSound "imp/pain" DeathSound "imp/death" ActiveSound "imp/active" HitObituary "$OB_IMPHIT" Obituary "$OB_IMP" States { Spawn: TROO AB 10 A_Look Loop See: TROO AABBCCDD 3 A_Chase Loop Melee: Missile: TROO EF 8 A_FaceTarget TROO G 6 A_TroopAttack Goto See Pain: TROO H 2 TROO H 2 A_Pain Goto See Death: TROO I 8 TROO J 8 A_Scream TROO K 6 TROO L 6 A_NoBlocking TROO M -1 A_SpawnItemEx("DoomImp", 0, 0, 28, 0, 0, 0, 0, 0) <<<<<LOOK HERE Stop XDeath: TROO N 5 TROO O 5 A_XScream TROO P 5 TROO Q 5 A_NoBlocking TROO RST 5 TROO U -1 Stop Raise: TROO MLKJI 8 Goto See } } Thanks for that krispy, but would there be a way to respawn the same actor? OR how could you make the new spawned monster target a path node? 0 Share this post Link to post
Cacowad Posted December 26, 2012 Krispy: never thought of that, is indeed a very simple way to fake an auto-resurrecting actor. anyway if i use an actor, a modified super fast resurrect-only archvile for exemple, that use the heal state on the are where the multiple imps died, it will resurrect them all, i remember that there is a way to remove corpose on dead using decorate. (EDIT: indeed there is A_QueueCorpse, but there is a way to set sv_corpsequeuesize () in a mapinfo? ) novertugo: i think you have to reset the specials of the monsters manually, maybe this http://zdoom.org/wiki/SetThingSpecial and this http://zdoom.org/wiki/A_SetSpecial may help. 0 Share this post Link to post
NoVertugo Posted December 26, 2012 Im kind of confused with the ACS style of scripting. How would I write for a monster to target a certain node after death? 0 Share this post Link to post
Blue Shadow Posted December 26, 2012 For the respawn thing; you could make the monster resurrect (not respawn) by using Thing_Raise in its DECORATE. 0 Share this post Link to post
Cacowad Posted December 27, 2012 Blue Shadow said:For the respawn thing; you could make the monster resurrect (not respawn) by using Thing_Raise in its DECORATE. i belived it for a second, i was all "oh my gosh,oh my gosh,oh my gosh," then i tried it, and it didn't work at all. if it is really recognised by decorate i have to find how to make it work. 0 Share this post Link to post
NoVertugo Posted December 27, 2012 I dont think there is a decorate action for resurrection. Thing_Raise is an ACS script. If anyone has knowledge on ACS, would you be able to tell how I can do the following: Check if the monster is dead, If it is, Respawn and target path node #. Or if you know how to resurrect a monster through decorate. 0 Share this post Link to post
Cacowad Posted December 27, 2012 assuming you are using an imp and that imp have it's TID set to 60 a script may be like this one: #include "zcommon.acs" script 4 (void) { if ( thingcount (T_imp, 60) == 0 ) delay(35); else{ thing_raise(60); Thing_SetGoal (60, 200, 10, 0) delay(35); printbold(s:"OHMYGAW! the imp resurrected!"); delay(35); } } the exact thing can be done in decorate (and that is what i am searching) but seems to be more difficoult to do... aaanyway, this script must vary in order to satisfy what you want to do. is it triggered by the monster itself on dying or is activated by a line (swicht)? 0 Share this post Link to post
NoVertugo Posted December 27, 2012 I would like it to execute when the monster dies. Lets say I have a 'MarineChaingun' placed in the level. He visits path nodes 1 to 10. He makes it to path node 5 but dies. He respawns at his initial start location and re-targets path node 1. Unfortunately I dont know how to script that. I will try yours out you listed above 0 Share this post Link to post
Krispy Posted December 27, 2012 NoVertugo said:Thanks for that krispy, but would there be a way to respawn the same actor? Simple. Instead of respawning a normal one, respawn the same one with spawitemex. Instead of:TROO M -1 A_SpawnItemEx("DoomImp", 0, 0, 28, 0, 0, 0, 0, 0 Do this:TROO M -1 A_SpawnItemEx("CrazyRespawningDoomImp", 0, 0, 28, 0, 0, 0, 0, 0 0 Share this post Link to post
Blue Shadow Posted December 27, 2012 Cacowad said:i belived it for a second, i was all "oh my gosh,oh my gosh,oh my gosh," then i tried it, and it didn't work at all. if it is really recognised by decorate i have to find how to make it work. Admittedly, I didn't test it to see if it works or not, though it looked like it could, but I guess I'was wrong. NoVertugo said:Thing_Raise is an ACS script. Actually, it's an action special. And yes, you can use action specials from within DECORATE, though apparently not this particular special (or at least not the way we're trying to use in). 0 Share this post Link to post
Cacowad Posted December 27, 2012 turning point. Novertugo this should work (i hope, i didn't tested it). extracted from the wiki and modified, a patrol chaingun marine: ACTOR MarineChaingun2: ScriptedMarine { Game Doom States { Missile: Goto Super::Missile.Chaingun Death: PLAY H 10 PLAY I 10 A_Scream PLAY J 10 A_NoBlocking PLAY KLM 10 PLAY N 0 A_SpawnItemEx("Resurrector", 0, 0, 28, 0, 0, 0, 0, 0) PLAY N -1 Stop Raise: PLAY MLKJ 5 PLAY I 5 Thing_ChangeTID (0, 60) PLAY H 5 Thing_SetGoal (60, 200, 10, 0) Goto See } } ACTOR Resurrector : Archvile { Game Doom Health 700000 Radius 1 Height 1 Mass 5000000 Speed 1 PainChance 0 Monster -solid -shootable -countkill SeeSound "" PainSound "" DeathSound "" ActiveSound "" MeleeSound "" Obituary "this won't be necessary." States { Spawn: TNT1 A 10 A_Look Loop See: TNT1 A 4 A_VileChase Loop Missile: Stop Heal: TNT1 A 10 Goto Death Pain: TNT1 A 0 Goto See Death: TNT1 A -1 Stop } }the actor named resurrector is a fake archvile that will resurrect the marine if he die, the code can be inproved by applying a delay to the death state or adding two additional states similar to this: Death: PLAY H 10 PLAY I 10 A_Scream PLAY J 10 A_NoBlocking PLAY KLM 10 Sightcheck: PLAY M 35 A_CheckSight ("FakeDeath") Loop FakeDeath: PLAY M 0 A_SpawnItemEx("Resurrector", 0, 0, 28, 0, 0, 0, 0, 0) PLAY M -1 Stop the actor won't be resurrected as long the player (or a spectating player) see the corpose. hope it finally work <.< 0 Share this post Link to post
NoVertugo Posted December 27, 2012 Blue Shadow said:Actually, it's an action special. And yes, you can use action specials from within DECORATE, though apparently not this particular special (or at least not the way we're trying to use in). Yes my mistake, meant to say that it dosent work for some reason in decorate. 0 Share this post Link to post
NoVertugo Posted December 27, 2012 Cacowad said:turning point. Novertugo this should work (i hope, i didn't tested it). extracted from the wiki and modified, a patrol chaingun marine: ACTOR MarineChaingun2: ScriptedMarine { Game Doom States { Missile: Goto Super::Missile.Chaingun Death: PLAY H 10 PLAY I 10 A_Scream PLAY J 10 A_NoBlocking PLAY KLM 10 PLAY N 0 A_SpawnItemEx("Resurrector", 0, 0, 28, 0, 0, 0, 0, 0) PLAY N -1 Stop Raise: PLAY MLKJ 5 PLAY I 5 Thing_ChangeTID (0, 60) PLAY H 5 Thing_SetGoal (60, 200, 10, 0) Goto See } } ACTOR Resurrector : Archvile { Game Doom Health 700000 Radius 1 Height 1 Mass 5000000 Speed 1 PainChance 0 Monster -solid -shootable -countkill SeeSound "" PainSound "" DeathSound "" ActiveSound "" MeleeSound "" Obituary "this won't be necessary." States { Spawn: TNT1 A 10 A_Look Loop See: TNT1 A 4 A_VileChase Loop Missile: Stop Heal: TNT1 A 10 Goto Death Pain: TNT1 A 0 Goto See Death: TNT1 A -1 Stop } }the actor named resurrector is a fake archvile that will resurrect the marine if he die, the code can be inproved by applying a delay to the death state or adding two additional states similar to this: Death: PLAY H 10 PLAY I 10 A_Scream PLAY J 10 A_NoBlocking PLAY KLM 10 Sightcheck: PLAY M 35 A_CheckSight ("FakeDeath") Loop FakeDeath: PLAY M 0 A_SpawnItemEx("Resurrector", 0, 0, 28, 0, 0, 0, 0, 0) PLAY M -1 Stop the actor won't be resurrected as long the player (or a spectating player) see the corpose. hope it finally work <.< Thanks alot for this script cacowad, going to give this one a go. I was also wondering if there was a way to work in Thing_Setgoal after A_Respawn? 0 Share this post Link to post