How do I go about fixing this (as far as I'm aware) inexplicable bug in my game?

0 favourites
  • 3 posts
From the Asset Store
The ultimate voice pack filled with 1,536 files of .......wav and mp3 of individual numbers, letters, and words (that go
  • I rarely use this forum for help anymore, because I normally just push myself to test a million different things, and I either always end up either figuring it out, or deeming it not worth the headache. HOWEVER, I just now found an issue that defies all visible logic. I'm sure there's a proper explanation for this, and one that I'm just not able to see, and I need help.

    So, the issue is this:

    In my platformer game, there's a course element, I wouldn't quite call it an enemy or obstacle. It's a head with four arms, each arm carrying a platform in its hand. The hands orbit around the head, and the arms turn to face the hands, giving off the illusion that the arms are connected to the hands. The hands are connected to the head via a variable called "Family". For example, hands with a Family of 0 orbit the head that has a Family of 0. Upon the creation of the head, it creates four hands and four arms, with each having their own ID, which determines their offset in the orbit. 0 = 0°, 1 = 90°, 2 = 180°, and 3 = 270°.

    When I finished making this system, and I tested it, it worked wonderfully. Then. T h e n. I put two heads in the layout. The the first instance of a head has four hands, and four arms. The second instance has no hands, and four arms that don't function correctly. Upon launching it in debug mode, it was revealed that both sets of hands were orbiting the first head.

    I've been scratching my head for the past 15 minutes, ready to explode with frustration at what my brain considers an illogical issue.

    This is the orbiting event. Yes, all the hands, arms, and heads have have their values set to the correct things, however, they still don't work. I've checked several times with debug mode, the variables aren't wrong. Please help

    (inb4 the flaw is obvious to everyone but me)

  • Your picking event is wrong. You need something like this:

    System For each Head
    	Hand compare instance variable Family=Head.Family
    		Hand set position .....
    
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • dop2000

    That did the trick!

    Thank you!

    media.giphy.com/media/KfSvUu5HCkgBMMUkfq/giphy.gif

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