Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Tormentor667

ZDoom CodePointers?

Recommended Posts

There's nothing official, but here's the most recent ones. Most of them set or unset a bit. The code pointers are allocated to a frame, and from that frame on, the item will have the behaviour resulting from the modified bits. The procedure can be reversed using the opposite pointer. So making a monster temporarily invulnerable is possible.

Anyway, here they are...

SetFloorClip,
UnSetFloorClip,

Can be used to set whether a monster "sinks" into floor clipping floors defined in the texture lump (like how Heretic liquids behave). May be useful for a flying monster you don't want to floor clip, but you may want its dead body to if it falls on water. I think the cacodemon in Zdoom does something like that.

HideThing,
UnHideThing,

toggles totally hiding an item from view. I think it totally removes it from the automap (checked with IDDT) and everything. Like the green water serpents in Hexen when they are "under water". Do a kill monsters when they are submerged, and they get missed.

SetInvulnerable,
UnSetInvulnerable,

Hopefully pretty obvious. When active, the monster is invulnerable.

SetReflective,
UnSetReflective,

Toggles whether projectiles will bounce off the item.

SetReflectiveInvulnerable,
UnSetReflectiveInvulnerable,

Sets invulnerable and reflective - like the Hexen centaurs with their shields raised.

SetShootable,
UnSetShootable,

Again, I think this s pretty obvious.

NoGravity,
Gravity,

Allow a monster to toggle between being a floater or a walker. This doesn't mean the monster will suddenly "take off", unless it has a reason to rise, but it does give it the ability to take off.

Edit: Thanks again Sphagne. Although this, being new stuff, isn't on my page yet.

Share this post


Link to post

Actualy the centaurs are only invulnerable fom the front and front side, if you use a poinson gas or run around and hi them in the ass they can get hurt. Yeah I know, nag nag nag.

Share this post


Link to post
Tormentor667 said:

What about the possibility of giving monsters other weapons? (SSG, SG, RailGun, etc)???


SSG - no, not really, but you can fake it. Give a monster 2 (or more) simultaneous shotgun pointers and his damage is dramatically increased. Combine it with a code pointer that plays a sound (I have used the one that makes the mancubus make that funny sound just before he fires) and change the sound lump to be like the super shotty. Voila, effect complete.

Shotgun, just use the shotgun troopers code pointer

Railgun, you'll want to use the MonsterRail code pointer. Set how much damage the rail does by giving the monster a missile damage value.

As a general rule, however, player weapon code pointers and monster weapon code pointers are not interchangable. If you give a player weapon pointer to a monster, or a monster weapon pointer to a player weapon, you'll usually end up with a crash. The best you can usually get is making a monster attack seem like the player one, or vice versa. eg, it would be easy to make the player plasma bolts seem like imp fireballs.

There's a list of all the codepointers in the dehacked section of my site.

Share this post


Link to post

I'm not 100% sure on this, but doesn't ZDoom use the Attack sound defined in a deh patch for enemy hitscan weapons if it's present? IIRC, I have two enemies in Gunsmith Cats that use the pistol shot, but with different sounds. Someone say so if I'm wrong.

Share this post


Link to post

You could be right, and for some, you certainly are right. eg the chaingunner and SS Guy can be set to have different sounds.

November 7, 2001
- Changed A_CPosAttack() to use self->AttackSound instead of hard-coding it
to "chainguy/attack". Now the WolfSS can have a different attack sound.


But I think some sounds may still be tied into the code pointers. To be honest, I'm not sure. The enemy that I have set up was made before the above changes were made to the code, and I haven't bothered making a change to it since. I know it still works. :-)

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
Sign in to follow this  
×