+1
Answered

Basic help with triggers, open a chest tutorial

Gerald Christie 4 months ago in Game Creator updated by Marti (Lead Developer) 4 months ago 4

Just purchased GC and am having some trouble following basic tutorials. I was trying to replicate the open a chest video tutorial with my own assets, but cannot get the trigger to respond to any input, mouse, keyboard, or gamepad. As far as I can tell, things are set up the same as in the video.

My player was created by creating a player GC object, then dragging my model onto it. Nothing else about it has changed.

My chest is a 2 piece object, base and lid, and has one animation Open. It has one trigger parameter Open which has a transition from Any State. 

The trigger in the scene is on the chest, and is large enough to intersect with the player when he gets close. I have tried with left mouse click interaction, and with on key down. The chest doesn't animate and the debug message doesn't show up, which makes me thing the trigger is never getting triggered at all.

While I am looking for some help on this specific issue, I would also like some clarification about trigger requirements in general as the documentation is fairly bare bones. For example, how does a trigger know when a character is within its radius? Is it a collider overlap? Does the player need a rigidbody? Does it use raycasting? Some explanation of the underlying mechanics would be helpful for many of the core systems.

Unity version:
2018.4.17
Game Creator version:
1.1.5

Answer

+1
Answer

Solved. I was using On Key Pressed instead of On Player Enter Key. I would suggest that any action which has player input at its core should be in the input category, since it was not at all evident that this trigger type would exist somewhere else.

GOOD, I'M SATISFIED
Satisfaction mark by Gerald Christie 4 months ago

I was able to get this working by deleting my trigger and recreating it, however now if I set the trigger to key down, the trigger activates no matter where I am in proximity to the object. Looking through the conditions don't see an obvious way to check how far the player is from a trigger.

+1
Answer

Solved. I was using On Key Pressed instead of On Player Enter Key. I would suggest that any action which has player input at its core should be in the input category, since it was not at all evident that this trigger type would exist somewhere else.

+1

Well done. I am makeing a video tomorrow to show this

Answered

Noted. We'll revise the order and categories for both Actions and Conditions. It has grown by a lot and categories are not that well balanced.