Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Panda

Thing_SpawnFacing Help!!!

Recommended Posts

With Thing_SpawnFacing I made an item that when you take it, you pass the level. The problem is that if I put myself right where the object is generated, just when it appears, it is not generated and is lost.

 

Is there a way for this not to happen? What if we get on top of it, that it delays its appearance until one leaves that place, or something similar?

Share this post


Link to post

If you want the actor to keep trying to spawn even if you're initially blocking the location, you can use a simple while loop like this:

while(!Thing_SpawnFacing(tid, type, nofog, newtid))
		delay(15);

Alternatively, you can use the SpawnSpotForced or SpawnSpotFacingForced to force the actor to spawn, but this should be used with caution.

Share this post


Link to post
1 hour ago, Aurelius said:

If you want the actor to keep trying to spawn even if you're initially blocking the location, you can use a simple while loop like this:


while(!Thing_SpawnFacing(tid, type, nofog, newtid))
		delay(15);

Alternatively, you can use the SpawnSpotForced or SpawnSpotFacingForced to force the actor to spawn, but this should be used with caution. 

 

Woof! Dude, you have saved my life !!! You are the fucking master !! Thank you!! The truth is I'm trying to make a painkiller-style wad and I'm trying to do what they managed to do in the wad of "Doom Slayer Chronicles", where they managed to do what I still can't.

 

I need to make the doors open when the enemies on the list are eliminated, and I couldn't do it. So far I have the gates open at a certain time, but that looks horrible as sometimes not all enemies are eliminated and the gates open. Or if I put a counter on them, it happens that if I eliminate the first enemy instantly, the door opens, since it does not detect the other enemies that are about to be spawned.

 

Is there a way to do this?

 

I don't know if I explain myself well, my English is very bad, but I hope I have made myself understood.

First of all, Thanks!

Share this post


Link to post
On 5/14/2021 at 3:08 AM, Panda said:

I need to make the doors open when the enemies on the list are eliminated

 

This script example waits until all Barons of Hell with tid 681 are eliminated before continuing with opening a door. It checks every 2 seconds.

 

while ( ThingCountName( "BaronOfHell", 681 ) > 0 ) delay(70);
Door_Open...

 

Or this variant, which does the same check except for all things tagged 681 regardless of thingtype:

 

while ( ThingCountName( T_NONE, 681 ) > 0 ) delay(70);
Door_Open...

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×