Icon of Sin / Baphomet
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > help to reload on zdoom
 
Author
All times are GMT. The time now is 14:32. Post New Thread    Post A Reply
SteelDrake
Newbie


Posts: 4
Registered: 08-08


hello, i tried to use Xaser's "COPGun" so i could use the altfire to reload.

heres the portion of the DECORATE lump that zdoom crashes on,

code:
ACTOR ZenII : Weapon 2005 { +NOALERT +AMMO_OPTIONAL +STRIFEDAMAGE Inventory.PickupSound "weapons/zenreload1" Inventory.PickupMessage "You got the Zen II SMG!" Weapon.AmmoType "Clip" Weapon.AmmoGive 60 Weapon.AmmoUse 1 Weapon.Kickback 20 AttackSound "weapons/zenfire" States { Spawn: ZSMG A -1 Loop Ready: ZENG A 1 A_WeaponReady Loop Deselect: ZENX ABCDEF 1 Loop Select: ZENG A 1 A_Raise Loop Fire: ZENG A 0 A_JumpIfInventory("Zen2InClip", 1, 2) ZENG A 1 Goto Ready ZENG A 0 A_GunFlash ZENG A 0 A_FireCustomMissile("CheapAlert",0,0,0,0) ZENG A 0 A_TakeInventory("Zen2InClip",1) ZENG BC 1 Bright A_FireBullets(2,2,1,10,0,0) ZENG C 1 Bright ZENG A 1 A_ReFire Goto Ready Hold: ZENG A 1 ZENG A 1 A_ReFire Goto Ready AltFire: ZENG A 0 A_JumpIfInventory("Zen2InClip", 30, 2) ZENG A 0 A_JumpIfInventory("Clip", 1, 2) ZENG A 0 Goto Ready ZENG D 1 A_PlaySound("weapons/zenreload2") ZENG E 1 ZENG FG 1 ZENG H 1 ZENG IJKLMNOPQRST 1 ZENG T 0 A_TakeInventory("Clip",15) <--- somewhere between here ZENG T 0 A_GiveInventory("zen2InClip",15) ZENG T 0 A_JumpIfInventory("zen2inclip",30,2) ZENG T 0 A_JumpIfInventory("Clip",1,2) ZENG T 0 <--- and here. Goto AltFire+22 ZENG T 0 Goto AltFire+16 ZENG T 1 A_PlaySound("weapons/zenreload1") ZENG U 1 ZENG V 1 ZENG W 1 ZENG XYZ 1 ZENG "[" 1 ZENG "\" 1 ZENG A 1 Goto Ready Flash: MAGG K 1 Bright A_Light2 MAGG K 1 Bright A_Light1 MAGG K 1 Bright A_Light0 Stop } }


it crashes when Zen2InClip gets to 30.

[out of AlternateWeps3.wad]

Old Post 08-21-08 01:12 #
SteelDrake is offline Profile || Blog || PM || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
Kirby
Member


Posts: 501
Registered: 10-04


Two things -

1) Perhaps you could denote WHERE line 30 is in your code or at least post the error message that you got (it would help a LOT)

2) Which version of ZDoom were you running?

EDIT - Nevermind, my lack of knowledge has been displaced by superior means :P

Last edited by Kirby on 08-21-08 at 04:17

Old Post 08-21-08 04:07 #
Kirby is offline Profile || Blog || PM || Email || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
TheDarkArchon
Forum Staple


Posts: 2047
Registered: 08-04


change Goto AltFire+22 to AltFire+25. As things stand, you're creating a zero duration infinite loop

__________________
* insert completely and utterly useless nonsense here that nobody will ever read ever *

Old Post 08-21-08 04:09 #
TheDarkArchon is offline Profile || Blog || PM || Email || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
SteelDrake
Newbie


Posts: 4
Registered: 08-08


To Kirby:

ZDoom 2.2.0 (r748)

oh, TheDarkArchon, that fixed the crashing, not the loop.

Old Post 08-21-08 05:46 #
SteelDrake is offline Profile || Blog || PM || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
TheDarkArchon
Forum Staple


Posts: 2047
Registered: 08-04


AltFire+16 changes to AltFire+21. The gives and takes should only be 1 a piece to account for having less than a full clip in reserve

__________________
* insert completely and utterly useless nonsense here that nobody will ever read ever *

Old Post 08-21-08 06:25 #
TheDarkArchon is offline Profile || Blog || PM || Email || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
SteelDrake
Newbie


Posts: 4
Registered: 08-08


ok, i think i figured it out.

one more thing, how do you replace, say the pistol, in decorate?

thanks.

Old Post 08-21-08 07:09 #
SteelDrake is offline Profile || Blog || PM || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
TheDarkArchon
Forum Staple


Posts: 2047
Registered: 08-04


Create a custom player class. Inherit from the Doomguy, have Player.StartItem's for the weapon, magazine ammo and reserve ammo.

Old Post 08-21-08 07:56 #
TheDarkArchon is offline Profile || Blog || PM || Email || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
Graf Zahl
Forum Legend


Posts: 4194
Registered: 01-03


Better use labels to jump to instead of counting states. It's much less error-prone.

Old Post 08-21-08 09:23 #
Graf Zahl is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
All times are GMT. The time now is 14:32. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > help to reload on zdoom

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Forums Directory