Minor improvement to SpawnItem (or similar action)

Moderator: GZDoom Developers

Post Reply
User avatar
deathz0r
Posts: 353
Joined: Tue Jul 15, 2003 4:09 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Land with them kangaroo
Contact:

Minor improvement to SpawnItem (or similar action)

Post by deathz0r »

Ok, I'm working on a weapons/monsters mod which has randomised monster and weapon spawners. The problem is that it moves the monster about 32 or so units from their original position and always makes them face east (as well as being undeaf, but I guess that'd be harder to implement), or if it's too close to a wall, it won't spawn at all. Is there a way to make the monster spawn exactly where the location of the spawner is (as well as making it face the right direction), or is that not possible to do? Here's an example of what I mean:

http://deathz0r.unidoom.org/junk/omgwpns.zip

Try it on any map.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

A_SpawnItem has a distance parameter. Set that to 1. 0 is just a placeholder so that the spawned item doesn't intersect with the spawner.

The incorrect angle is a bug which I hace fixed right now.

For deaf monsters you have to create your own copy of the monster in DECORATE and set the +AMBUSH flag.
User avatar
deathz0r
Posts: 353
Joined: Tue Jul 15, 2003 4:09 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Land with them kangaroo
Contact:

Post by deathz0r »

Graf Zahl wrote:A_SpawnItem has a distance parameter. Set that to 1. 0 is just a placeholder so that the spawned item doesn't intersect with the spawner.

The incorrect angle is a bug which I hace fixed right now.

For deaf monsters you have to create your own copy of the monster in DECORATE and set the +AMBUSH flag.
Ahh, I couldn't find any documentation on A_SpawnItem. Thanks a lot!

As for the deaf part, I was hoping that it'd be able to inherit that feature from the spawner itself (if the map gave it the deaf ability) to make the spawner remain faithful to the original map.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Sorry, that can't be done. It would create problems elsewhere.
User avatar
The Ultimate DooMer
Posts: 2109
Joined: Tue Jul 15, 2003 5:29 pm
Location: Industrial Zone

Post by The Ultimate DooMer »

So the parameters for this are A_SpawnItem ("type", distance from spawner, angle) ?
What are the distance and angle measured in? (ie. units, multiples of units, byte angle, normal angle etc.)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

It's A_SpawnItem("type", distance, zheight, useammo)

There is no angle parameter. In the current version the spawned item is always facing east but that has been fixed and it will face in the same direction as the spawner in the next release.
User avatar
Anakin S.
Posts: 1067
Joined: Fri Nov 28, 2003 9:39 pm
Location: A long time ago in a galaxy far, far away...

Post by Anakin S. »

Is it possible to put in an angle parameter so it would be spawned someplace in relation to the facing angle of the spawner?
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”