linkman2004's Recent Forum Activity

  • Objects have a count property that returns the number of that object that currently exist. So something like this is what you want

    banana.count < 4 and key pressed, create banana[/code:11bce29n]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The issue with your layer not becoming visible is due to a problem with your events in "EsControl". When you click the button and "uionoff" equals zero, you make the "ui" layer visible and set "uionoff" to one. You're then going to the subevent where "uinoff" is now equal to one, and you end up undoing what you just did. Instead, you should do something like the following:

    (Top event)Button4: On clicked
    ----(Sub event)uionoff = 0 then set layer "ui" visibile, set "uionoff" to 1
    ----(Sub event)ELSE, uionoff = 1 then set layer "ui" invisible, set "uionoff" to 0[/code:cnmhrl64]
    For choosing what to put on a layout, it's best to keep things grouped as you would see them in the game.  Generally, I would suggest having menus and game levels on separate layouts -- I would only suggest placing the UI on a separate layout with a global layer if you have multiple game level layouts, otherwise you should simply have the UI layer on your game level layout.  Things like controls, AI, etc -- purely logical portions of the game -- would be kept in separate event sheets, and the sheets you're using would then be included into the event sheets for the layouts that use those logical elements.
    
    I would never recommend using only one layout, as this would get incredibly messy.  The only reason most tutorials have a single layout is because they're mostly demonstrating simple concepts that don't require a separation of elements.
  • "On tap" is a trigger, as indicated by the green arrow next to it. "On function" is also a trigger, and Construct 2 only allows one trigger per event(including subevents), which is why you can't use "On tap" in a function. Instead, your "On tap" event should call your window creation function.

    In relation to your second post, calling a function will return to the branch point after the function has completed -- I'm not sure what gave you the impression that it won't. If you're having issues, I'd suggest posting a capx so someone can help you out with the problem.

  • In the layer properties for the layer that has your objects with the blend modes, you need to turn on "Force own texture".

  • It says in the error message - you have triggers(collisions, on animation finished) as subevents to a loop(for each BeadSnake), which isn't allowed. The green arrow to the left of a condition indicates that the condition is a trigger -- something that's true for one frame when a state is attained and is then false until the state is reversed and once again attained, more or less. Construct 2 treats triggers differently from regular conditions.

    Your use of explicit for each loops here is unnecessary, as all of these conditions will implicitly run against all instances of BeadSnake/bead. Getting rid of them -- although the first one would be the only one causing the error -- should get rid of your problem and still result in everything working the way you'd expect.

  • Rhindon - PM me your CAPX or one recreating the problem -- ideal, as I don't have the full version of C2 -- and I'll take a look.

  • You could try something like this by saving your object position in instance variables:

    Start of layout
        Sprite.OldX = Sprite.X
        Sprite.OldY = Sprite.Y
    
    Compare two values: distance(Sprite.X, Sprite.Y, Sprite.OldX, Sprite.OldY) >= X
        Do something
        Sprite.OldX = Sprite.X
        Sprite.OldY = Sprite.Y[/code:2t5n08eg]
  • Rhindon - Set the scale rate of your HUD layer to 0 in the layer properties panel.

  • Yes, under the System object there is an "On load complete" event that will trigger once loading is completed.

  • The "Compare selection" events are running all the time because they're simply running a comparison. There are two solutions to get what you're wanting.

    1. Add "On selection changed" events(note that this event is a trigger) for each of your lists, then make your existing events -- the "Compare selection" ones -- subevents to the relevant "On selection changed" event. This will make it so that you're only comparing which item is selected when the selected item for the associated list is changed.

    2. Add "Trigger once while true" to each of your current events. This will make each event run only when the condition has changed from false to true.

  • Putting it after the load action probably wouldn't work, no. The system object has a trigger called "On load complete" which is called when your game finishes loading a previous state -- that's probably what you want, so you can do your increment and save as an action there.

  • One suggestion: after loading your checkpoint save, add 1 to your death count(to bring it back to where it was pre-load), then save again.

linkman2004's avatar

linkman2004

Member since 15 Jan, 2008

Twitter
linkman2004 has 1 followers

Trophy Case

  • 16-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

18/44
How to earn trophies