Magistross's Forum Posts

  • Why was it a mess ? It seemed like a good idea. I tried it and doesn't look messy to me, maybe I just don't understand what you expect. <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">

    https://www.dropbox.com/s/ajhrcaggbdlv6 ... .capx?dl=0

  • You need to pay attention to the expression and action you are using when dealing with tiles JSON. Objects have a common expression "AsJSON" that saves their entire state in a JSON string, and a common action "Set from JSON" to load their state from such a string. However, the tilemap have specific expression / action to save / load only its tile data, namely "TilesJSON" and "Load". You should be using "TileJSON" with "Load", or "AsJSON" with "Set from JSON", not a mix of both set.

    Or maybe your problem is something else entirely, but we lack information to really help you.

  • You are looking for System's "Create object" and not the Sprite's "Spawn object". "Spawn object" means that the sprites in the SOL will each spawn the selected object. "Create object" will create a single instance.

    However, for hotswapping between characters like this... it might be better to use a single object with multiple animations.

  • The "Key" is your variable name, and a variable name is a string. Are you trying to affect the variable "Upgrade_X", where "X" is a variable number ? Then you would need to set the Key "Upgrade_" & obj_button.var_upgradetoadd to 1.

  • Hmm, the demo was done with a previous version of the plugin. The internals changed a bit in the current one, and to get it working like the live version, you have to set the "asynchronous" property of the behavior to "no". The red sprites were being created and deleted in the same tick, so they wouldn't ever show.

  • ilyaTyl You most likely copied the files in the "plugins" folder. Simply move them to the "behaviors" folder and it should work.

  • Without tabIndex the elements tab in their order of appearance in the DOM. Turns out they are created in the reverse order as their "z-index" (the one in the front, or the last in the list, will be the first element to be tabbed to). It's still much easier to use a behavior to directly set a tabIndex and not rely on automatic ordering.

  • This might get you started.

    https://www.dropbox.com/s/jfoziaize62v8 ... .capx?dl=0

  • Yeah, too bad it's not a vanilla functionality. It's such a small thing that unfortunely I guess it was completely forgotten. Glad I could help you!

  • Well, I can't know for sure... but if the tilemap changes or if obstacles are added on the fly a lot, I guess the system might have some hiccups.

    Maybe updating the core JS file would help... the plugin is kind of outdated.

  • It's important that if an instance fails to find a path, that all its movement related events/behaviors be stopped or cancelled. The "no path found" trigger should allow you to do that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That would be the "tabIndex" property of form elements, however, the plugins don't expose it unfortunately.

    You can easily expose it through a behavior though. Add this behavior I cooked in a hurry to your form elements and set the property "TabIndex" to a value from 1 to n and you should be good.

    https://www.dropbox.com/s/d0hxdh5r426zi ... x.zip?dl=0

  • Just did a bit of digging into the source code. Turns out there's this property "syncEnabled" that changes the behavior of how the callback is wrapped. If it's set to TRUE, the callback is executed synchronously, if not, it's in a setTimeout. By default it's set to FALSE and I did not expose this property at runtime... BUT, I did expose it as a behavior property under the name of "asynchronous". If you set it to "no", do some "Find path" calls, and then do a "Force paths calculations", the paths should be available immediately thereafter. Even the trigger will be executed before the rest of the actions.

  • Hard to tell, it's been a while since I looked at the code of EasyStarJS. Did you try to use a wait for signal along with the "on path found" trigger ? It might simulate a synchronous flow of events.

  • That's what he's trying to do. His array contains multiples arrays stored as JSON. The problem is getting the correct inline string that the expression editor will understand. My pastebin is the proper way to do it. You can load a first array with the litteral string, then load a second array doing something like "Load from JSON string FirstArray.At(2,1)"