dop2000's Forum Posts

  • You can use JS to check if an animation exists:

    console.log(runtime.objects.Sprite.getFirstInstance().getAnimation("a3")!=null);

    Another method is to try to play the new animation, and then check if it has changed or not. But it's messy and may not be suitable in some situations.

  • I tested with Xbox Bluetooth and an old Logitech wired controller.

  • I tested with two controllers and both characters are working fine. The movement of the bow on the right character is messed up, but it can still move and jump.

  • It's for any created instances - create by type, name, spawn.

    You can use "Wait 0" to wait to the end of the tick.

    You can pick newly created instances sooner than just the end of a tick. The next top level event is enough.

    Somehow this rarely works for me.. Logically speaking, a function is another top-level event, right? And yet if you call it after "create" action, it doesn't know about the newly created instance. I guess the first event should finish for the new instance to be available in other events, but this is not how I prefer to build my code.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Use "Wait 0.5*loopindex"

  • That's how Construct works - you have to wait until the end of the tick to pick newly created instances. Exceptions are: On Created trigger, Pick Last Created, Pick by UID

  • The file you shared has no download permission.

  • Looks like "On collision" is triggered separately for each instance.

    You can use "Is overlapping" instead, and "Pick nearest" as a second condition.

    Or try removing "for each" from the code on your screenshot.

  • You do not have permission to view this post

  • You can add a sub-event immediately after "Create by name" and use "System pick last created family" condition. There you will be able to change the properties of the created instance.

  • You do not have permission to view this post

  • mikeadamski26 Dictionaries are used when you need to store a lot of data, say, an entire dialogue or inventory system in the game. It may also be useful when you need to access the data dynamically, for example, to get a specific dialogue line for NPC_Name&"_greeting", where NPC_Name is a variable.

    If you just need to store two strings of text, a dictionary would be an overkill. You can use two global variables (GoodMessage and ExcellentMessage). Or local variables inside the event where you display the text. Or even hard-code the text in the "Set text" action, which is not a good programming practice, but definitely the easiest way to do this.

  • You do not have permission to view this post

  • You do not have permission to view this post

  • So you did mean instance variables! Is there a reason why you store those texts in instance variables on the dictionary object, and not in the dictionary itself?

    If you need to access instance variable value, just use Dictionary.Good or Dictionary.Excellent