greenleafvt's Forum Posts

  • So I have a sprite that is part of a instance group of itself. 4 instances per group.

    Example:

    1 2

    3 4

    5 6

    7 8

    I have a group_id variable for each set. and 1 and 5 have a Var1 = -1 all the others have -2

    I made all instances with a var-1 set to a random number that corresponds to a animation frame.

    I want to instances 2,3,4 to copy the random 1 frame

    6,7,8 copy 5

    Trying to make the var=-2 just copy the random value var=-1 creates

    Can make it work easy using two different sprites but is their a way to do it with one sprite? Some operations with the 2 sprite method are not working. Example: mirror and flip - when copying the animation frame VS making another sprite with all the same frame and doubling the project size. It would make my project development much smoother to use just the one sprite that could be used with behaviors or modified in additional ways with more variables in one sprite.

  • OK that worked. Thank you! I didn't get good results when I first tried it but I realized that you have to enable collisions for every instance VS just the master and it worked great.

    Haven't had any problems with the C3 runtime but I will set it back to C2 if you think that makes things more stable.

    Thanks.

  • Hmmm yeah going to try that. Not sure how the collisions got turned off. So if I don't have have an event in an on start of layout it happens every tick - so its constantly pinning the sprite thats why it wont work? Didn't know that.

    "Finally, why are you using Construct 3 runtime for this game? It doesn't even support debug mode."

    Construct 3 has a debug mode - its hidden under the play button drop down, or are you saying that it will show up in debug better if its in the onload function

    Thanks

    Nope, and tried selecting on Group_ID that they both share...

    Duped BALL1 and it works fine with multi instances of that so something must be wrong with BALL2

    All items have collisions on now too.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not Working. Tried pick all - ball2 +overlapping PACKSelector and it still wont pin.

    Tried even pick all - ball2 without any conditions and it wont pin to PACKSelector :(

    I'm going to go through the whole event sheet something else must be happening. Also its interesting that he other codes work for BALL1 and the Post... Though it might be because of the multi instance of BALL2 to but post has the same and it works.

    Thanks for checking

  • So I have 3 objects:

    2 balls and 1 post all different objects.

    I have a box sprite I want to pin them too. The first two objects work fine but with the same logic (overlapping) the 2nd ball just wont pin.

    Also tried with group ID var to see if I couldn't get it to pin using a same var number an still is buggy.

    Any suggestions?

    Thanks

    Cp3 Attached

    drive.google.com/file/d/1iVP5Miy28SjXCl9n8n0hsiB7m_Cw9wQZ/view

  • Not sure if I understand you correctly. But sounds like maybe you should look into the global checkbox on the properties panel for the objects you want to make the same on duplicate layouts?

  • Thanks Maverick,

    Figured out how to use the "Selected item text" and that works fine.

    So if "Selected item text" = "Layout 1" / SYSTEM goto Layout 1

  • Hey Sqiddster, can you update the link its broken. Interested in how you did this.

  • I made a list and populated the fields with:

    1. Layout 1
    2. Layout 2
    3. Layout 3
    4. Layout 4

    How do I make the dropdown functional so when item 0 is picked the the layout changes to Layout 1

    when item 3 is picked the layout would change to Layout 4 etc.

  • The Pop Lab demo is a good place to start:

    construct.net/make-games/showcase

  • I have a situation where I am loading a bunch of random values on startup. Right now its just the colors for testing. It would be color and shape down the line. The random values create different "packs" the packs then need to be selectable and load into another layer or layout where I will set up a way to edit them (change shape and color manually)

    So I made ap capx:

    drive.google.com/file/d/18VZ7ewlgghsPN42YicNPCNBBJnEoPK0r/view

    Two questions:

    So whats the best way to transfer and have the selected pack show up in the other layout or layer?

    In the example capx I have the pack selector turn off layer 0 and load the Edit layer.. However notice the buttons on the Edit layer don't seem to work even though that are set up the exact same way? Any Ideas?

    Thanks for reading.

    Select a pack:

    drive.google.com/file/d/1YxcKkgsnAIJZoB7cr1rxnQu_-_X0E_BB/view

    Load that random pack in another layer and eventually edit the results:

    drive.google.com/file/d/15oS-OkStbOdBs-Hm-yfWQurxqAW1X_TA/view

  • Probably may ways to do this but let say I have a layout that loads random images and I have another layout that I want to customize one of the random generated images - lets say change the color or change an animation frame. Passing the instance generation values is eluding me at the moment.

    Try and make an example tomorrow but imagine a square, triangle and circle as options and them they get loaded into edit layout where you could change the color or maybe even change the shape again maintaning the color?

    Any Ideas? Using PNG files

  • Ok.yeah I see the value behind the Group_ID variable now. The container function was how I was able to get around this problem at first but the variable seems like a much better way of handling it. Guessing I need to move into arrays in the end as I need some way of passing the randomly generated image to a edit Page (Another Layout)

    and/or I'm thinking the best practice would be to have a function making the random value - then sending the random value to the variable. As apposed to having the variable instance frame or color be a random itself.

  • Thanks Kriand,

    The frames work much better then all the separate animations. However I have a question for you. I need to make many instantiations of this object grouping. If I just copy and paste the instance I get some weird interaction between the instances. Example changing the color value of the piece by clicking on it changes not only the piece you are on but the other instantiation as well. When I put the object sprites into a container everything works great. No crossover problems at all. But The problem lies in the other places I want to use the "charms" - These other places need only one "charm" loaded but now it thinks it needs to load all the container items. Can you point me in the right direction to handle this?

    Example attached - See that the "bars" work fine in the container but now the "post" tab items are getting effected by the container as well. What would be the best practice here to get around this problem?

    1drv.ms/u/s!AjhAqDbxsedphDcktr58-qxN5r9g

  • Hi kriand,

    Getting weird results but maybe its from not being able to put RndFrame in the Set Animation command.

    If you get a chance maybe look it over for me.

    Thanks

    1drv.ms/u/s!AjhAqDbxsedphDVar8ZR1XAlkW0Y