2 Problems... (DECORATE and MODELDEF, seperate)

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.
Locked
User avatar
Surreal Doomer
Posts: 125
Joined: Thu Jun 12, 2008 7:02 am

2 Problems... (DECORATE and MODELDEF, seperate)

Post by Surreal Doomer »

Hey. I turned my attention on Chex Quest for a bit a few weeks ago. I decided to make a reloading system for all of the Zorchers. It works perfectly, but there is one problem.

Allow me to explain.

Let's say I have the Mini Zorcher (Pistol conversion), which takes 12 shots before it has to reload. I created a hub level a while back and decided to test it in a hub, for a project idea. If I had the fist-conversion (Bootspoon, doesn't have/need a reloading system) as my only weapon, I can switch between two levels just fine. However, if I have the Mini Zorcher as a weapon, even if it isn't currently selected, (G)Zdoom crashes when I try to switch back from one level to another. Basically, it makes all the levels one-way trips. It also crashes whenever the player tries to load an autosave after he/she dies.

Could someone help me make this NOT happen?

Code:

Code: Select all

actor MiniZorcher2 : DoomWeapon replaces Pistol
{
  Weapon.SelectionOrder 1900
  Weapon.AmmoGive 0
  Weapon.AmmoType "MiniZorch"
  Obituary "%o was spirited away by %k's Mini Zorcher."
  +WEAPON.WIMPY_WEAPON
  Inventory.Pickupmessage "You got the Mini Zorcher!"
  States
  {
  Ready:
    PISG A 1 A_WeaponReady
    PISG A 0 A_JumpIfInventory("ExpendedMiniZorch",2,"Ready2")
    Loop
  Ready2:
    PISG B 1 A_WeaponReady
    PISG B 0 A_JumpIfInventory("ExpendedMiniZorch",4,"Ready3")
    Loop
  Ready3:
    PISG C 1 A_WeaponReady
    PISG C 0 A_JumpIfInventory("ExpendedMiniZorch",6,"Ready4")
    Loop
  Ready4:
    PISG D 1 A_WeaponReady
    PISG D 0 A_JumpIfInventory("ExpendedMiniZorch",8,"Ready5")
    Loop
  Ready5:
    PISG E 1 A_WeaponReady
    PISG E 0 A_JumpIfInventory("ExpendedMiniZorch",10,"Ready6")
    Loop
  Ready6:
    PISG F 1 A_WeaponReady
    PISG F 0 A_JumpIfInventory("ExpendedMiniZorch",12,"Reload")
    Loop
  Ready7:
    PISG G 1 A_WeaponReady
    loop
  Reload:
    PISG A 0 A_JumpIfInventory("MiniZorch",1,"Recharge")
    goto Ready7
  Recharge:
    PISG G 7
    PISG F 7
    PISG E 7
    PISG D 7
    PISG C 7
    PISG B 7
    PISG A 7
    PISG A 0
    PISG A 0 A_TakeInventory("MiniZorch",1)
    PISG A 0 A_TakeInventory("ExpendedMiniZorch",12)
    goto Ready
  Deselect:
    PISG A 1 A_Lower
    Loop
  Select:
    PISG A 1 A_Raise
    Loop
  Fire:
    PISG A 0 A_JumpIfInventory("ExpendedMiniZorch",12,"Reload")
    goto Fire2
  Fire2:
    PISG A 0 A_JumpIfInventory("ExpendedMiniZorch",2,"Fire3")
    PISG A 4
    PISG H 6 A_FirePistol
    PISG O 4
    PISG O 0 A_GiveInventory("ExpendedMiniZorch",1)
    PISG O 0 A_JumpIfInventory("ExpendedMiniZorch",12,"Reload")
    PISG H 5 A_ReFire
    Goto Ready
  Fire3:
    PISG B 0 A_JumpIfInventory("ExpendedMiniZorch",4,"Fire4")
    PISG B 4
    PISG I 6 A_FirePistol
    PISG P 4
    PISG P 0 A_GiveInventory("ExpendedMiniZorch",1)
    PISG P 0 A_JumpIfInventory("ExpendedMiniZorch",12,"Reload")
    PISG I 5 A_ReFire
    Goto Ready
  Fire4:
    PISG C 0 A_JumpIfInventory("ExpendedMiniZorch",6,"Fire5")
    PISG C 4
    PISG J 6 A_FirePistol
    PISG Q 4
    PISG Q 0 A_GiveInventory("ExpendedMiniZorch",1)
    PISG Q 0 A_JumpIfInventory("ExpendedMiniZorch",12,"Reload")
    PISG J 5 A_ReFire
    Goto Ready
  Fire5:
    PISG D 0 A_JumpIfInventory("ExpendedMiniZorch",8,"Fire6")
    PISG D 4
    PISG K 6 A_FirePistol
    PISG R 4
    PISG R 0 A_GiveInventory("ExpendedMiniZorch",1)
    PISG R 0 A_JumpIfInventory("ExpendedMiniZorch",12,"Reload")
    PISG K 5 A_ReFire
    Goto Ready
  Fire6:
    PISG E 0 A_JumpIfInventory("ExpendedMiniZorch",10,"Fire7")
    PISG E 4
    PISG L 6 A_FirePistol
    PISG S 4
    PISG S 0 A_GiveInventory("ExpendedMiniZorch",1)
    PISG S 0 A_JumpIfInventory("ExpendedMiniZorch",12,"Reload")
    PISG L 5 A_ReFire
    Goto Ready
  Fire7:
    PISG F 4
    PISG M 6 A_FirePistol
    PISG T 4
    PISG T 0 A_GiveInventory("ExpendedMiniZorch",1)
    PISG T 0 A_JumpIfInventory("ExpendedMiniZorch",12,"Reload")
    PISG M 5 A_ReFire
    Goto Ready
  Flash:
    PISF A 7 Bright A_Light1
    Goto LightDone
    PISF A 7 Bright A_Light0
    Goto LightDone
  Spawn:
    MINI A -1
    Stop
  }
}

