Magistross's Forum Posts

  • It's probably easier to only alter their visibility instead of creating and deleting objects. Here, I modified the capx to demonstrate this new approach.

    https://dl.dropboxusercontent.com/u/700 ... earts.capx

  • bclikesyou That's actually the proper way to do it. The DIALOGUE_POSITIONX and DIALOGUE_POSITIONY are local variables used when creating a new dialogue. Setting them as static is only half the solution, you still have to move the current window/spritefont/portrait. Take note that the variables won't revert to their original values, so you might want to add new variables to store default values and a function to revert to them.

  • There is a "vanilla" way to do it, but it's rather silly. You create a sprite with multiple "placeholder" animation frames. Each instance of the sprite use a particular animation frame, so when you load from URL, it only seems to change a single sprite.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There is no magic formula to this. The scaling must be done on the layer axis and not the sprite's. Only way to achieve this right now is to use an intermediate object (paster/canvas) that will contain the rotated sprite.

    See this thread for an example :

  • Especially like the trick to only work on tiles in the viewport to save on resources, brilliant example!!

    Yep, save CPU time whenever you can! Only one little cave-eat though is that if the screen is scrolling faster than the tilemap "animation speed", you'll end up with tiles that seem to "lag" behind. You can negate the problem by expanding the for loops so it process one or two more rows/columns of tiles around the viewport.

  • You can actually animate tiles themselves, but you need to get creative. Basically, you should ensure that all animated tile sprites are consecutive in the spritesheet, and then, using a for loop, you iterate through all visible tiles and normalize tile IDs that refer to animated tile to the tile ID they should actually show.

    Here's a small example.

    https://dl.dropboxusercontent.com/u/700 ... lemap.capx

  • Awesome as always! Keep those dev logs coming!

  • That's pretty neat Good job on sucessfully turning my dialogue system in a full fledged cutscene scripting language.

  • Hey smallrobot, thanks for your kind words!

    It's quite feasible, the "text command" functionality is entirely customizable. You could create a "callfunction" command that accept at least one parameter (a callback function name) and optional parameters to be passed to the callback. Or you could also create a dedicated command called "MoveNPC" that accepts parameters to customize what NPC should move and how it should move.

    To create new commands you simply have to add more events under the "Dialogue_ProcessCommand" function event in the "Text commands" group.

    Let me know if you need further help!

  • Your dungeon generation routine should keep tracks of positions that are candidate to receive additional objects. Once generation is done, pick a random position in the list of candidates and create your sprite on it.

  • Pushing a value in multidimensional arrays will always create more than one new cell. It'll create a new row/column in a 2D array, and an entirely new plane in a 3D array. The axis you choose will decide how the array is expanded... but the value you push will be duplicated in the row/column/plane thus created. What I usually do in this case is push a 0 (or blank if a string array) value on the wanted axis, and then use a "Set value at" at the cell I want to adjust.

  • Point 1 is irrelevant. For a 0.5 second wait to become 2.0 seconds, the game will be lagging to hell. And no matter what kind of method is in place to schedule events, everything will be a complete mess.

    All others points become moot using the example I provided.

    However, I am also an advocate of the "no wait action" philosophy. Timers are incredibly more versatile and easier to manage. They are basically deferred functions that use instance variables as parameter.

  • "Wait" action and function parameters don't mix that well as you figured, and local variables don't do better for that matter. And that's a shame, because it would allow us to do some kind of "closure" where variables have their own scope. However, the SOL is saved even after a wait action. Knowing this you can create a temporary object that will be used to store all variables for the duration of all functions.

    Here's a quick exemple : https://dl.dropboxusercontent.com/u/700 ... osure.capx

  • It depends a lot on the scope of your system. Will it be used generically for a variable amount of entities or will it be more static ? If it's static, go ahead with arrays and vars. Otherwise, it'll be easier to propagate the arguments function to function.

  • Deferring function calls isn't really done that way. You would probably be better off using callback functions than return values. By the time line 4 of your second screenshot gets evaluated, the function isn't over, and it won't wait to evaluate, so "ReturnValue" will evaluate to "" (or the last returned value). Instead of line < Set return value to "Return" > in your last screenshot, call another function, like "eAni_DummyAttackFinished". This particular function will signal that the animation is done, and you can continue with the rest of your logic.