Page 1 of 1

Pickup Error

Posted: Fri Jul 07, 2006 18:26
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

Posted: Fri Jul 07, 2006 21:20
by Graf Zahl

Posted: Sat Jul 08, 2006 0:16
by Boingo the Clown
Okay.

How do I fix it?

Posted: Sat Jul 08, 2006 0:35
by Graf Zahl
Replace 'Inventory' with 'CustomInventory' in the definition.

Posted: Sat Jul 08, 2006 0:35
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.

Posted: Sat Jul 08, 2006 1:52
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.

Posted: Sat Jul 08, 2006 3:14
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
	}
}

Posted: Sat Jul 08, 2006 5:31
by Boingo the Clown
Thanks.

That's got it working now.

:)