AllanR's Recent Forum Activity

  • I just tried both .jpg and .jpeg with no problem...

    I don't think there is any difference in the format other than adding the e to the extension name.

  • particles was a good idea... not sure I have seen someone do it that way before. That would probably add the least amount of overhead.

    This is the way I have seen most often. Spawn a sprite near the center of the screen with bullet behaviour, set a random angle of motion. The "closer" the star is, the faster it should appear to move, so set the bullet speed and size a related amount.

    https://www.rieperts.com/games/forum/Starfield.capx

  • are you sure the file is a jpeg? I just tried opening one in the sprite editor and it worked fine...

  • You can not pick a newly created object like that. Not until the next top level event.

    You can pick it by UID, or Pick Last Created Cow1

    but because the new instance is not fully created yet, you can't pick it by checking if it is moving or not.

  • I normally would create a long solid object to act as "ground" and then place the scenery on top of that to avoid all those seems to get stuck on. (so collisions turned off on the scenery)

  • a couple minor problems...

    first, your layout 1 would have the same issue if you sit on layout 2 for a minute - listening to the music before pressing Play.

    You need to set StartTime at the beginning of each layout that needs it. the system Time variable starts at zero and automatically increments every second your game is running, regardless of the layout you are on. So, when a new layout starts, you want to set your variable to Time, so you can calculate the correct offset from that to make your text appear.

    You don't want to set StartTime=StartTime + 1 every tick, because every tick happens 60 times a second, so you will very quickly end up with a large value that doesn't help you.

    I fixed eventsheets 1 and 4 to work the way you want.

    https://www.rieperts.com/games/forum/CollegeRet.c3p

  • You aren't doing anything wrong, but that is normal C3 behavior. If there are no instances, there is nothing to get the width from.

    The first time you try to get the width right after calling the function that creates an instance, the new instance is not fully created yet (which happens after the next top level event). Since there are no pickable instances at that point, it returns a width of 0.

    if you add the width to xposition inside the function, while the new instance is still active, it will work fine. You could also add a "Wait 0" after the function call, before you add the width, and that will work as well (because that gives C3 a chance to finish creating the instance).

  • Pick All is needed because that code is under a "Mouse Clicked on LavaCore" event that picks only the instance clicked on.

    I was about to say I duplicated the code and it worked fine for me (which it does), but then I spotted the problem... random is an instance variable of LavaCore - not a global variable. You need to make a global variable to hold the chosen number to make visible. as an instance variable they all have a copy of the number, and that allows your code to make all visible.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just made a quick test file and it worked just fine - used similar settings as you...

    maybe there is some issue with converting it from C2. Maybe try making a new file with just zoom and see if it works.

  • The Mouse click trigger only picks the object clicked on, so you can't pick other instances by UID because they have already been filtered out.

    You could add a subevent to Pick All after the wait 4 seconds, and then move the other subevents under that. Or put all that code in a function and after 4 seconds call the function. (They will all be pickable inside the function).

    Just because an instance is invisible does not mean that it can't be clicked on...

  • in Layout 4, You are using "Time=50 Seconds -> Goto Layout 5"

    Time is a system variable that keeps track of how long your program has been running from the time it started (at the very beginning). So, by the time you get to layout 4, more than 50 seconds has already past so it goes right to layout 5.

    You can make a global variable "StartTime" and set it at the start of the layout so you know how many seconds has past when the layout starts:

    "System - Set StartTime= Time"

    then, when checking Time, check for "Time = StartTime + 50"

AllanR's avatar

AllanR

Member since 21 Nov, 2013

Twitter
AllanR has 23 followers

Trophy Case

  • 11-Year Club
  • 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
  • Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies