0
Answered

I already have a Player but Game Creator does not recognize it

Cookie Halo 1 month ago in Game Creator updated 4 weeks ago 2

Hey guys!
I had already started a project, when I was introduced to Game Creator.
My Player model, controls, etc. are all set up exactly how I want them.
I would like to continue to use my settings, but Game Creator's triggers and functions cannot recognize me as "Player".
This leads to other issues, like "On key press...", etc.
Could you please help me out? How can I define my current Player as a Game Creator Player, without adding the Game Creator player scripts?
When I merge the GC scripts with my current player, it becomes a total mess.

Unity version:
latest
Game Creator version:
latest

Answer

Answer
Answered

Hi Cookie;


All you need to do is add a special component called HookPlayer to your "Player" object. This will tell Game Creator that this particular object should be identified as the Player.


However, bear in mind that you won't be able to use most features related to Game Creator's character system, obviously; such as using States, Gestures, moving the character using the Move Character To Action, etc...


The rest should work fine. Cheers! 

GOOD, I'M SATISFIED

Great! It worked like a charm! Thank you so much.
Unfortunately, one issue is still not resolved - The condition if a key is being pressed.
I have a config file, where players can change their key bindings from the UI, which could possibly cause the issue.
When I have a trigger, that has a condition "if a key is pressed, then ...." it takes 50 key presses until it actually works.
Is there any way I can make this work? It's really essential for my project and use of GC.
Thanks again for the great support!

Satisfaction mark by Cookie Halo 4 weeks ago
Answer
Answered

Hi Cookie;


All you need to do is add a special component called HookPlayer to your "Player" object. This will tell Game Creator that this particular object should be identified as the Player.


However, bear in mind that you won't be able to use most features related to Game Creator's character system, obviously; such as using States, Gestures, moving the character using the Move Character To Action, etc...


The rest should work fine. Cheers! 

Great! It worked like a charm! Thank you so much.
Unfortunately, one issue is still not resolved - The condition if a key is being pressed.
I have a config file, where players can change their key bindings from the UI, which could possibly cause the issue.
When I have a trigger, that has a condition "if a key is pressed, then ...." it takes 50 key presses until it actually works.
Is there any way I can make this work? It's really essential for my project and use of GC.
Thanks again for the great support!