Question about Spawnspot

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Kappes Buur
Persecution Complex
Posts: 176
Joined: Tue Apr 05, 2011 4:30
Location: British Columbia

Question about Spawnspot

Post by Kappes Buur » Mon Aug 06, 2012 3:13

I had made a simple example pwad with mapspots and scripts to utilize SpawnSpot.

I didn't notice this at first, but giving the actor the same ID as a mapspot causes whatever is to be spawned to spawn at the mapspots and where the actor was fragged. In this case the actors are Former Human.

So, my question is, is that correct behaviour for spawning?

example pwad

Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: Question about Spawnspot

Post by Gez » Mon Aug 06, 2012 7:59

There is nothing special about a map spot. Functions like SpawnSpot don't work on the premise that they're going to look for map spots, and only map spots. The map spot actors are simply convenient because they don't do anything else; and TID-based functions look at all actors with that TID, regardless of what they are. You could replace map spots with pools of blood, for example, it'd work the same way.

Note that if you use SpawnSpotForced, you'll also be able to spawn actors at TIDed zombiemen that aren't killed. With non-forced spawns it fails because there's a check made to see if they have enough room to spawn.

User avatar
Kappes Buur
Persecution Complex
Posts: 176
Joined: Tue Apr 05, 2011 4:30
Location: British Columbia

Re: Question about Spawnspot

Post by Kappes Buur » Mon Aug 06, 2012 9:32

Thank you for the clarification.

It seems a bit counter intuitive, though.
I just have to remember that.

User avatar
Enjay
There is no dark side in the moon, really...
Developer
Developer
Posts: 4627
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: Question about Spawnspot

Post by Enjay » Mon Aug 06, 2012 11:50

Without it, a lot of things wouldn't be possible (at least not as easily) - for example, spawning a key at an actor's location when he dies.

ibm5155
Posts: 152
Joined: Tue Oct 25, 2011 13:05

Re: Question about Spawnspot

Post by ibm5155 » Wed Aug 15, 2012 22:37

With spawn function you can do everything without mapspots ^^
Just take the x,y,z position in doom builder and it´s done =D

User avatar
Enjay
There is no dark side in the moon, really...
Developer
Developer
Posts: 4627
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: Question about Spawnspot

Post by Enjay » Wed Aug 15, 2012 22:57

And then when you move your map in the editor, all your spawns are in the wrong place. :P

Locked

Return to “GZDoom”