Item = 1 when changing the map?

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
Tormentor667
Posts: 13556
Joined: Wed Jul 16, 2003 3:52 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia (Modern GZDoom)
Location: Germany
Contact:

Item = 1 when changing the map?

Post by Tormentor667 »

I have a question concerning a problem I have in ZDoom/GZDoom. I created a marine reinforcement item that looks like this:

Code: Select all

actor MarineItem : CustomInventory 25003
{
  inventory.pickupmessage "Marine Reinforcements"
  inventory.maxamount 10
  inventory.icon MARHA0
  +INVENTORY.INVBAR 
  +FLOATBOB
  scale 0.5
  states
  {
  Spawn:
   	MARP A -1
    	stop 
  Pickup:
  	NULL A 1 A_PlaySound("pickup") 
  	stop
  Use: 
        NULL A 1 A_SpawnItem("TeleportFog", 64, 16, 0, 1)
        NULL A 0 A_Jump(128, 4)
        NULL A 0 A_Jump(128, 2)
        NULL A 0 A_SpawnItem("STMarineShotgun", 64, 16, 0, 1)
        NULL A 0 A_SpawnItem("STMarineChaingun", 64, 16, 0, 1)
        NULL A 0 A_Jump(128, 2)
        NULL A 0 A_SpawnItem("STMarineSSG", 64, 16, 0, 1)
        NULL A 0 A_Jump(128, 2)
        NULL A 0 A_SpawnItem("STMarineRocket", 64, 16, 0, 1)
        NULL A 0 A_SpawnItem("STMarinePlasma", 64, 16, 0, 1)
  	stop
  }
}
Everything works fine with it except one thing: When I have collected 2 or more of these items and exit one level, I only have one left of these items in the next upcoming level. It's always the same, no matter how many items I have, it's always only one after changing the maps. What's wrong? How can I prevent this?
User avatar
Zippy
Posts: 3302
Joined: Wed Mar 23, 2005 5:31 pm
Location: New Jersey

Re: Item = 1 when changing the map?

Post by Zippy »

That's just the default map behavior for non-hubbed maps. All inventory items get reduced to one, à la Heretic. Add "keepfullinventory" to the MAPINFO entry to prevent this behvaior.

Reference: [wiki]MAPINFO[/wiki]
User avatar
Tormentor667
Posts: 13556
Joined: Wed Jul 16, 2003 3:52 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia (Modern GZDoom)
Location: Germany
Contact:

Re: Item = 1 when changing the map?

Post by Tormentor667 »

Thx Zippy :) That does the job :)
User avatar
printz
Posts: 2649
Joined: Thu Oct 26, 2006 12:08 pm
Location: Bucharest, Romania
Contact:

Re: Item = 1 when changing the map?

Post by printz »

Zippy wrote:That's just the default map behavior for non-hubbed maps.
You know what's funny? Maps from different hubs each are non-hubbed to each-other, right? But in Hexen that setting-to-one behaviour doesn't happen; you stay with all items except the Wings, making the game quite easy on skills less than 5.
User avatar
Project Shadowcat
Posts: 9369
Joined: Thu Jul 14, 2005 8:33 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: Blacksburg, SC USA
Contact:

Re: Item = 1 when changing the map?

Post by Project Shadowcat »

printz wrote:
Zippy wrote:That's just the default map behavior for non-hubbed maps.
You know what's funny? Maps from different hubs each are non-hubbed to each-other, right? But in Hexen that setting-to-one behaviour doesn't happen; you stay with all items except the Wings, making the game quite easy on skills less than 5.
This is probably switched on for when you are playing stock Hexen.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Item = 1 when changing the map?

Post by Graf Zahl »

When playing hubs the items are never reduced to 1, even if you change hubs. When this was implemented it was done in the most minimalistic way possible to make Hexen work.
User avatar
Zippy
Posts: 3302
Joined: Wed Mar 23, 2005 5:31 pm
Location: New Jersey

Re: Item = 1 when changing the map?

Post by Zippy »

printz wrote:Maps from different hubs each are non-hubbed to each-other, right?
Conceptually speaking, yes, but that isn't how I meant it. I basically meant non-hubbed as a set of maps that doesn't use hubs.
Locked

Return to “Editing (Archive)”