0
Answered

Can I use Formulas in some actions?

赵西瓜 1 month ago in Stats updated by Marti (Lead Developer) 3 weeks ago 3

For example:wait (Formulas ) second

Unity version:
Game Creator version:

Answer

Answer
Answered

Unfortunately, that's not possible. However, you can use the Math Variable action, which works very similarly to the Formulas. Then, all you have to do is use a Local Variable to store the result of your operation and use a Wait action with that Local Variable.

You may need to use this action: https://hub.gamecreator.io/content/item/q5PnfMTZPj6TyluCS2Uz, which lets you wait for a certain amount of time based on a variable's value.

Cheers!

Answer
Answered

Unfortunately, that's not possible. However, you can use the Math Variable action, which works very similarly to the Formulas. Then, all you have to do is use a Local Variable to store the result of your operation and use a Wait action with that Local Variable.

You may need to use this action: https://hub.gamecreator.io/content/item/q5PnfMTZPj6TyluCS2Uz, which lets you wait for a certain amount of time based on a variable's value.

Cheers!

+1

I agree there should be a possibility to use a variable so you could then do a random wait or get info from another game object as we have an action variable random but cannot use this in wait.


Game creator needs to be more constant and reliable in getting and setting stuff as this is not the only action where things are missing.

I should not have to grab stuff from the hub which should already be available in GC. The basics need to be in GC and the hub for more intermediate and specialized stuff.


I am sure it will get better over time. At this moment in time I use Playmaker and game creator together but I look forward to the day when I no longer need PM and just can use GC.

This is a good point and it's something I have in my Nice-to-have list for Game Creator 2.0. I've done some tests and I'll most likely be able to add this option. This will only be possible, however, when Unity's Polymorphic Serialization is stable (which isn't now, since it's a brand new feature).

Regarding Game Creator substituting Playmaker/Bolt, I believe GC should instead try to coexist with these two visual scripting tools: GC is all about making this easier and pack a bunch of complex mechanics into simple "drag and drop" objects. The Actions system is very powerful, but also has its limits.

I believe that Game Creator would benefit a lot from allowing to build most games, but for those mechanics that are unique to your game, you can use Playmaker/Bolt to tailor them to your needs (if you don't know how to code).