Pickup Error

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
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 Error

Post by Boingo the Clown »

A week or two ago, I updated my copy of GZDooM to the latest version, but now I am having trouble with one of the items on the DECORATE lump.

The script in DECORATE looks like this:
ACTOR WolfKeyG : Inventory 7006
{
+AUTOACTIVATE
Inventory.Amount 0
Inventory.PickupSound "KEY"
Inventory.PickupMessage "Gold Key"
scale 0.125
States
{
Spawn:
GKEY A -1
Loop
Pickup:
GKEY A 0 A_GiveInventory("YellowCard", 1)
}
}
It worked with the earlier version of GZDooM, but with the current version I get the following error:
Script error, "DECORATE" line 80:
Unknown state label Pickup
Is this a new bug, or is there a problem with my DECORATE?

If the latter, could someone please suggest an alternative?

--Merci
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

User avatar
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:

Post by Boingo the Clown »

Okay.

How do I fix it?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Replace 'Inventory' with 'CustomInventory' in the definition.
User avatar
Paul
DRD Team Admin (Inactive)
Posts: 1058
Joined: Thu Jun 30, 2005 13:30
Location: Poland - Grojec / Radom
Contact:

Post by Paul »

ACTOR WolfKeyG : Inventory 7006
{
+AUTOACTIVATE
Inventory.Amount 0
Inventory.PickupSound "KEY"
Inventory.PickupMessage "Gold Key"
Solution:
ACTOR WolfKeyG : CustomInventory 7006
{
+AUTOACTIVATE
Inventory.Amount 0
Inventory.PickupSound "KEY"
Inventory.PickupMessage "Gold Key"
EDIT: Damn, beaten by Graf.
User avatar
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:

Post by Boingo the Clown »

I've still got trouble.

I switch the code to:
ACTOR WolfKeyG : CustomInventory 7006
{
+AUTOACTIVATE
Inventory.Amount 0
Inventory.PickupSound "KEY"
Inventory.PickupMessage "Gold Key"
scale 0.125
States
{
Spawn:
GKEY A -1
Loop
Pickup:
GKEY A 0 A_GiveInventory("YellowCard", 1)
}
}
The game no longer quits during startup.

Now it just crashes when I pick up the key.
AFADoomer
Posts: 43
Joined: Fri Sep 02, 2005 3:23

Post by AFADoomer »

You're missing a 'Stop' in the Pickup state. This works...

Code: Select all

ACTOR YellowKey : CustomInventory 21043
{
	+AUTOACTIVATE
	Inventory.Amount 1
	Inventory.MaxAmount 0
	Inventory.PickupSound "pickups/key"
	Inventory.PickupMessage "Yellow Key"
	States
	{
	Spawn:
		KEYS A -1
		Loop
	Pickup:
		KEYS A 0 A_GiveInventory("YellowCard", 1)
		Stop
	}
}
User avatar
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:

Post by Boingo the Clown »

Thanks.

That's got it working now.

:)
Locked

Return to “GZDoom”