oosyrag's Forum Posts

  • Right click the sprite font and select clone.

    Although you really should just use a single spritefont object and learn how to pick the proper instance to manipulate instead. There are many ways of doing so.

  • Don't be intimidated by arrays! They are simply little spreadsheets with a bunch of tools you can use to manipulate them.

    The solution to update the array is simply to repeat the actions called on start of layout, with the simple addition of setting array width to 0 beforehand to erase the current array. So upon dropping a block, set array width to 0, then add each block's (new) x position and uid to the array again and sort by x position.

  • I think the multiplayer plugin could work too, have the program automatically connect to a host which would pass a certain variable back to the client to save in localstorage for a certain amount of logins. This can happen in the background and be non-critical for the function of your program. You can have this event run only before a certain date to future proof it, and or patch it out later in an update.

  • Try a horizontal sine behavior movement with increasing magnitude and speed while applying a steady upwards acceleration as well.

  • You would use it as an expression in the System - compare two values. First you would have to pick the powerup (I'm guessing by colliding), then you would system compare two values Powerup.AnimationFrame = x?

    The condition Isplaying is a little bit not quite right for your situation, so I recommend optimizing it a bit more even if it works as you have it right now. Just in case to prevent future issues.

  • Your question is a bit unclear....

    But try adding the "Every X Seconds" condition to your event to have it keep firing.

    Alternatively, add Wait and additional Spawn Bullet actions if you want a fixed number of bullets.

  • Generally speaking, when you click your button, you will need to "pick" your tower to be upgraded with conditions, so that your upgrade action only applies to the picked tower. There are many ways to pick, depending on how your project is set up.

    A safe way is to pick by UID, which you can save to a variable as an action when you select a tower to begin with. I recommend storing this in an instance variable in the upgrade button. Let's call it SelectedTower.

    On tower selected (on clicked/touched?) - Set instance variable Button.SelectedTower to Tower.UID

    On upgrade button clicked,Pick tower by UID Button.SelectedTower - Do upgrade tower action

  • I'm not sure if it works, but does rotating the layout affect gravity?

  • Use a 1 pixel width line stretched from each data point to the next. Set length and angle with a little math.

    Or use the Canvas third party plugin to draw lines.

  • I'm assuming this has to do with interacting with objects under your ui elements rather than a visual thing... as you shouldn't be able to see your objects if there is a ui on top of them anyway.

    As long as they exist, they will be under there, so you may want to add a condition to check if there is any other UI under your mouse click/touch as well before doing the action. A UI Family would be useful for this. For example, on touched object, is NOT (right click a condition to invert) touching UI (family) - then do something.

    As for scroll to, you can use scroll to position instead of scroll to object to get an offset. For example, Scroll to PlayerX+100, PlayerY would give you your player offset 100 pixels to the left of center.

  • Possibly on the last event make sure the value is an integer with int(LocalStorage.ItemValue)? Not quite sure... I imagine it IS getting something, otherwise the high score would remain at 0.

    Or does it have the same problem with all the localstorage events disabled as well?

    Edit: I don't see where you set the HighScoreText to HighScore anywhere... Maybe you're just not displaying the number? When you check in debug mode, does the highScore variable show the correct number? Reference capx: https://www.dropbox.com/s/m5u06uuk9fh78 ... .capx?dl=0

  • No seriously that article should cover everything you need to do. Just because the title of the tutorial says multiple shadow lights doesn't mean you need to use them all. The techniques applied to one are still relevant.

    Fade range

    [quote:9cgbch3p]Let's start with one opaque black layer, which gives us complete darkness. Then we add the "mask". This is a white circle with the alpha fading to transparent around the edges.

    Put your object/copy on a layer above to have it show original color.

    [quote:9cgbch3p]Other layers on top cannot have this lighting applied, since by the time they are rendered the background already has the light map applied. It's sort of "baked in" to the image by then, and you can only multiply with the final result, which isn't very useful. Arguably however it is useful that now you can put new content on top without it being affected by lighting, e.g. the HUD.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • OK I get what you are trying to do.

    Here is an example.

    https://www.dropbox.com/s/36u06exdjyf6p ... .capx?dl=0

    Basically you'll want a list of valid targets stored in an array. This array will contain the value you want to sort by, as well as the UID of each sprite, which allows you to pick the correct one you want to snap to.

    Then by using an incrementing variable with the array, you can look up which sprite is next or previous, and set your selector position to that sprite's position.

    To compact it more, you can use the array expression IndexOf to get the current position of your selector instead of storing it in a variable... but then you start sacrificing readability.

  • I don't think you can input expression in the property editor.

    Why not use an event? Generally it would go in On Start of Layout, which you probably should have for every layout anyway, so it doesn't add to your event count in case you were worried about that for the free version or something.

    Also when you start working with any significant amount of text, it becomes more and more unweildy to use the properties bar to set text.

  • Try setting the size of the temp array upon calling the function, rather than in the loop?