MoscowModder's Recent Forum Activity

  • I have a strange issue with multiple sets of objects interacting with each other.

    I have two objects, let's call them ObjA and ObjB, which are part of a pair. ObjA keeps a reference to ObjB's UID. There are multiple pairs of ObjA and ObjB scattered throughout the layout.

    I also have several of another object, let's call it Marker. A pair of ObjA/B are supposed to perform specific actions together when ObjA collides with Marker. The trouble is, it seems that EVERY pair of ObjA/B will perform this action when one touches a Marker. If I delete all but one pair, the remaining one behaves as expected.

    This is my code (approximately):

    • On ObjA collision with Marker + Pick instance of ObjB by UID stored in ObjA:
    • - If Marker.variable = 1: ObjA do thing 1; ObjB do thing 2
    • - If Marker.variable = 2: ObjA do thing 3; ObjB do thing 4

    Expected: One ObjA touches a Marker and does its thing 1, while its attached ObjB does its own matching thing 2.

    Result: One ObjA touches a Marker and EVERY ObjA does thing 1, and EVERY ObjB does thing 2.

    How do I ensure that only the ObjA and ObjB uniquely picked at the top are the objects selected in sub events?

  • BurningWood: Yep, your game doesn't play either.

    fldr: That fixed it! Thanks!

  • That makes sense, but unfortunately now it's been saved in 213, I can't open my project again in 212.2. To make things worse, after I upgraded my computer I apparently forgot to enable backups on this one, so I can't even go back to my last save in 212.2. Is there anything else I can do (potentially even editing the version number in the XML)?

  • I've a perplexing problem! It began just tonight, when I downloaded r213.

    When I run my game locally (preview mode), it works just fine, but...

    1) The minification process no longer works. It warns me about needing 64-bit Java, but I know I already have 64-bit Java installed.

    2) When I try to start the game in Chrome (from my server), I get a console error saying "Uncaught SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode". I looked at the source, and sure enough, the script had a let expression with no mention of "use strict".

    Why is this happening? The live copy of my game is currently unplayable (black screen - not even a loading bar)! Help!

  • That makes a lot of sense, actually. I think I will try that.

    Thanks!

    Edit: Tried it and it works. Still wish I knew what was wrong with Line of Sight, but at least I can continue with my game now!

  • I've got a bizarre problem in my project. I'm trying to use the Line of Sight behavior to make some rotating cameras that will spot the player. Seems simple enough. But sometimes (about 80% of playthroughs), the "Has Line of Sight" condition will never be true.

    The behavior's obstacles mode is set to Solids, and I've got one big tilemap covering the entire layout where I fill in any square that needs to be solid.

    Does Line of Sight have any known bugs with solid tilemaps?

  • That seems so much like it should work... but I must still be doing something wrong because after the first element (of 3) gets added, I get a Javascript error about being unable to read property 0 of undefined.

    My JSON looks like this (and it matches EXACTLY what I got when I hard-coded the values and output it using asJson):

    {
    	"c2array" : true,
    	"size" : [3, 1, 1],
    	"data" : [[["Item1"], ["Item2"], ["Item3"]]]
    }[/code:3azy3w3x]
    
    I know this is stupid, but exactly how hard would it be to add a behavior for Selects that lets it import a 1D JSON array? I think this might be handy for other people as well. Keep in mind I'm somewhat experienced with JS but have never written a C2 plugin before.
    
    P.S. In your example, one of the dimensions is 0. Shouldn't that make the array have a net size of 0?
    
    EDIT: Ha! I got it to work by switching two dimensions in my size. From [3, 1, 1] to [1, 3, 1]. Thanks a ton.
  • I have a select box that lets users pick a profile (save file) by name, given a list of existing saves. The game queries the server, which returns an array of names as JSON. I have confirmed that the JSON returned to the AJAX object is correct.

    I have tried setting the array's contents from this JSON string, but the array is still full of 0's. Also, the array's size doesn't change when I do this!

    Whether an array gets used or not, what's the best (or any working) way to fill in values of a select box from JSON?

  • I could do that, and it could work, but it seems rather clunky and would require making a screen-sized image for every menu in the game, and one for each layer of some layered menus, which would take up a significant amount of RAM when uncompressed in memory (I've had memory issues already with a big backdrop).

  • I don't think this is possible, but if it were that would help me so much that I thought I'd just check.

    Can you make a family with multiple types of plugins? Example: I want to make a menu item family that contains sprites and sprite fonts (and maybe normal text too). If not, is there a workaround that would make it work similarly? Or do I just have to make a set of events for each menu item class?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ryanrybot: I'm using Button Index exclusively. However now that I'm done with the implementation there's something else I can check before calling it a lost cause...

  • How unfortunate. I guess I'll just bill my game as "Playable with XB360-Compatible controllers!"

    I wonder if Firefox or Chrome offer addons for more controller types?

MoscowModder's avatar

MoscowModder

Member since 24 May, 2013

None one is following MoscowModder yet!

Connect with MoscowModder

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

16/44
How to earn trophies