push box olap [solved]

This forum is currently in read-only mode.
From the Asset Store
Push the Box Puzzle Game likes Sokoban made with Illustrator
  • Howdy yall...So, I haven't been able to visit this site since before Christmas and as I'm trying to catch up on my own, I have 2 specific questions.

    I had a problem with "push code" or power struggle code; where there's two characters (of the same family, or duplicated family), each pushing a box (or two/three boxes), from opposite sides (left or right). One would think this is simple; however, the major problem was that in the long run, whatever side was coded last would always end up winning when both sides supposedly had equal values, especially when 'speed' aka timedelta or just a generic added number was introduced. Meaning with 'speed' increasing for the family every tick, if I put the family's code for moving left (or pushing the box left) last it will automatically win and start pushing the other objects to the left and vice versa if I put right last. Is there a workaround for this, or something I missed? I tried many different approaches with this, all to fail as soon as either WHILE is introduced for the solids, or timedelta for speed. (UPDATE: with one of the newer builds I can get it to do what I want only now it looks wierd because objects are sometimes not pushed out all the way; however, they still keep an equilibrium.) Here a file with one of the simplest of the many approaches I tried. http://files.filefront.com/LASTCodedSid ... fo.html%20 or

    http://www.mediafire.com/?sharekey=9bed ... f6e8ebb871

    Also, have you guys thought about the option/ability to make groups local? As in if I make 16 groups named "do this" when I disable a group in a sub event, it doesn't disable them all. Only the ones within in the group or the parent (or I can somehow pick which one I want to disable). Why? So I can use it to bypass most complicated picking and just assign all characters a group containing a long list of groups in sub-events that do all the actions in their own little world sort to speak. Allowing me to toggle between enabling and disabling in a neat and clean way and just basically skip the picking, and also save on the massive amount of Pvariables that are needed. All I would need to do is copy and paste, just rename the first or original parent, and somehow assign it to a character via a gVariable or such. And yes, I am aware enable/disable currently is just a trigger.

    Construct 2, nice!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • (Moved thread to Help/Tech)

    [quote:8i9tm885]Merry Christmax!

    Happy Easter! Wait, wtf?

    [quote:8i9tm885]I had a problem with "push code" or power struggle code where there's two characters from opposite sides.

    It's a matter of thinking inside the box, so to speak. Add up a "speed" value for each box based on how many objects are pushing it, then move the box.


    It's a little jittery, but that's due to the 8Dir stopping and starting at the edge of the solid boxes. It could be fixed with some tweaking, probably. Also, I didn't want to mess around with 800 families and 2000 pv's so I made my own .cap that uses just one family and three pv's. But you could probably adapt this method into your own .cap.

    As for the group issue... not sure about that one.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)