Minor improvement to SpawnItem (or similar action)

Moderator: GZDoom Developers

Minor improvement to SpawnItem (or similar action)

Postby deathz0r » Mon Jun 27, 2005 10:36 pm

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
deathz0r
ftw
 
Joined: 15 Jul 2003
Location: Land with them kangaroo
Twitch ID: deatsaw
Operating System: Other Linux 64-bit
OS Test Version: Yes (Using Development/Testing Version)
Graphics Processor: ATI/AMD with Vulkan Support

Postby Graf Zahl » Tue Jun 28, 2005 2:21 am

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby deathz0r » Tue Jun 28, 2005 2:39 am

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
deathz0r
ftw
 
Joined: 15 Jul 2003
Location: Land with them kangaroo
Twitch ID: deatsaw
Operating System: Other Linux 64-bit
OS Test Version: Yes (Using Development/Testing Version)
Graphics Processor: ATI/AMD with Vulkan Support

Postby Graf Zahl » Tue Jun 28, 2005 4:51 am

Sorry, that can't be done. It would create problems elsewhere.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby The Ultimate DooMer » Tue Jun 28, 2005 5:31 am

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
The Ultimate DooMer
Will you start the fans please!
 
Joined: 15 Jul 2003
Location: Industrial Zone

Postby Graf Zahl » Tue Jun 28, 2005 5:36 am

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Anakin S. » Tue Jun 28, 2005 5:29 pm

Is it possible to put in an angle parameter so it would be spawned someplace in relation to the facing angle of the spawner?
User avatar
Anakin S.
Am I evil?
 
Joined: 28 Nov 2003
Location: A long time ago in a galaxy far, far away...


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest