justifun's Forum Posts

  • You could create 4 events (on gamepad 1 pressed, 2, 3, etc ) that checks which "start" button was pressed, then assign that player an ID. Also make a variable that gets assigned the gamepad number who's button was pressed.

    Then create one function for all of your inputs. You pass the button that was pressed (gamepad.lastbutton) And you pass the gamepad number that presseed it (the variable from before)

    there fore each time a button is pressed, the function uses who pushed it and which button, then updates the associated player with whatever he's supposed to do. (Pick by evalulate, player.ID = function.param(0))

    then you only have one function, to handle all player movement etc for all players, thus only having to write it once.

  • rexrainbow , i would imagine each step supposed to be the same distance apart regardless of how fast the object creating it is moving?

  • Rexrainbow some some really useful timer plugins

    check out

    http://c2rexplugins.weebly.com/rex_timer.html

    and

    http://c2rexplugins.weebly.com/rex_duration.html

  • Ashley - would this be something easy to add plz?

    thx

  • Perhaps i'm miss understanding on how its supposed to work.

    I believe the idea is that if you were making a top down rpg game for example, and you wanted to leave foot prints behind your character as they walked, that it would stamp a foot print sprite every "pixels per step" behind you.

    Or if you were going to make a game where you dragged your finger to create a line path behind it, it would leave a trail of dots spaced evenly as you moved.

    Similarly to as if you were to manually code it like this.

    Variable StartX

    Variable StartY

    Variable (pixels per step)

    While in Touch

    If Distance (startX,StartY, TouchX, Touch.Y) > (pixels per step)

    create sprite (trail)

    angle (trail towards touch.x, touch.y)

    set startX, to Touch.X

    set startY to , Touch.Y

    Or was it originally designed to do something else?

    Thanks for your help rexrainbow. We love all of your amazing plugins!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I was trying it with 187

  • It would be awesome if there was an expression that would give you the ID number of the gamepad after pushing a button, so that we could easily tell which gamepad initiated that button press.

    Thanks!

  • rexrainbow - sorry rexrainbow, this still doesnt seem to work. With the new example you posted, no sprites are created when dragging the blue box.

  • Objects don't have names that you can store, but you can give them a variable and assign it a value to whatever you want. EG: Objectname.

    Ideally you want to store the UID or (Unique identifier) which each object has. so that you can refer to that specifically later.

    to store it into an array like you wanted to do.

    (system) For each (object) -> (array) set at X = Loopindex, value = (object.UID)

    this will put the UID of each object into the X position of the array as it loops through each object in the scene

  • https://archive.org/details/internetarcade

    The Internet Arcade is a web-based library of arcade (coin-operated) video games from the 1970s through to the 1990s, emulated in JSMAME, part of the JSMESS software package. Containing hundreds of games ranging through many different genres and styles, the Arcade provides research, comparison, and entertainment in the realm of the Video Game Arcade.

    Lots of great inspiration!

  • cranberrygame - still can't get it to work

    Here's my steps

    Open your example screen capture example file.

    export it for android crosswalk

    import the build into XDK (1494)

    add the "get plugin from web" and add it as per your instructions

    try and build,

    Plugin installed: Canvas2ImagePlugin (https://github.com/wbt11a/Canvas2ImagePlugin#7ba2044)

    Error: Plugin failed to install: org.wbt11a.canvas2imageplugin (org.wbt11a.canvas2imageplugin)

  • On touch - place a dummy object where the player touches,

    then pin your player, to that dummy object

  • Simply assign each player a different set of controls to use.

    If you want to get fancy and setup one function to handle all controls you can as well.

    Assign each player a "Player number" variable - 1, 2, 3, 4 etc.

    On any key pressed - call function "player action" (keyboard.lastKeyCode") (Player.playernumber)

    Function "player action" ("A", 1)

    If function.param (0) = "A")

    pick player object = function.param(1)

    play animation "punch"

    if function.param(0) = "left arrow"

    pick player object function.param(1)

    move player left

    So basically you are creating a function that will update a players movement/animations

    then telling it which player its effecting

    then you can recycle this function to work with any number of active players and movements. so that you are only coding it once, and splitting its duties among all players inputs

  • Its working smoothly here for me.

    There's a bit of a hiccup when you snap/unsnap to the edges of boxes when you are holding onto them.

    Not sure exactly what's causing that, but you could have the camera scroll to intentionally lag behind the player movement a bit more to help hide that.

  • JLH1964 - Try out the "Andy" android emulator, i've always had more success with that