Page 1 of 3

Giving a Monster the Rail Gun

Posted: Thu Jun 03, 2004 9:11 pm
by Galaxy_Stranger
I know I'm gonna get smacked upside the head for asking this, but I'm just not running across the info I need. Can anyone point me to a thread that talks about giving the Rail Gun to a Monster? Also - would it be possible to give a monster the Double Rail?

Posted: Thu Jun 03, 2004 9:20 pm
by Giest118
Do you mean in DECORATE? Because in DECORATE, all you have to do is use A_MonsterRail (and set a damage value, too). However, DeHackEd is another story...

Posted: Thu Jun 03, 2004 9:24 pm
by Xaser
All you need to do is make a DeHacked Patch and put the MonsterRail code pointer on one if the attack frames. To make a double rail, use 2 MonsterRail pointers.

Posted: Fri Jun 04, 2004 2:11 am
by Enjay
And don't forget to set the missile damage value for the monster to whatever damage you want the rail to do, otherwise it will do no damage.

Posted: Fri Jun 04, 2004 8:10 am
by Xaser
Heh. Thankd for pointing that out, Enjay. When I go to give monsters railguns, I always forget that and wonder why the rails are doing 0 damage. :P

Posted: Fri Jun 04, 2004 9:29 am
by Enjay
Heh, yeah but it's quite funny to give monsters zero damage railguns because when they hit each other they can still go into their pain state and start infighting - doing no damage. So they just keep trying to whack each other for hours. :)

Posted: Fri Jun 04, 2004 9:31 am
by Xaser
Yeah, and if you get hit by one, it does the pain fade and everything, but you take no damage.

Hmm... That's a good idea. You could make a monster that shoots ridiculously fast railgun shots that do no damage, but it gives you the pain fade and blinds you. Then the other demons around can chew you up. :P

Posted: Fri Jun 04, 2004 3:22 pm
by wildweasel
Xaser: How about firing off about 10 no-damage rails in one frame? That would be more effective.

Posted: Fri Jun 04, 2004 8:24 pm
by Galaxy_Stranger
Eeeesh - Ok. I'd like to eventually figure out how to do it with DECORATE as well, but I need to try it with BEX first. Here's what I've got. Tell me why it won't work, heheheh:

Patch File for DeHackEd v3.0

Doom version = 21
Patch format = 6

Thing 18 (Hell Knight)
Missile Damage = 20
[CODEPTR]
Frame 84 = NULL
Frame 85 = A_GunFlash
Frame 86 = A_FireRailgunLeft
Frame 87 = A_FireRailgunRight

Frame 84
Sprite subnumber = 1
Duration = 1
Next frame = 85

Frame 85
Sprite subnumber = 1
Duration = 1
Next frame = 86

Frame 86
Sprite subnumber = 32768
Duration = 1
Next frame = 87

Frame 87
Sprite subnumber = 32768
Duration = 50
Next frame = 81

Posted: Fri Jun 04, 2004 9:02 pm
by wildweasel
You need to use the codepointer MonsterRail - the pointers you're using are intended for Decorate and ONLY Decorate. Also, I don't know if there's a BEX equivalent of GunFlash.

EDIT: Also, you need to put the CODEPTR section at the END of the file - otherwise, ZDoom interprets what comes after it as BEX code and not DeHackEd.

Posted: Sat Jun 05, 2004 2:55 am
by Ixnatifual
Is that a t-shirt on your head, wildweasel? omg what kind of a ninja ARE you??

Posted: Sat Jun 05, 2004 5:47 am
by The Ultimate DooMer
wildweasel wrote:You need to use the codepointer MonsterRail - the pointers you're using are intended for Decorate and ONLY Decorate. Also, I don't know if there's a BEX equivalent of GunFlash.

EDIT: Also, you need to put the CODEPTR section at the END of the file - otherwise, ZDoom interprets what comes after it as BEX code and not DeHackEd.
Actually, the A_FireRailgunLeft/Right are BEX (not dehacked) codepointers, but work for a player railgun only. MonsterRail is for monsters only (damage = 100 if you want the same power as the player railgun).

Posted: Sat Jun 05, 2004 11:59 am
by wildweasel
TUD: What I meant was that those codepointers were the ones meant for Decorate - he's using A_FireRailgunLeft, when the proper BEX codepointer lacks the A_ prefix.

Posted: Sat Jun 05, 2004 12:02 pm
by Enjay
From Randy's original Railgun.bex

Code: Select all

[CODEPTR]
Frame 77 = A_FireRailgun
Frame 78 = A_RailWait
The A_ isn't needed, but there is nothing wrong with it.

Posted: Sat Jun 05, 2004 2:16 pm
by Graf Zahl
A_RailWait does nothing so it can be safely omitted.