Calling objects via a string input? Is it possible?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • This may be the best idea I've ever had for my game engine for debugging purposes but I doubt if it can be done.

    I have a little text box which allows me to enter commands to help me debug my game. Certain words will trigger loops which write log files showing object values and other words show hidden objects which list values in my objects so I can see what is happening when things go wrong.

    Is it possible to add a function where I can change these values using this method?

    EXAMPLE: (if i typed...)
    set ActiveObject13 H 13

    Could I then - Store the value 13 in alterable value H in ActiveObject13 during the runtime?

    This would allow me to test all kinds of things live in the game.

    I'm thinking I could run a loop called [set-value] if my text box starts with set. Then strip two strings and an integer from words 2, 3 and 4 to store the relevant values in the relevant object but I doubt there's a way to write to a value in this way??

  • It is possible, but requires some extra work like putting all Objects in a qualifier and reserving one alterable string for the objectname, since Fusion cannot retrieve objectnames. At least that's how I accomplished it. I made an example as I found it hard explaining it, and I sort of figured out how to do it on the fly while making it.

    The format is almost as you put it, but I added Value / String to separate the two.


    Set Value Active_1 C =42
    Set String Active_2 G =What a lovely day!


    Keep in mind that Active_1 is reffering to an object's Alterable String A, and not the actual objectname.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!