VocoRobo's Forum Posts

  • You can use the same logic to make objects approach from all sides. Just change the X and Y spawn positions and sprite angle.

    X: ViewportRight(0) + Sprite.Width

    Y: round(random(ViewportTop(0) + Sprite.Width,ViewportBottom(0) - Sprite.Width)

    Sprite -> Set Angle to 180

    Then you'd have them approaching from the right side of the screen.

  • I'd do it this way:

    First off, give the object that you're spawning some behavior for movement. I like bullet for this case.

    Every(round(random(1,10)) seconds ->

    System Create Object on layer 0 at

    X: round(random(ViewportLeft(0) + Sprite.Width,ViewportRight(0) - Sprite.Width))

    Y: -Sprite.Height

    Sprite -> Set Angle to 90

    I hope this helps. This will create sprites above the play area that then move down across the viewport.

  • I've managed to overcome the issue by introducing a "wait for signal" in the event that loads the turrets. This works with or without an actual signal, so it appears that the timing is an issue. By delaying the loading of the JSON data for the turret just a small amount it is able to find and pin to the proper object.

  • Sorry the link was broken. Didn't realize until later in the day.

    I've attached the capx to the prior post.

  • Sure.

    I've attached it to this post.

    You'll find the "problem areas" under the Sector Gen Group -> LoadSector function (this is actually the function that is causing the error, when it tries to load the pinned object)

    The pinned object is created under Enemy AI Group -> NME Ship

    I stripped out everything that wouldn't prevent enough function to replicate the error.

    To see the error, simply go off any edge of the screen, then go back to the last screen, then return to the one you just visited. When it tries to load a screen with an enemy ship+turret is when the error occurs.

  • Tried to change the links hopefully that'll work. Did them the same way as the one in the OP.

  • Okay, here is where the object is being created and pinned to the other object:

    And here is where it's being loaded... this is when the error occurs:

  • Sure, I'll post that up this evening.

    The reason the UID error is strange is because I'm not actually pinning based on UID in my events. I'm pinning based on creation and overlap... so when object A is created, create object B and pin it to object A at X image point.

    Thanks for the reply!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is the error I'm receiving.

    This error occurs when the game attempts to "load" a screen.

    My game is saving each object's JSON data to a key=value array.

    Upon loading, it loops through this array, and for each object of type A, creates object A and loads A from JSON at Array.CurX,1 (where CurX,1 is the JSON data of the object that was saved.)

    I had assumed that the pin properties would be correctly saved and recalled by saving the object AsJSON and loading it back from that data. Either this is the incorrect method or I'm just doing something wrong.

    Any suggestions?

  • Tilemap was the definite solution... much more straight forward since the tilemap works with xy co-ordinates.

  • I'm going to give the Tilemap a shot. Hopefully it will work... I am using instance variables on the "map square" sprites at the moment to ensure the data is arranged properly. For some reason when I was purely relying on the Array.Cur(X/Y/etc...) it was putting x1y1 in the position of x1y99 and other weird configurations.

  • Hello!

    I am working on a game using an Array as the "map" of sorts. The Array stores data for each "sector" (xy position) if it's been visited, or generates a procedural "room" at that co-ordinate if it has not been visited before.

    I'm trying to figure out an efficient way to visually represent this array as a map. At present I am creating 10,000 sprites and setting each sprite's frame to represent the visited/unvisited/currently at state of that position in the array. This is wildly inefficient and I am having a bit of trouble thinking of a better way to visually represent the array.

    I thought about using a Tilemap. Would that be more efficient when it comes to load times? Right now the game hitches up when I hit the map button, for about half a second, then loads the sprites.

    I'd love suggestions if anyone has them!

    Thanks!

  • The End Is Nigh — Now for sale in the Scirra Store!

    https://www.scirra.com/store/royalty-free-music/the-end-is-nigh-432

    <h3>The End is Nigh</h3><div class="deshr"></div><p>This track was made with combat scenarios in mind. Anything from fleets of opposing space craft meeting in the dead of the abyss, to epic fantasy armies battling it out between the towering mountains of lore.</p><p>This package includes the file in</p>

    • .MP3
    • .WAV
    • .OGG

    Use this topic to leave comments, ask questions and talk about The End Is Nigh

  • Found the issue...

    We are running the app on a Wordpress page, and the admin bar across the top of the screen was the culprit. The offset of the hitboxes on Construct was exactly the height of the admin bar. When we removed the admin bar, everything was as intended.

    Not sure why the Canvas acted that way, but at least it's working for now!

  • Anyone else had this issue?

    In IE (all supported versions as far as I can tell), my application registers clicks about 25 px above where the mouse actually is. Meaning I have to have my mouse below a button to click on it, etc... The interface for my app is almost entirely based on mouse clicks, click and drag, etc... so this is a bit of an issue.

    Not sure if I should post a bug report or if this is a common/easily fixable issue... could not find any info searching.

    Any input is appreciated! Thanks!