[ACS] SpawnProjectile (ACS Function) work around

Discuss all aspects related to modding Zandronum here.
Post Reply
Mr. Satan
New User
Posts: 10
Joined: Thu Oct 15, 2015 7:28 am

[ACS] SpawnProjectile (ACS Function) work around

#1

Post by Mr. Satan » Mon May 27, 2019 9:19 pm

Currently SpawnProjectile is slightly broken. When a player/monster uses it and is standing in a liquid it doesn't work. The possible work arounds I came up with it to have the player Spawn and item that spawns the item using A_SpawnProjectile, have the player spawn an item that calls a script that uses SpawnProjectile to spawn the item, or just use Spawn to spawn the item. The problem with Method A is I want to be able to use a generic item to spawn the item by sending a the name of the item as a string from ACS to it. I don't think this is possible. The problem with Method B is, it works but I can't get the angles to match up (I want the item to always spawn in front of the player). ¿Anyone know how to either do this or another method, that will allow me to anonymously spawn an item with some one being able to see what is being spawned?

User avatar
Empyre
Zandrone
Posts: 1273
Joined: Sun Jul 08, 2012 6:41 am
Location: Garland, TX, USA

[ACS] Re: SpawnProjectile (ACS Function) work around

#2

Post by Empyre » Fri May 31, 2019 6:09 am

Maybe A_SpawnItemEx would do the trick.
"For the world is hollow, and I have touched the sky."

User avatar
Ivan
Addicted to Zandronum
Posts: 2198
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

[ACS] Re: SpawnProjectile (ACS Function) work around

#3

Post by Ivan » Fri May 31, 2019 3:55 pm

You can work around this by moving the source actor up by +16.0, spawning the projectile, then immediately lowering them by 16.0. This works offline and online.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

Mr. Satan
New User
Posts: 10
Joined: Thu Oct 15, 2015 7:28 am

[ACS] Re: SpawnProjectile (ACS Function) work around

#4

Post by Mr. Satan » Sun Jun 09, 2019 4:44 am

That worked. ¿What about keeping it from failing when a player is too close to wall, front and back?

Mr. Satan
New User
Posts: 10
Joined: Thu Oct 15, 2015 7:28 am

[ACS] Re: SpawnProjectile (ACS Function) work around

#5

Post by Mr. Satan » Mon Jun 17, 2019 8:24 pm

Yeah this function is quite broken, using it in a NET game when the player is too close to a wall will cause it to spawn a ghost item, that cannot be picked up. Best to avoid it until it gets fixed.

Post Reply