Welcome to the Game Creator support forum! 

This a place to ask questions, discuss ideas and report bugs. Please, provide your Unity and Game Creator versions as well as clear reproduction steps when opening a topic and full console logs.

Searching answer

Attribute UI not updating when using global variable

Sander 2 months ago in Stats updated by Marti (Lead Developer) 2 months ago 3

I've made a simple UI with the stats of the enemy my mouse is hovering over. When using target game object and dragging the object in, the stats work. However, when using global variables, it doesn't. I have a global variable with the game object that was selected. 


Character instantiates with a 0 Attribute value

Crispy 2 months ago in Stats updated by Marti (Lead Developer) 2 months ago 1

After killing a zombie, any further zombies that spawn will spawn in with 0 health.


The Actions I'm using for decreasing health:

Marti (Lead Developer) 2 months ago

This is probably because the Stats automatically saves the state of the prefab of ZombieFemale when it is destroyed. Instantiating new ones reloads the previous state, which was 0 at the moment, because all prefabs and prefab instances share the same ID.

We'll be adding a "Save" checkbox under the Stats component on the next update that you should untick. This will disable saving and loading the previous State values.


update Stats not updating Attribute UI

Alienmadness 3 months ago in Stats updated by Marti (Lead Developer) 3 months ago 7

i just updated the stats to the newest version.  after doing so, i had to go through and fix a few things.. 

i have an HP UI and when the stats value HP goes down, i can see the change in the player component, but the Attribute UI is not updating.

here is example of the UI component

Here is an example of the Stats component (in process)

Marti (Lead Developer) 3 months ago

Aha! Sorry I didn't see this in the first message you posted. In the Attribute UI component, you have the Smooth Transition Up and Smooth Transition down properties set to true. This means that Game Creator will try to progressively move the health bar from its current value to the next.

However, you have also a Transition Delay of 0.2. This means that the bar won't change until there's a window of 0.2 seconds where the attribute hasn't changed its values.

You can set the Transition Delay to 0.0 or uncheck the Smooth Transition Up/Down properties and it should work fine.


A bag slots modifier stat

SubtleTechnology 5 months ago in Stats updated by Marti (Lead Developer) 5 months ago 1

What is the best way to limit the number of inventory slots based on a Stat like "bagslots" that will be increased and decreased by equipped items? 

I already have the stat in place and equipping/removing the item changes the stat. What would be the best place to implement something that limits the maximum number of item slots they have based on that stat?  For instance if the stat is 10, they can only pickup 10 items.

For simplicity I would just not allow them to remove the item that changes the stat so I don't have to deal with forcing them to drop items etc. Maybe not even let them unequip it.

Marti (Lead Developer) 5 months ago

I'm afraid that's not possible at the moment. The amount of a stack of items in your inventory is a constant value.