John Cutter's Recent Forum Activity

  • Thanks, mOOnpunk! I'll give that a try.

  • Thanks for trying to help everyone! I'm not sure what I'm doing wrong here, but it's still not working.

    Layer 1 is set to force own texture.

    + Mouse: On Left button Clicked on Sprite2

    -> System: Create object canvas on layer 1 at (Sprite2.X, Sprite2.Y), create hierarchy: False, template: ""

    -> canvas: Set size to (Sprite2.Width, Sprite2.Height)

    -> canvas: Paste object Sprite2 with effects

    -> Sprite2: Destroy

    -> canvas: Set drawing blend mode to Destination out

    -> canvas: Fill ellipse at (Mouse.X, Mouse.Y) radius (15, 15) with rgba(0, 0, 0, 100) (Smooth edge)

    When I click on the sprite it just disappears.

    I think I'm going to just do this with art. That should still work well!

  • Not sure what I'm doing wrong but I just can't get this to work.

    Here's basically what I'm trying to do. If anyone sees an issue with any of these steps, please let me know.

    - Player clicks on sprite

    - Make sprite invisible

    - Create instance of sprite on "Effects" layer (texture draw = true)

    - Make new instance invisible

    - Copy new instance to canvas (also on "Effects" layer)

    - Wait for events (give time for draw to happen)

    - Set canvas blend mode to Destination Out

    - Paste hole sprite to canvas

    When I do this my sprite image turns black. Any ideas?

  • Thanks for the reply, Jase00!

    I was trying to follow dop2000's example described here:

    construct.net/en/forum/construct-3/how-do-i-8/punch-hole-sprite-reveal-layer-156127

    I modified it to work on just the sprite being clicked on:

    This works... but those same events don't work in my game. I tried to match the sprite and layer details, but with no luck.

    One difference is the way I had to use containers. My game uses spr_card and fam_cards (with spr_card as the only member), and all card references use fam_cards. Unfortunately, I apparently can't use a family in a container... so I had to add spr_card instead. Not sure if that messed anything up or not.

  • I have roughly 35 sprites on the screen, all on their own layer. When the player clicks on one of these sprites I want to punch a hole in it.

    I found an example from dop2000 and tried to adapt it, but the sprite clicked on either turns black, or it cuts out a sprite shaped hole in everything else in the background.

    Note: My canvas object is on the same layer as my sprites. I also set the "Force own texture" to true for this layer.

    Any suggestions?

  • I'm working on a card game and the logic is getting messy. What is the best practice for tween sequencing?

    1. I use tweens to deal cards, one at a time, to the tableau

    2. When the tween is finished I enable a Group to do the next tween.

    Unfortunately, the event in #2 fires as soon as the first tween finished. (The rest of the cards are still being dealt onto the screen.)

    I tried to add a "Wait 2 seconds" to the start of the next group, but this messed up my instance picking. (It took FOREVER to figure *that* out.)

    My other group is called "Draw Next Card" and I have to use a global variable called "UI_var". I set it to 1 and then, after the first set of tweens, I set it to 0. This way it doesn't call the tweens over and over again while waiting for one of them to finish.

    It's working, but is there a better way to manage all of this?

  • dop2000

    SERIOUSLY??? You define the value of a global string by NOT including quotation marks??? I spent HOURS working on this yesterday. Good grief...

    I've been using Construct 3 for years, how did I not run into this before? I guess I have mostly used global numbers. Argh

    I thought I was taking crazy pills last night. I simplified it down to 3 events:

    Set global string to "Testing"

    1. Confirm global string --> "Testing"

    2. If global string = "Testing" --> FAIL!

    WTH??????

  • Well, it's not an issue with the OR block or "On start of layout". I just tried this:

    When I launch my layout and look at the debugger I see:

    versionType = "Testing"

    str_Test = "Testing"

    So I verify that versionType = "Testing" and then immediately test if versionType = "Testing" and it fails. (If it had succeeded str_test would be "OK")

    If I delete "versionType = 'Testing'" it succeeds. Why can't I check the value of this global string? I'm SO confused.

    UPDATE: I just added a new global variable called verNum and set it to 1. Then I changed my condition to:

    verNum = 1

    This works! Why doesn't the string work?

  • Just when I think I'm finally starting to understand this program... <sigh>

    Why doesn't this work:

    In global values I set versionType = "Testing"

    LayoutName = "lay05_coreGame"

    Seems simple, but when I run this code str_test is always an empty string ""

    Possibly relevant:

    - the layout is lay5_coreGame which uses sht5_coreGame.

    - sht5_coreGame includes sht00_globalLogic

    - the code above is in sht00_globalLogic

  • You do not have permission to view this post

  • Thanks, dop2000

    My code has an extra event and it actually makes your first example work. I'm not sure why...

    + System: For each CardFamily order by CardFamily.ZIndex ascending

    ----+ System: For each Card

    --------+ Card: Is overlapping CardFamily

    --------+ System: Card.ZIndex>CardFamily.ZIndex

    ---------> CardFamily: Set animation frame to 1

    Here's my code now and it seems to be working perfectly. Do you see any issues?

  • I wrote a level editor that allows me to load and save .json levels using a FileChooser object.

    Stupidly, I assumed I would be able to load these files (sans FileChooser) in the game, but I forgot that Construct 3 is browser-based and this is not allowed.

    My game will have ~200 levels and during development I will be tweaking/changing them frequently. Should I just keep all the levels in the Files folder in Construct 3, and then re-import them every time I change something?

    What is the best practice for this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads