oosyrag's Forum Posts

  • There may be a way, but it is a bit more cumbersome. In addition to using the method described by backendfreak, you can have by default all your sprites on your layout mimimalistic or blank/low resolution. Then after you load into the layout. but while your layout is still obscured by the loading overlay, use the sprite objects load image from URL to replace the fast loading sprites with your actual sprites. Your overlay should be able to run as this is happening, so you can set up your minigame first, or show progress.

    An additional benefit is you can use on (final) image loaded to start your actual layout, which is better than just waiting an arbritraty amount of seconds.

  • I was able to download it... although it is my own dropbox. I'm not sure how to help there.

  • Still not sure what your problem is. Your X, Y, and Z Indexes are already incremental by nature, and don't have to be fixed, the way you're using the array. To add a character, push 0 on the Z axis, then you will get a new Z layer full of 0s. The character ID would correlate to the Z index - charID 0 would be the top layer, charID 1 would be second, ect.

    Then to set the marker, you would do Set Array at (Time, Place, CharID) to 1.

    Edit: Seems like a pretty inefficient way to use an array to me... I would set up a 2d array, width (character count), height 2, depth 1. The first row would be the time, second row would be place, and the x index would be the character ID. You can use push front/back on x axis to add characters, then set the values at Array.At(0,0) and (0,1) for time and place. (Or Array.At(Array.Width-1,0) and (Array.Width-1,1) for the back)

    I think I'm still misunderstanding your question.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • https://www.dropbox.com/s/aw4oymi5f419c ... .capx?dl=0

    Hmm it got a bit complicated.

    Basically - Each star is assigned unique values for its position in the array as instance variables. I used a loop to create the stars and assign values on one layout, you might do it manually as you design your levels.

    When it is collected (click), a 1 is recorded in the array at that star's unique position.

    Then, the function "CountTotal" goes through and adds up all the values inside the array to get the total number of stars collected, and displays it.

    I've added in events to save and load the array and current state of each star via LocalStorage as well, so it is persistant. You can right click to clear all data.

  • https://www.dropbox.com/s/o46ix3solka3x ... .capx?dl=0

    Disclaimer: This uses an AJAX request to a third party website, which may or may not be available in the future. Also in consideration of this free service, avoid making an AJAX request every tick.

    For a local solution, you may want to use rex's date/time plugin instead. https://dl.dropboxusercontent.com/u/577 ... _date.html

  • What exactly didn't work? Do you have an attempted design to share?

  • There are several tutorials/examples already. Have you tried any?

    https://www.scirra.com/tutorials/search?q=minimap

  • You're going to need to give more details. What does your original full sized map look like? What is the scale of your minimap? How big is your map and how much do you want the mini map to show?

    More importantly, what do you want the mini map to look like? Generally speaking you'll need to draw the mini map first....

  • Both the date/time and the newgrounds plugins are great, but have a few prerequisites. I will write about it as well, but my goal is to keep things as basic as possible, hopefully working "out of the box" in terms of plugins. I want to go over each available method and the advantages/disadvantages of each. Here's what I have so far.

    ExecJS("Date()")

    • Simplest solution without plugin
    • Works on system time, gameable
    • Need to convert to UNIX Time, complicated

    EDIT - Found out ExecJS("Date.now()") gives the timestamp without needing to convert.

    Rex_Date plugin

    • Simplest solution with plugin
    • System time
    • Needs plugin

    Geocache timestamp

    • System time
    • Requires location services - intrusive to user

    Multiplayer Plugin

    • Need to set up own server to request server's timestamp
    • Advanced/complicated

    AJAX request to third party website

    • Simplest online/server solution
    • Relies on availability of third party website
    • May cause unwelcome stress to server
    • Possibly requires authentication/plugin

    NG.io

    • Requires plugin, NG.io account/project
  • For Each Monster    |  Monster Spawn Bullet
    Every 1 Seconds     |  Set Bullet angle towards Player[/code:zdfyh7lc]
  • Many options are explored in this thread:

    There is one more I just found, in that there is a Timestamp expression in the Geolocation object that gives you UNIX Time based on your system time. While your game is running, save this to a variable/localstorage, then on start, you can get the UNIX Time and compare what the difference is from your saved value to make adjustments accordingly. Haven't experimented with it yet though, it seems like there may be some delay issues when requesting geolocation. The methods in the linked post should be more certain.

  • You can also do it with a loop. Here's an example to get the low and high x:

    global number low=0

    global number high=0

    every tick

    --- set low to infinity

    --- set high to -infinity

    for each sprite

    --- set low to min(sprite.x, low)

    --- set high to max(sprite.x, high)

    That is exactly what I was looking for, thanks R0J0. I was having trouble wrapping my head around how to keep only the lowest or highest value in a loop. I had tried comparing each value to the one before it, but that would result in issues where the order the values were checked would matter.

  • I can make an example later, don't have C2 in front of me.

    But basically just think of an array as a spreadsheet, pretty simple. You can have one column for each level, and 3 rows which represent each star. In each cell, a 0 would represent not collected, and a 1 would be collected.

    When you collect a star, you would set that star's position in the array to 1. This way, if it was 0 before, it would change to 1, and if it was already 1, nothing would change.

    Then run a loop in the array, for each xy, that adds everything in the array. That would give you your collected star count.

    Example to come tomorrow!

  • As long as there is no way to collect the star again after it has been collected (the star no longer appears on subsequent plays) it should work fine.

    Otherwise, you'll need a flag system to keep track of each star and it's state, if it has been collected before or not. An array may be a more suitable method of data storage in that case.