+1
Answered

How to use this tool as addition to normal scripting? Or/And how to Game Creator in a more modular way?

Anon 3 months ago in Game Creator updated by Marti (Lead Developer) 3 months ago 4

I find this tool very useful and it can make many things easier.

But for some things that are more specific I want to use classic scripts.

If I have for example a Characters that all have the same logic applied to them, with maybe a few little changes defined through variables. -> From how I understand Game Creator I would have to add copies of the same Game Creator Objects to all of them and make these changes to them directly. For example they could be lumberjacks that search for wood and destroy trees some with more strength and some with less. I would have to copy the lumberjack logic to all of them and change how strong they are per lumberjack.


 If I then had to change something for all of them like only destroying full grown trees I would have to change this for every single one of them. Is there a way around this?

My solution would be to write a little script that handles all this and when I need to change something I simply change the script and because every lumberjack uses the lumberjack script it changes every lumberjack.

If I want to use both Scripting and Game Creator there will be cases where I want to call a script from Game Creator and cases where I want to store a return of a script in Game Creator. I know that there is a Action called CallMethods but I can not get it to work. I saw this thread https://support.gamecreator.io/communities/1/topics/261-how-to-use-call-method and followed your directions, but my method is not shown in the list. There are dozens of methods in 18 categories but not my methods of the script. Do I need to do something special so they are shown? And is there something like this to retrieve return values?

Thank you in advance. :)

Unity version:
2019.4.0f1
Game Creator version:
1.1.9
GOOD, I'M SATISFIED
Satisfaction mark by Anon 3 months ago

Okay the call Method things seems to have resolved itself. It just worked today. But my main question still stands. I may now know a way, but would this the best practice?

+1

We started using Game Creator in our commercial training games to supplement our own code. As GC is basically a drag, drop, configure of code snippets and functions, it works perfectly along side any other code.

We also used Call Method a lot. There is nothing that speaks against this. However, as GC is an Event driven framework and provides many performance advantages through this, when writing you own code, it is best practice to also be event driven and avoid the Update Cycle where possible.

We now create our own Actions for things we need to do that GC does not provide, this keeps everything uniform and at least for us, it is best practice.

Thank you very much! :)

Answered

I'm also looking to add reflection methods to Game Creator's core set of Actions so calling third-party actions is easier, but it's not high on the priority list.