keepee's Recent Forum Activity

  • There's no simple way of doing this but you could create a custom collision polygon where it is hollow near the top, so most of the mass is at the base.

    you could also experiment with using distance/revolute joints to pin a tiny sprite 1*1, with super high density to wherever you want to add mass on the bigger object

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • fluctuating, like moving up and down? or just moving incredibly slowly? speed is set to 0? with 0 acceleration?

  • Peret

    try setting all the instance variables to family variables, so you don't have to pick by uid

  • So for each number that's been clicked on, you can set it's state to 'selected' whether by a boolean, or by numbers.

    +on number clicked    >set number.selected to true.. (or set number.selected to 1)

    then to total all the numbers selected :

    +for each number

    +number is selected (or number.selected = 1)

            >add number.value to TotalSum (a global or local variable)

    where number.value, of course, is an instance variable containing the actual number visible on the block/cell

  • "..more towards what you're after"

    -vnt@emoaeden

    Well, that's what I suggested you could settle for, but with 1 var you can lose the separate backgrounds' positioning and the overlap checking

    Annisa12 Variables are worth reading up on anyway, they'll open up possibilities/simplify stuff.. and are often essential. The manual will explain better than me, but in short, they are just stored values of number or text.

    In this context what I was getting at, was a global text variable:

    on touching the slide button for day/night, set that variable to "Day" or "Night"

    and then in place of the 'is overlapping DayBackground' you can have 'if variable = "Day"'

    or 'if variable = "Night"'

    But anyways, not a big deal if this is all the project entails, but as it gets more complex, you'll probably want to start using them.

  • you can just make a text object...

    it won't pause the game but you can append to it at any event you want to check.

    Or, instead of appending a text object, you can juse use the 'browser | log to console' action.. and open the js console in your browser (ctrl+shift+J in chrome)

  • At the end of the day to night transition, the background is still actually the daytime sprite, it's just on very last frame of the 'DayToNight' animation.. so it appears to be the nighttime sprite.

    So.. now you probably realize that it's still being destroyed because the '..is overlapping daybackground' condition is still being met

    You could just fix it so the background sprites swap correctly in the transition..

    ..but instead, i'd recommend redesigning this in a different way, which would solve your problem and also result in a cleaner events sheet.

    have all the background stuff into one object, so don't worry about positioning/setting invisible etc.

    And instead of checking what background it's overlapping, check a variable that toggles between 'day' and 'night' on the transition... or just a variable that toggles between 1 and 0 representing day and night.

    This is good practice too as overlap checks are relatively expensive on cpu.

  • This is a picking problem, what is your condition for collection?

    a condition like 'mouse is over _' for example should filter the instances so that the actions apply to just the crop field that the mouse is under.

    anyway, we can't open your file as it is a .caproj file..

    you need to upload as a .capx file

    a .capx file is basically a zip/archive of everything in the project folder.

  • You just want a layer of numbers to scroll continuously?

    What's it for? I ask because this seems pretty simple.. so I'm guessing that i'm missing some info..

    don't need to worry about setting an scroll object, you can just manually set the ScrollY each tick to move upwards

    System | Set ScrollY to ScrollY-(dt*speed)

    if you want other layers to remain still just set their parallax to 0

  • I doubt it makes much of a difference so it's probably best to prioritize what makes your events cleaner, more readable and easier to work with.

    Personally I think too many objects is awkward with the C2 interface, turning all those objects into animations/frames inside one object and treating that as a 'group' is often easier.

    Although if you really want to find out, you could test it yourself.

    I guess just create 1000 of each with a loop on startup and check the memory usage with task manager

  • Whiteclaws

    no that's...

    oh wait

    yeah

    that...

    yes

    Yes.

    Correct.

    You have won.

    Congratulations.

  • Whiteclaws

    sorry, should have tested what I wrote before sending it.

    "doesn't involve variable usage"

    not even a non-static local variable?

    you could store the UID of one of the objects overlapping and then invert a 'pick by UID' condition. Inverted pick by UID works, i've used it a few times.

keepee's avatar

keepee

Member since 6 Jan, 2012

None one is following keepee yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies