Pickup Bug
Moderator: Graf Zahl
- Boingo the Clown
- Posts: 102
- Joined: Sat Dec 03, 2005 17:40
- Location: North of New York, West of Montreal, East of Toronto, and South of Hell
- Contact:
Pickup Bug
I was play testing DeiMWolf, and I noticed this peculiar bug with the treasure pickups I had created.
All pickups work fine when first starting the game, but after the game has been playing a while, some of the pickups quit working. That is to say, they no longer disappear when run over, and they can no longer count towards the items found count.
AFADooMer was kind enough to let me try the beta version of his Wolf3D project, and I found the same thing while tryin it out. The problem was even more pronounced, due to the fact his mod awards points. When the treasures stopped being picked up, they still continued to give points. I rolled the score counter over multiple times during my test run.
Since this happens with both mods, I have decided that it must be a bug within GZDooM itself, rather than a mistake in the mods.
All pickups work fine when first starting the game, but after the game has been playing a while, some of the pickups quit working. That is to say, they no longer disappear when run over, and they can no longer count towards the items found count.
AFADooMer was kind enough to let me try the beta version of his Wolf3D project, and I found the same thing while tryin it out. The problem was even more pronounced, due to the fact his mod awards points. When the treasures stopped being picked up, they still continued to give points. I rolled the score counter over multiple times during my test run.
Since this happens with both mods, I have decided that it must be a bug within GZDooM itself, rather than a mistake in the mods.
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
-
- Posts: 43
- Joined: Fri Sep 02, 2005 3:23
Re: Pickup Bug
Which map/location? I've played through a good chunk in one sitting and never had problems.Boingo the Clown wrote: AFADooMer was kind enough to let me try the beta version of his Wolf3D project, and I found the same thing while tryin it out. The problem was even more pronounced, due to the fact his mod awards points. When the treasures stopped being picked up, they still continued to give points. I rolled the score counter over multiple times during my test run.
[edit] OK, I think I've found the problem...
In the case of my treasure code, the pickup script gets run even though you've reached the max pickup amount... But the item doesn't disappear, so it gets run continuously.
Example:
Code: Select all
ACTOR Cross : CustomInventory 21052
{
+COUNTITEM
+AUTOACTIVATE
Inventory.DefMaxAmount
Inventory.PickupSound "pickups/cross"
Inventory.PickupMessage "Cross"
States
{
Spawn:
TREA A -1
Loop
Pickup:
TREA A 0 ACS_ExecuteAlways(700, 0, 100)
Stop
}
}
On a possibly related note, this script causes a crash (see attached):
Code: Select all
ACTOR BlueKey : CustomInventory 21044
{
+AUTOACTIVATE
Inventory.Amount 1
Inventory.PickupSound "pickups/key"
Inventory.PickupMessage "Blue Key"
States
{
Spawn:
KEYS B -1
Loop
Pickup:
KEYS B 0 A_GiveInventory("BlueCard", 1)
}
}
Last edited by AFADoomer on Sat Jan 14, 2006 19:59, edited 1 time in total.
- Boingo the Clown
- Posts: 102
- Joined: Sat Dec 03, 2005 17:40
- Location: North of New York, West of Montreal, East of Toronto, and South of Hell
- Contact:
Here is an example of one of my treasures. The others are the same, except for the sprites.
If what AFADooMer is true, and it is from reaching a preset maxium, is it possible to increase this maximum, or perhaps to reset the amounts to 0 at the beginning of each level?ACTOR Chalice1 : Inventory 6082
{
+COUNTITEM
+AUTOACTIVATE
Inventory.DefMaxAmount
Inventory.PickupSound "CHALICE"
Inventory.PickupMessage "Picked up a Chalice"
scale 0.16
States
{
Spawn:
PTN2 A -1
Loop
}
}
- TheDarkArchon
- Posts: 1000
- Joined: Wed Jul 06, 2005 11:58
- Location: What's that fucking smell
- Contact:
AFADoomer:
You forgot to stop the pickup state.
Boingo: He's correct. The predefined maximum is 25, IIRC. To increase this, use "Inventory.MaxAmount (number)" instead of "Inventory.DefMaxAmount".
Code: Select all
ACTOR BlueKey : CustomInventory 21044
{
+AUTOACTIVATE
Inventory.Amount 1
Inventory.PickupSound "pickups/key"
Inventory.PickupMessage "Blue Key"
States
{
Spawn:
KEYS B -1
Loop
Pickup:
KEYS B 0 A_GiveInventory("BlueCard", 1)
Stop
}
}
Boingo: He's correct. The predefined maximum is 25, IIRC. To increase this, use "Inventory.MaxAmount (number)" instead of "Inventory.DefMaxAmount".
- Boingo the Clown
- Posts: 102
- Joined: Sat Dec 03, 2005 17:40
- Location: North of New York, West of Montreal, East of Toronto, and South of Hell
- Contact:
-
- Posts: 43
- Joined: Fri Sep 02, 2005 3:23
Ah. Thanks.
For the Pickup state, the final 'Stop' needs to be 'Fail' in order to stop the infinite-pickup problem on all of these.
So this is our bug, not a bug in GZDoom.
Is there any way to have an item allowed to be picked up an infinite number of times, other than setting the max amount to a huge number?
i.e.
Inventory.MaxAmount 4096
For the Pickup state, the final 'Stop' needs to be 'Fail' in order to stop the infinite-pickup problem on all of these.
So this is our bug, not a bug in GZDoom.
Is there any way to have an item allowed to be picked up an infinite number of times, other than setting the max amount to a huge number?
i.e.
Inventory.MaxAmount 4096
- Boingo the Clown
- Posts: 102
- Joined: Sat Dec 03, 2005 17:40
- Location: North of New York, West of Montreal, East of Toronto, and South of Hell
- Contact:
I changed my decorate lump from
Sorry for the false alarm.
toACTOR Chalice1 : Inventory 6082
{
+COUNTITEM
+AUTOACTIVATE
Inventory.DefMaxAmount
Inventory.PickupSound "CHALICE"
Inventory.PickupMessage "Picked up a Chalice"
scale 0.16
States
{
Spawn:
PTN2 A -1
Loop
}
}
That appears to have fixed the problem.ACTOR Chalice1 : Inventory 6082
{
+COUNTITEM
+AUTOACTIVATE
Inventory.Amount 0
Inventory.PickupSound "CHALICE"
Inventory.PickupMessage "Picked up a Chalice"
scale 0.16
States
{
Spawn:
PTN2 A -1
Loop
}
}
Sorry for the false alarm.
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact: