ZDaemon Forum Index ZDaemon
Client/Server DOOM
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

dead monsters disappear

 
Post new topic   Reply to topic    ZDaemon Forum Index -> Wad Editing
View previous topic :: View next topic  
Author Message
[NSoD]RG_Sniper
Posting Spree!


Joined: 07 Oct 2010

PostPosted: Sun Jan 02, 2011 11:21 pm    Post subject: dead monsters disappear Reply with quote

Hello, how would I make monsters spawn and then disappear when dead on a map. basicly like map 07 of dbzone_v7c.wad
Back to top
View user's profile Send private message
Ronald
Rontard


Joined: 17 Aug 2005
Location: Netherlands Clan: [QnB]

PostPosted: Sun Jan 02, 2011 11:33 pm    Post subject: Reply with quote

This can be done using action specials like Thing Spawn and Thing Remove. You can use these specials in ACS scripts too.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
EarthQuake
Wicked Sick!


Joined: 02 Apr 2004
Location: Athens, Ohio. Dieblieber gonna getcha!

PostPosted: Mon Jan 03, 2011 12:12 am    Post subject: Reply with quote

Using what Roland suggested, you could do it like this:

Spawn some monsters using Thing_Spawn() with a specific TID. Then run a loop with a small delay to check the map for all monsters with that TID, using ThingCount(). This will return only the monsters that are alive. When it returns 0, use Thing_Destroy on the dead monsters (they still have their TID), and poof. You will have to use scripting.

Code:
// MAPSPOT_TID is the TID of the mapspots to spawn the monsters.
// MONSTER_TID is the TID of the monsters that are spawned.

Script 250 (void)
{
  Thing_Spawn(MAPSPOT_TID, T_IMP, 0, MONSTER_TID);
  While (ThingCount(T_IMP, MONSTER_TID) != 0) Delay(35);
  Thing_Destroy(MONSTER_TID, 0);
}


Note that Thing_Destroy() kills the monsters if not dead and removes the corpses otherwise. In the future when ACS support is extended, use Thing_Remove() instead.


Last edited by EarthQuake on Mon Jan 03, 2011 12:22 am; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail
[NSoD]RG_Sniper
Posting Spree!


Joined: 07 Oct 2010

PostPosted: Mon Jan 03, 2011 12:19 am    Post subject: Reply with quote

ok I'll try that
but cant i just remove the monster corpse frame?


Last edited by [NSoD]RG_Sniper on Mon Jan 03, 2011 12:52 am; edited 1 time in total
Back to top
View user's profile Send private message
BestOfTheWorst
Unstoppable!


Joined: 02 Jun 2006

PostPosted: Mon Jan 03, 2011 12:52 am    Post subject: Reply with quote

Umm no, Thing_Destroy does not remove corpses.
You need to use Thing_Remove for it, which is supported just fine in the current version.
Back to top
View user's profile Send private message
[NSoD]RG_Sniper
Posting Spree!


Joined: 07 Oct 2010

PostPosted: Mon Jan 03, 2011 12:53 am    Post subject: Reply with quote

can i just remove the monster's corpse frame?
Back to top
View user's profile Send private message
BestOfTheWorst
Unstoppable!


Joined: 02 Jun 2006

PostPosted: Mon Jan 03, 2011 12:55 am    Post subject: Reply with quote

yes you can do that with dehacked.
Back to top
View user's profile Send private message
[NSoD]RG_Sniper
Posting Spree!


Joined: 07 Oct 2010

PostPosted: Mon Jan 03, 2011 12:57 am    Post subject: Reply with quote

i'll try that, another quick question, how do i make a camera that displays on a wall like so you can whach whats going on in another room?
Back to top
View user's profile Send private message
BestOfTheWorst
Unstoppable!


Joined: 02 Jun 2006

PostPosted: Mon Jan 03, 2011 1:02 am    Post subject: Reply with quote

This can't be done.

Though it can be maybe faked slightly with sky walls and carefully positioned skyboxes..
Back to top
View user's profile Send private message
[NSoD]RG_Sniper
Posting Spree!


Joined: 07 Oct 2010

PostPosted: Mon Jan 03, 2011 1:06 am    Post subject: Reply with quote

oh, i just noticed the camera and security camera things and thaught they would do that
Back to top
View user's profile Send private message
some_random_guy
has entered the game!


Joined: 04 Mar 2011
Location: Planet Earth (specifically Southeast USA)

PostPosted: Tue Mar 08, 2011 8:56 am    Post subject: Reply with quote

I've done some research, and in the new version of ZDoom, the SetCameraToTexture command in ACS can be used to display a camera's field of view as a texture.

However, ZDaemon is based off of such an old version of ZDoom, its available ACS functions probably would not include this. =(
Back to top
View user's profile Send private message
EarthQuake
Wicked Sick!


Joined: 02 Apr 2004
Location: Athens, Ohio. Dieblieber gonna getcha!

PostPosted: Wed Mar 09, 2011 3:55 am    Post subject: Reply with quote

No they do not.

Basic cameras will soon work though. At the moment they only work offline because the netcode doesn't account for them. They're fixed for 1.09 though. You can even make them move around 'n' stuff!

So if you want to use those types of cameras, go for it, just don't expect them to work until a bit later.
Back to top
View user's profile Send private message Send e-mail
ShizzMasteR
On a Rampage!


Joined: 08 Dec 2005
Location: About the 5000th line of code.

PostPosted: Sun Jul 31, 2011 8:47 am    Post subject: Reply with quote

[NSoD]RG_Sniper wrote:
can i just remove the monster's corpse frame?


You can make the final frame of every dead monster go to 0 afterwards as an easy fix for this. Example, I was working on a wad that had thousands of enemies per map, so I made it so that the final frame had a delay of 70 and then went to a vanishing graphic (that had an end frame of 0 to remove it). Keep in mind that you need to do this for EVERY MONSTER and you will need to do the exploding frames as well.

This method is harder than using a simple script but offers consistency.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    ZDaemon Forum Index -> Wad Editing All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group