ACTOR MiniZorch : Ammo replaces Clip
{
  Inventory.PickupMessage "Picked up a Mini Zorcher cartridge."
  Inventory.Amount 1
  Inventory.MaxAmount 1
  Inventory.Icon "CLIPA0"
  States
  {
  Spawn:
    CLIP A -1
    Stop
  }
}

ACTOR ExpendedMiniZorch : Ammo
{
  Inventory.PickupMessage "Picked up a Mini Zorch recharge."
  Inventory.Amount 1
  Inventory.MaxAmount 12
  Inventory.Icon "CLIPA0"
  +IGNORESKILL
  States
  {
  Spawn:
    CLIP A -1
    Stop
  }
}
Now, on to my second problem.


I was trying to make a Doom crate md3 model so that I could make a pushable crate. However, I am having a problem with using more than one skin image on the same model. Will someone help me?

Code: Select all

Model DoomCrate1
{
  Path "Models"
  Model 0 "DOMCRT1.md3"
  Skin 0 "FLOOR3_3.bmp"
  Skin 1 "CRATA1.bmp"
  Scale 1.0 1.0 1.0

  Frame CRAT A 0 0
}
User avatar
ReX
Posts: 1584
Joined: Tue Aug 05, 2003 10:01 am
Location: Quatto's Palace
Contact:

Re: 2 Problems... (DECORATE and MODELDEF, seperate)

Post by ReX »

Surreal Doomer wrote:I was trying to make a Doom crate md3 model so that I could make a pushable crate. However, I am having a problem with using more than one skin image on the same model. Will someone help me?

Code: Select all

Model DoomCrate1
{
  Path "Models"
  Model 0 "DOMCRT1.md3"
  Skin 0 "FLOOR3_3.bmp"
  Skin 1 "CRATA1.bmp"
  Scale 1.0 1.0 1.0

  Frame CRAT A 0 0
}
As far as I know, your model cannot call up images from more than one image file. Your best bet is to combine the two images into a single file and then remap your skin onto your model.

Depending on the way your model skins one of your images (say FLOOR3_3.bmp), and assuming your crate is a simple cube, you may not need to remap your skin onto the model. Try combining the two images into a single file (say one above the other in the combined image file), then run your model after deleting the relevant skin from your MODELDEF above. If it looks funky or you only see one of the skins, try moving the image to be side-by-side with your first image. If your model only requires one crate "face" then you're shit out of luck unless you modify your skin maps.
User avatar
Enjay
 
 
Posts: 26945
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: 2 Problems... (DECORATE and MODELDEF, seperate)

Post by Enjay »

ReX is quite correct. GZdoom does not support different skins being used on the same model at the same time. You can set things up so that a model's skin changes, but it can only ever have one skin at any one time.
User avatar
Surreal Doomer
Posts: 125
Joined: Thu Jun 12, 2008 7:02 am

Re: 2 Problems... (DECORATE and MODELDEF, seperate)

Post by Surreal Doomer »

I'll give that combined-texture thing a try at some point, but the DECORATE problem takes presidence. Any suggestions?

UPDATE: The error disappears (for the most part) in the latest SVN version of (G)Zdoom.
Locked

Return to “Editing (Archive)”