0
Answered

What is the best way to play an effect on location?

Andi Rutz 6 months ago in Game Creator updated by Marti (Lead Developer) 6 months ago 1

What is the best way to play an effect on location? Say particles when opening a chest. I'm trying to instantiate prefabed FXs but they seem to activate on player enter radius rather than the selected key down trigger.

Unity version:
Game Creator version:

Answer

Answer
Answered

The "On Key Down" Trigger doesn't have a target object. These events fire as soon as the user presses the key, without the need to facing, being near or aiming at a specific object.

If you want to instantiate a particle effect on a particular object when you press a certain key, you can use the Instantiate Action, but instead of using the "Invoker" as the position, select the "Game Object" option and drag where you want the particle effect to be spawned.

You might also be interested in interacting with an object when the Player is near it and presses a key. This can be achieved using the "On Player Enter Key". This Trigger will react when the Player is within the radius of the current object's Collider and the user presses a given key.

Answer
Answered

The "On Key Down" Trigger doesn't have a target object. These events fire as soon as the user presses the key, without the need to facing, being near or aiming at a specific object.

If you want to instantiate a particle effect on a particular object when you press a certain key, you can use the Instantiate Action, but instead of using the "Invoker" as the position, select the "Game Object" option and drag where you want the particle effect to be spawned.

You might also be interested in interacting with an object when the Player is near it and presses a key. This can be achieved using the "On Player Enter Key". This Trigger will react when the Player is within the radius of the current object's Collider and the user presses a given key.