deadeye's Recent Forum Activity

  • It's a bigger problem than you might think.

  • Good going alee, you're the harbinger of doom.

  • He means on the layout itself, not how it shows up in the event editor or in the layers tab or whatever.

  • A bit off topic though, but do i care? Nahh

    I've never been to France.

  • You could always just make your default animation whatever icon you want, then at runtime do "Start of layout > StarSprite > Change animation to 'stars'."

  • Okay Secret Sally, I think people have squeezed enough information out of you to actually be able to help now.

    Use one detector and a series of two loops to load your array.

    Let's set a couple of ground rules first:

    We're using your grid picture in the first post as reference (nine by five grid)

    Box 1 is located at 0,0

    Every box is 32x32px

    Your collider object is 32x32px

    Your collider object has a cell counter to keep track of which grid space it is over

    The places where your Collider detects an impassable area are all in the family "Hard"

    You will be using two loops in a nest, the "outer" loop runs five times (for grid rows) and your "inner" loop runs nine times (for grid columns)

    This example uses a string to store the info, like you asked, but you could modify it to use an array

    There are two text objects, "collisionText" and "freespaceText" to store the strings

    Obviously, your real setup might be different but this is just an example

    Okay, let's start:

    1. Before the loop, reset all of your strings to empty (not "0", just nothing at all. No space between quotes.)

    2. Set your collider object to 0,0

    3. Set your collider object's counter to 1

    4. Start your loops:

    + On loop "loopRow"
      +Repeat 9 times
        +Detector overlaps "Hard"
        +Detector.Value('counter') = 1
          - collisionText: Set text to Detector.Value('counter')
        +Detector overlaps "Hard"
        +Detector.Value('counter') > 1
          - collisionText: Set text to collisionText.text & ", " & Detector.Value('counter')
        +Detector does not overlap "Hard"
        +Detector.Value('counter') = 1
          - freespaceText: Set text to Detector.Value('counter')
        +Detector oes not overlap "Hard"
        +Detector.Value('counter') > 1
          - freespaceText: Set text to freespaceText.text & ", " & Detector.Value('counter')
        + Always
          - Add 1 to Detector.Value('counter')
          - Detector: Set X to Detector.X + 32
    + On loop "loopRow"
      - Detctor:  Set Y to Detector.Y + 32
      - Detector: Set X to 0
    [/code:1it2l6qf]
    
    That's a total of eight events for the loops, and that includes the redundant events to make sure that the counter is at 1 so it doesn't put a comma at the beginning.  Of course I'm just doing this off the top of my head so it might need some tweaking but the basic idea is there.
    
    Edit:
    Also, in the future I suggest you give as much information as possible when asking for help, and don't hold back if someone asks for more info.  It just makes it more difficult to help.
  • (It probably died here by not defining that I was trying to use two different instances of one object)

    Quite likely. Here's an example of ropes made with create hinge that I did a million years ago:

    http://www.mediafire.com/?ycbtzlb12nd (Arrow keys to move)

    Each rope segment is a separate object though, not instances of the same sprite. Yes, it was a pain in the ass to make. Yes, it is terribly inefficient to do things this way. But it works.

  • My questions are relevant. I asked them for a reason, to try to work out a different, easier method of detection. Collision is tied into movement which is tied into control. The three have to work together.

    Edit:

    Anyway, what I mean is, if I knew what you were trying to do, perhaps I could come up with a different method for you that maybe you haven't thought of. A fresh perspective, so to speak. But I can't do that unless I know what's going on.

  • Need more information:

    How is the object moved? Is it a click in a gridspace or is it with the keyboard?

    What type of movement is going on here? Will the green box teleport to it's new location or "slide" to it's new location?

    Is that brown rectangle a platform? Is there gravity? Or is this a top-down view and the brown thing is a wall?

    Edit: Why do you need a list of strings with the cell numbers?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you're just moving it a few pixels then why move it at all? Do it with sprite animation frames. Just make a "recoil" animation.

  • You could do it like this:

    + On "Beat Horse" pressed
    + horse.Value('life') Equal to 0
    [ul]
    	[li]SuperV: Set position to 4chan[/li]
    [/ul][/code:1359bne6]
  • Even if I straight up said "Linux sucks" it still wouldn't have anything to do with you. If I was making fun of you, you'd know it.

    Do I think portability is good? Yes.

    Do I think that Construct for Linux would be good? Yes.

    Should I stop myself from making a joke and having fun on the forum? HELL NO. So just chill.

deadeye's avatar

deadeye

Member since 11 Nov, 2007

Twitter
deadeye has 1 followers

Trophy Case

  • Email Verified

Progress

17/44
How to earn trophies