Magistross's Recent Forum Activity

  • You could do something like this to deal with multiple gamepads. Here, GamepadID is an instance variable (or could be a family instance variable in your case) used to identify which Sprite will be moved by each gamepad.

  • Well if we're talking strictly integers, javascript as a constant you can use. Number.MAX_SAFE_INTEGER, which is equal to 2^53 - 1, or 9007199254740991, which is the highest integer javascript can represent "exactly". However, bitshifting is limited to 32bits, so to be really safe, you should stay in the 2^32 - 1 range, which is quite enough to be frank !

  • Where is your data coming from? There is indeed a way to convert bytes to an integer but your string representation "ü6‡ " will definitely not equal to "FC 36 87 00" in JavaScript. "‡" charcode is 8225, and " " charcode is 32 (space). 8225 is more than a byte, and you probably meant the NULL character by your " ". It might be easier to receive your data in another form if you can.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Probably something around 1.7976931348623157e+308, the maximum "numeric" value of a javascript number variable.

  • Just updated with an additional distance check on line 3 so it won't create blocks too far from the sprite.

  • The "Recreate initial objects" has no way of determining if the recreated object already exists, so you won't be able to use it unless you systematically destroy objects that are about to be recreated.

    If the blocks were perfectly aligned on a grid, I'd say using a tilemap would be best, or an array solution could work too.

  • Another alternative would be to convert this font to a SpriteFont. blackhornet's tool would work wonder for that.

    Link :

  • If you want all your data loaded before working with it, you should store each LastData inside a dictionnary, using tags as keys.

  • You should do a distance check then, much simpler. Use System's "Pick by comparison", select object "waste barrel", distance(Dexter.X, Dexter.Y, barrel.X, barrel.Y), comparison <= 30. If the picking operation select at least one barrel, it'll execute the actions.

    Moreover, instead of the wait 0.4 second, you should add a "every 0.4 second", I believe that will behave more like you intended.

  • In the meantime, you can append text() to your xpath and force it to select the text node.

  • That would be the case if the hot spot was at the bottom of the sprite, but it isn't. The black circle's hotspot is in the middle a of tile, so is the grey one.

Magistross's avatar

Magistross

Member since 4 Jul, 2011

Twitter
Magistross has 14 followers

Trophy Case

  • 13-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies