ACS script - monster spawns then despawns?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

ACS script - monster spawns then despawns?

Post by Hidden Hands »

I hope someone can help. I wrote this script up. The idea is that the player gets frozen on the spot as 2 demons spawn in holding the players friend captive. By the end of the scene they respawn taking her with them.

My problem is that after the player is unfrozen, the2 demons are still there and so is the friend sprite. I have asked in the code to remove-thing after the event but they still remain. Can someone help me please? I've attached a screenshot of my code.
Attachments
20200921_174046.jpg
Guest

Re: ACS script - monster spawns then despawns?

Post by Guest »

You are removing the spawn spots and not the monsters.
The third argument of SpawnSpotForced (https://zdoom.org/wiki/SpawnSpotForced I can't use [url] as a guest it seems) can apply a TID to a newly spawned monster.

Try this:
SpawnSpotForced("HauntDevil",14,16,0);
Thing_Remove(16);
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: ACS script - monster spawns then despawns?

Post by Hidden Hands »

Xavier Gendleshaw wrote:You are removing the spawn spots and not the monsters.
The third argument of SpawnSpotForced (https://zdoom.org/wiki/SpawnSpotForced I can't use [url] as a guest it seems) can apply a TID to a newly spawned monster.

Try this:
SpawnSpotForced("HauntDevil",14,16,0);
Thing_Remove(16);
Absolutely amazing thank you so much. Works perfectly now!!!
Post Reply

Return to “Scripting”