justifun's Forum Posts

  • Create a copy of the sword (trailsword) and give it the fade behavior and set it to like 0.1 seconds to fade out

    while dragging

    every 0.1 seconds -> create object trailswrod at sword.x sword.y

    set angle of trailsword to sword.angle

    now while you drag the sword around, it will create copies of the sword 0.1 seconds behind the position of it. resulting in a dynamic trail effect.

  • its a system event, look for it near the bottom

    subtract 1 from the players "cooldown" variable.

  • GIve your player 2 variables "ammo" and "cooldown"

    when the player spawns, or picks up ammo, set his "ammo" variable to whatever you want.

    set to starting value of the cooldown to "2" lets say.

    event(3 conditions)

    keyboard "on button press "space"

    cooldown = 0

    ammo > 0

    action

    create bullet at player.x, player.y

    set cooldown to 2

    event

    every 1 seconds -> player.cooldown -1

    This the player can only shoot if the cooldown reaches 0 and has more than 0 ammo

  • use the tilemap object, and add multiple tilemaps if needs be.

  • Make the shape out of invisible sprites, and set them up in the design that you want.

    Give each one an index number eg: 1 2 3 4 5 etc

    If they move their finger over the invisible design in the order that the sprites are setup, then they match it.

    if they go from 1 to 3 to 7, then they have messed up.

    like invisible "connect the dots"

  • make a shadow object, or an invisible box that acts like a "plate" for your character to stand on. Give that the 8-dir movement.

    Then pin the player sprite to that shadow, and as the other person said, make the "jump" an animation moving away from the ground origin point. So it looks like he's jumping, but he actually isnt.

    He will be able to collide with objects that define the area of gameplay by giving them each a solid behavior.

  • One solution ( and its probably not the cleanest) - is to great a single layout that you can reuse in any game you make in the future.

    Create 4 events to handle the pressing of the start button for each game pad

    eg:

    if gamepad 0 presses start - call function "spawn player" "0"

    player.owner = 0

    if gamepad 1 presses start - call function "spawn player " "1"

    player.owner = 1

    etc.

    Then create a series of events to check which button was pressed for each controller

    eg:

    if gamepad button is down (Gamepad = 0), button = A) -> Call another function called "Shoot", "0"

    etc, and do this for every button combination.

    Once you set this up once, all you have to do is create events for each new game you create that has a function that matches the button press function call from your "input" layout.

    so. on function "shoot" "0"

    pick player.owner = function.param(0) -> do whatever should happen here

    if you did on function "shoot" "1" it would do the shoot event for player 1 instead

    I hope this all makes sense, im pretty tired right now.

    But basically you only need to setup on layout with a series of if statements to handle each gamepad and button. Have them call a generic function EG: jump, shoot etc. And pass the gamepad index number as a parameter, so that you only need to have one function per button, which will determine which player to do the action to based on the gamepad index that initiated it.

    once you set it all up once, you can simply import that layout to your next game, and include it in your main event sheet, and it will be all ready to go.

  • Has anyone tried combining this importer with a bitwise method for dynamically changing the tiles after creation?

  • rexrainbow - Thank you so much for all of your help!

  • rexrainbow

    Ok i tried loading the json file as an imported project file using the ajax "request tiles.json" command

    then Ajax on "tiles" completed - importing the ajax.lastdata into tmximporter v2

    but i get the following javascript error during preview.

    TMX Importer: Can Not Find "Tiles" Layer

    which is the name of my layer in tiled.

    Do i need to specify that name somewhere in my event code? or rename my file or something?

    Here is my modified sample capx.

    https://db.tt/RYnwCGsU

    thanks for the help.

  • the manual to your facebook plugin link doesnt seem to work. it takes you to a contact page.

  • rexrainbow - it appears that the json file that tiled is creating doesn't work with the v2 json importer anymore.

    I notice that compared to your example file, all attributes in your json example data have 2 "" around them, where as tiled only puts 1 around each one. eg: "height" etc

    If i manually replace all " with "" and try and load that, it accepts it, but when you run the example it gives a javascript error in chrome saying "cannot find "tile layer 1"

    Tiled map Editor 0.10.1

    Construct r183

    Json TMX parser

    TMX importer v2

    Rexrainbow's sample capx for the importer

    steps to reproduce -

    1) In tiled map editor goto file save as "type json"

    2) try to copy json file into example capx -> multiple errors complaining about only 1 " around attributes in json

    3) tried replacing all " with "" and pasted into example capx. C2 accepts it, but gives javascript errors when running a preview.

    perhaps the plugin just needs to be updated to work with the latest version of tiled?

  • Can you show some more screenshots of how it looks setup ? Do you simply call it by pressing a button? or does it embed some sort of widget into your game?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I put a copy on my dropbox

    https://dl.dropboxusercontent.com/u/403 ... sprite.zip

  • rexrainbow - awesome behavior!

    I also like how if you are moving the boundary that the objects stay locked inside.