jsutton's Recent Forum Activity

  • There are a few ways.

    You could give them all a variable, and use it for the pick condition.

    Use a pick criteria, is visible.

    Move the ones not being used off screen when not visible.

    (probably a million more ways, but one of those should work)

  • I filed a bug report.

    Appreciate you looking at it.

  • Not sure if this is a bug or me not knowing how to use right(text.text,count) properly.

    New project

    add keyboard, a textinput, and a text

    TextInput On Text changed, set text to right(textinput.text,20)

    Preview

    Type "This should work correctly"

    Up to the 10th character it displays as I would assume is correct.

    Character 11 thru 19 it starts dropping a character.

    At "This should work co" the text only displays "o" (the 19th letter)

    At 20 letters it starts displaying what I assume is correct..

    Bug or am I doing something wrong?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • probably need more specifics (do you want the sprite to instantly follow, lag behind, go to via a pathfind, line of site etc. etc.?)

    If you want the sprite to instantly follow, simplest way I would know.

    Sprite: Add instance variable "touch" as a number.

    On mouse left click, set sprite.touch = 1

    Condition: Every tick

    Condition: Sprite.touch = 1

    Action: Set sprite position: mouse.x, mouse.y

    On mouse right click, set sprite.touch = 0

    (the basic idea anyway)

  • Just a housekeeping question.

    Scenario: condition,

    set global global variable to 1

    wait 0

    set array.at(variable,0) to xyz

    The wait is needed or the global variable will not be changed before the set array and will use 0,0 (or whatever was in the global variable prior to the action)

    It looks like a local variable doesn't require a wait.

    Is this you ya'll see it and/or is there a better way? (I can put the set array in a sub-block and it doesn't need a wait 0 either.)

    Thanks in advance.

  • Best I know the multiplayer will not work on android, it gives a cross platform error simalar to the "allow origin" issue with ajax via php.

    Have you looked at the Photon plugin for C3? You can get a free account for limited use.

    construct.net/en/make-games/addons/534/photon-engine-c3

    photonengine.com/en-US/Photon

    Photon does work on Android

  • A global variable will work anywhere in your project.

  • floor(int(textinput.text)) looked like you missed the last bracket ")" or I did, oops.

  • Imagine 9 pieces of grid paper placed in a 3x3 grid. Each piece of paper is a grid 300x400. Each piece of paper is actually a tilemap and they are all pinned to the center tilemap. If you drag the center tilemap off the screen there is a duplicate copy of the center tilemap (an "edge" tilemap) that is now on the screen (this makes for a continuously moveable map). On a touch end where you are not touching the center tilemap, the center tilemap is placed at the last touched "edge" tilemap location (the 8 "edge" tilemaps are still pinned and shift accordingly. This way you can scroll again and it will look seamless until you happen upon an "edge" tilemap.

    The problem, each tilemap is labelled 0-300x,0-400y. When the map shifts the tilemap.positiontotileX,Y shifts as well. Which means on one click the distance formula works, but on the next click it shifts and gives the inverse.

    I have no idea if any of this makes sense, but it's a huge pain.

    The only other solution I can think to use would be to pin small sprites to the map used for starting distance and then just use a distance(pin.x,pin.y,touch.x,touch.y) {divided by the actual tile size). It should work, but seems inefficient.

jsutton's avatar

jsutton

Member since 31 Mar, 2015

Twitter
jsutton has 1 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies