Giving a Monster the Rail Gun

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
Galaxy_Stranger
Posts: 1326
Joined: Sat Aug 16, 2003 11:42 pm
Location: Shropshire
Contact:

Post by Galaxy_Stranger »

Ok, this is what I've got and I can't figure out what I'm doing wrong:

Patch File for DeHackEd v3.0

Doom version = 21
Patch format = 6

Thing 18 (Hell Knight)
Missile Damage = 20
Code:
[CODEPTR]
Frame 77 = A_FireRailgun
Frame 78 = A_RailWait

I've looked all through Nigel's site and I'm just not putting 2 and 2 together. Can you point me to a page or sample .deh file? What I'm trying to do is give the Hell Knight the Rail Gun, and even TWO, if possible.

What is the significance of the frame numbers? Are they arbitrary? I've been told that both rails is not possible. Is this true?
User avatar
Enjay
 
 
Posts: 27088
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

As was said in the previous posts, you are using the wrong code pointers. Also, you are allocating them to the wrong frames.

You need the MonsterRail code pointer.

You also need to allocate it to the correct frames. The frames are not arbitrary. The frame holds information about what image to display on the screen, what to do when the image is being displayed, how long to display it and which frame to show next and other stuff too.

The objects that have frames are either the players weapons or the items in game. A weapon frame will have information about which graphic to show in the hud, how long to show it for and maybe something like tell Doom to flash the light level, or spawn a projectile etc. Frames for items are similar in concept, but the frames they show are seen in the world rather than in the hud. A simple example would be something like the health bottle. Its frames tell doom to show one picture of the bottle for a limited time then move on to the next picture. After all 4 pictures have been shown doom is instructed to go back to the start of the sequence and start again.

Each weapon and item "knows" which frames to use because these are coded into the game. The frames a weapon uses is shown in the F4 Misc/Weapons page of Dehacked and the frames an item uses can be found in the F2 thing editor. If you want to alter the details of what a frame does, you do it in the F3 frame editor. However, if you are doing something like the railgun which was added after dehacked was written, you need to do at least some of your patch in notepad (or any other text editor - like Text Pad, which kicks ass, Ahem!).

You can make a weapon or item use different frames if you want. eg changing the imp's attack frames to be the same as the barons attack frames mean that when an imp attacks it will suddenly start to look like a baron, will have the barons attack (green plasma or powerful scratch) but still have the attributes of an imp (hit points etc). Of course, you could also change the baron's attack frames in the frame editor so that they use the imp sprites, and all of a sudden you have an imp that uses the barons attack. (BTW, that is a simple yet clumsy hack - there are much better ways to do that.)

Right, to get back to your patch. You have used the frame information that I copied from Randy's railgun.bex file. I did this to show that the A_ could still be used in the codepointer section, although it isn't needed. I wasn't actually trying to answer your problem at that point, and seem to have managed to confuse the issue. :oops: What you have done is allocate the railgun pointers to frames 77 and 78 which probably means that if you load your patch the plasma gun will behave differently, however, the hellknight will show now obvious difference. You need to find which frame the hell knight uses as its actual attack (sorry, I can't check ATM). Go to the F2, thing editor. Go to the Hell knight in that. Highlight the attack frame and press J. This will Jump you to that frame in the frame table. There will be a series of frames for the hell knight attack. The first frame or so will have a code pointer that tells the hell knight to face its target. Shortly after that will be the frame that has the code pointer that tells Doom to make the hell knight attack. You need to identify which frame that is, and that will be the frame number you need to use in your [CODEPTR] section.

There is only one railgun pointer that can be used with monsters (MonsterRail). The player weapon can be made to fire a central rail, or one from the left or right. The monsters only fire a central one. You could put 2 railgun pointers into a monsters attack. The would work and would come from the monster in turn, but would both come from the centre of the monster.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Why don't you simply create a new monster with DECORATE? It's much easier and all these frame index problems don't apply.
User avatar
Enjay
 
 
Posts: 27088
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

Well, there is that too. :)
User avatar
Galaxy_Stranger
Posts: 1326
Joined: Sat Aug 16, 2003 11:42 pm
Location: Shropshire
Contact:

Post by Galaxy_Stranger »

Thanks for the clarification Nigel! I'll get to it.
All of that makes sense, I was just having problems understanding the BEX syntax because I don't really use it much, heh at all really. I've only used Dehacked, and that was about 5 years ago.

Actually, we did use DECORATE at first. I'm trying to create a Monster that fires the Double-Rail like the player can, (I understand that that isn't feasable with bex). And we successfully got the DECORATE monster to fire one side, then the other. I'm switching to BEX because I want to use it on a Skulltag server, which doesn't support DECORATE yet.
User avatar
Macil
Posts: 2529
Joined: Mon Mar 22, 2004 7:00 pm
Preferred Pronouns: He/Him
Location: California, USA. Previously known as "Agent ME".
Contact:

Post by Macil »

Skulltag doesnt support DECORATE? I thought skulltag was based on one of the latest ZDooms...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

2.0.60

The new DECORATE stuff was added in 2.0.61.
User avatar
Lexus Alyus
Posts: 4220
Joined: Tue Jul 15, 2003 5:07 pm
Location: Nottingham, UK
Contact:

Post by Lexus Alyus »

Skulltag is bound to be a little behind because it's based off of something else...

:twisted:
User avatar
Macil
Posts: 2529
Joined: Mon Mar 22, 2004 7:00 pm
Preferred Pronouns: He/Him
Location: California, USA. Previously known as "Agent ME".
Contact:

Post by Macil »

:?: :?:

I was pretty sure it was based on ZDooM...
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

That's what he said.
User avatar
Lexus Alyus
Posts: 4220
Joined: Tue Jul 15, 2003 5:07 pm
Location: Nottingham, UK
Contact:

Post by Lexus Alyus »

Yeah, that sentence makes sense. Skulltag is based off of something (Zdoom), so, when that something gets updated (Zdoom) then skulltag won't be quite up to date because its based off of something (Zdoom) and not that something (Zdoom)... get it? I understand it... its not that hard to grasp...

:twisted:
killingblair
Posts: 937
Joined: Mon Oct 04, 2004 9:16 pm

Post by killingblair »

(Sorry for the humungous bump, but its better then making a new thread, no?)

I'm trying to make the zombie man shoot a railgun, but has no avail, it shoots me, but I take no damage, I've read this whole thread, but still :/

Heres my dehacked

Code: Select all

Patch File for DeHackEd v3.0

Doom version = 21
Patch format = 6

Thing ?? (Zombie)
Missile Damage = 100
[CODEPTR]
Frame ?? = MonsterRail
Sorry for the question marks, I'm not near a good computer with Whacked 2 right now :? Can anyone help?
User avatar
Enjay
 
 
Posts: 27088
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

Code: Select all

Patch File for DeHackEd v3.0

# Note: Use the pound sign ('#') to start comment lines.

Doom version = 19
Patch format = 6


Thing 2 (Trooper)
Missile damage = 100

[CODEPTR] 
Frame 185 = MonsterRail 
I tested that and it worked just fine.

42
killingblair
Posts: 937
Joined: Mon Oct 04, 2004 9:16 pm

Post by killingblair »

It works! I love Enjay x 5!
User avatar
Galaxy_Stranger
Posts: 1326
Joined: Sat Aug 16, 2003 11:42 pm
Location: Shropshire
Contact:

Post by Galaxy_Stranger »

yeeeewww....
Locked

Return to “Editing (Archive)”