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

Trouble with Pistol and Code Pointers PRBOOM

Recommended Posts

I was playing with the grenades all night. The most I can get is a Land Mine that will bounce off walls and floor until it comes to a rest...

...unfortunatly it will only expload once it is fully still and an enemy or player has walked into it. Great for Counter Strike, but I'm not sure it's something I can use.

I did noticed in the MBFEDIT.TXT a code pointer (A_Die) that says it is commenly used as a set timer for grenades, yet I can't see any documentation that explains how this works. I mean I understand how to use CodePointers such as CHASE, LOOK, and FIREMISSILE, but these code pointeres from MBFEDIT.TXT do not seem to do a thing no matter how I apply them.



---------
5. DEH/BEX Code Pointers

Several new code pointers have been added:

A_Detonate is similar to A_Explode in that it generates a radius of explosion
damage. However, instead of a fixed radius of 128, the radius is set by
changing the "missile damage" of the object being exploded. This allows
explosion damage to be varied easily.

A_Mushroom creates a mushroom-like explosion, throwing fireballs up in all
directions. There is primary damage from the explosion itself, and then
secondary damage from contact with the fireballs. The missile damage of the
spawning object controls how many fireballs are created. Optionally, the
misc1 ("Unknown 1") and misc2 ("Unknown 2") fields may be used to control
the angle and speed of the fireballs. These fields are fixed-point (16.16),
instead of whole numbers.

A_Spawn spawns an object in the same position as the spawner. The misc1 and
misc2 fields of the code pointer's frame (indicated by "Unknown 1" and
"Unknown 2" in DeHackEd), determine the type and z-position of the spawned
object, respectively. Note that if the spawner and spawnee are both solid,
they might stick together.

A_Turn rotates the object's angle by the number of degrees indicated by the
misc1 ("Unknown 1") field.

A_Face sets the object's angle to number of degrees in the misc1 ("Unknown 1")
field.

A_Scratch performs a melee (close-range) attack on the object's current target.
misc1 ("Unknown 1") indicates damage, while misc2 ("Unknown 2") indicates the
sound effect to use.

A_PlaySound plays a sound effect. misc1 ("Unknown 1") is the sound effect
number, and misc2 ("Unknown 2"), if nonzero, makes the sound full-volume
(like boss wakeup sounds).

A_RandomJump jumps randomly to the state in misc1 ("Unknown 1") with a
probability indicated by the misc2 ("Unknown 2") field (0-255). If the
jump doesn't occur, then it falls through to the next state. Note that
the frame's "tics" field must not be -1, for this to work correctly.

A_LineEffect allows activation of remote linedef effects by objects. misc1
("Unknown 1") indicates the linedef type, while misc2 ("Unknown 2") indicates
the sector tag. The tagged sector(s) are activated as though a player has
activated a linedef of the indicated type and tag. If the linedef is a S1 or
W1 type, then the effect blocks out all further A_LineEffect effects for the
object, no matter whether they are S1/W1 or SR/WR types.

A_Die causes an object to kill itself (i.e. commit suicide). It is primarily
used to make countdown timers in grenades.
------------

Share this post


Link to post

When the frame with A_Die happens, the thing just dies. To use it with a timer, use a frame (or a series of frames if you don't want a static appearance or need other effects in the meantime) with the duration of that timer. For a simple mine you'd have a frame lasting a series of tics depending on the duration you want, and then another frame with the A_Die pointer, where the mine explodes.

Share this post


Link to post

The problem is that when I add in that as a code pointer to a frame...

...nothing at all occurs. I can get any Code Pointer to work but those with a "A_" in front of it.

Share this post


Link to post

I think you have to type it without the "A_" (just Die, in this case).

Share this post


Link to post

It seems that if you remove the A_ from the beginning of the code pointers that they do work...

...I think. :)


I instead went a different path for my timed grenade.

I set the initial frame (114) to a duration of 15, then set it's next frame to a Rocket in Flight's Explode frame which I also set to a duration of 15.
In this way I can have a timed grenade but without much delay.

So I made frame 114 jump to a tall candle frame, then had it's last frame jump to Frame 127, but that just resulted in more land mines rather than a timed grenade.

I tried assigning the code pointer Die and Explode to the tall candle's last frame, but that still did not make a timed grenade. It's like things should work, but are not.


---EDIT-------

Playing with Mushroom's:

MBFEDIT.TXT says:

A_Mushroom creates a mushroom-like explosion, throwing fireballs up in all
directions. There is primary damage from the explosion itself, and then
secondary damage from contact with the fireballs. The missile damage of the
spawning object controls how many fireballs are created. Optionally, the
misc1 ("Unknown 1") and misc2 ("Unknown 2") fields may be used to control
the angle and speed of the fireballs. These fields are fixed-point (16.16),
instead of whole numbers.


---------

My application causes a crash. Not sure how to define the above mentioned MISC values.

Patch File for DeHackEd v3.0
# Created with WhackEd2 0.60 build 214

# General version information
Doom version = 21
Patch format = 6

# Info for WhackEd2
Engine config = boom.cfg
IWAD = c:\arcade\doom\dev\xwe\doom2.wad



[CODEPTR]
Frame 127 = Mushroom


Thing 34 (Rocket in flight)
Hit points = 50
Missile damage = 30
Bits = SHOOTABLE + BOUNCES + TOUCHY

Frame 114
Duration = 8
Next frame 127

Share this post


Link to post

I think I'm going to give up on this venture of having a bouncing timed grenade. All logic would say that when reaching the last frame that a sprite would perform the CodePointer actions assigned to that last frame, but alas, the last frame only shows itself when it is not assigned a code pointer. The irony.
So basically because I want it to explode, it cops out and sticks in a loop instead, leaving out the last frame that tells it to explode.

BOOM's kinda weird I guess.

Share this post


Link to post

GzStarWars said:
BOOM's kinda weird I guess.

Have you set a particular compatibility level through the CFG or otherwise? Boom compatibility, for example, should disable any MBF specific pointers. You could also try WinMBF (since its a plain port of MBF) for testing, and if you note a difference in behavior compared to MBF or PrBoom compatibilities in PrBoom, there could be a bug in the latter.

There are also example MBF wads and BEX files in the MBF package (in a file called "EXAMPLES.ZIP", I believe).

Share this post


Link to post

Oh ya, good thinking.

--EDIT---

I wonder what Death frame = 969 is since there are only 966 frames. I'm sure it's in the docs somewhere. I'll have a look later, but that's part of what was used to get the timed bouncing grenade to work in the example that came with Winmbf.

========

# Turn a rocket launcher into a grenade launcher
# By Lee Killough
# Works only with MBF

Thing 34
Bits = BOUNCES | DROPOFF
Hit points = 10
Initial frame = 968
Death frame = 969
Missile damage = 128
Mass = 200

# Note: you can use the code pointer in frame 970 (A_Detonate) to explode
# based on the thing's actual damage, rather than by a constant amount.

# Grenade timer delay
Frame 968
Duration = 135

Share this post


Link to post

GzStarWars said:
I wonder what Death frame = 969 is since there are only 966 frames. I'm sure it's in the docs somewhere.

I haven't seen these in the docs, but the list of frames is certainly in a file (INFO.C) in the source. PrBoom doesn't have the beta BFG from MBF, but it seems to retain its frames (though they are all null) for DeHackEd stuff. You can tell the number of the frames by comparing the list in the PrBoom source with the one in the original source (or Boom's).

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  
×