Help With Score System Needed

Hello.

 

I'm trying to work on a DECORATE-based score system for a Doom mod I'm working on, and I need help with it.

 

Here's the base code:

ACTOR ScoreBase : Inventory
{
  +NOGRAVITY
  -INVENTORY.INVBAR
  Inventory.MaxAmount 100000000
  Inventory.Icon "JEWLA0"
	States
	{
	Spawn:
		JEWL A -1
		Stop
	}
}

Here's how I want this to work:

When the player picks up an item that has its traits inherited from ScoreBase, an InventoryItem counter will appear, showing the "score".

When I try this out, though, the item can never be picked up, and when I try to tinker with the code, the item can be picked up once, but the counter will never appear and the item can't be picked up again.

Here's the code for one of the score items:

actor Cross : ScoreBase
{
	Inventory.PickupMessage "Cross"
	inventory.pickupsound "wolfenstein/cross"
	states
	{
		Spawn:
			CROS A -1
			stop
		Pickup:
			TNT1 A 0 A_GiveInventory("ScoreBase",100)
			Stop
	}
}

I'm not willing to try out ACS, as that's something that I'll probably never get the hang of. Same with ZScript, as I'm pretty much still living in the days of DECORATE (That should be my custom title if I ever get one).

Any help here?

Share this post


Link to post

I think that -INVENTORY.INVBAR is causing the score not to show, unless I misunderstand what you are trying to do. I think you do want it to show, to show your score, so turn that - into a +.

 

Try inheriting from CustomInventory instead of Inventory.

 

About ACS, I also avoided it for quite a while, but I use it a lot now. Don't be afraid. If you're smart enough to learn DECORATE, you can learn ACS, too.

1 person likes this

Share this post


Link to post

Last I tried DECORATE it only allows max 999 pickups of an item type, you should use global arrays and give each player his own score that can be carried between levels via ACS, It's not difficult to learn.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now