• Connection Minigame
    0 replies, posted
So I've been working on a little minigame, like those Wire conneting games, we all know 'em, we have all played them. The thing is that mine was doing so good so far and then i saw this: It's all fine and dandy at first [img]http://img403.imageshack.us/img403/4615/hl22010112020084834.jpg[/img] and then: [img]http://img210.imageshack.us/img210/5373/hl22010112020085331.jpg[/img] This is my code for the energy connection: [lua] if button[i].OnRight != nil and button[i].OnRight.Powered == true and button[i].Right == true and button[i].OnRight.Left == true then button[i].PoweredFromRight = true else button[i].PoweredFromRight = false end if button[i].OnUp != nil and button[i].OnUp.Powered == true and button[i].Up == true and button[i].OnUp.Down == true then button[i].PoweredFromUp = true else button[i].PoweredFromUp = false end if button[i].OnDown != nil and button[i].OnDown.Powered == true and button[i].Down == true and button[i].OnDown.Up == true then button[i].PoweredFromDown = true else button[i].PoweredFromDown = false end if button[i].PoweredFromLeft or button[i].PoweredFromRight or button[i].PoweredFromUp or button[i].PoweredFromDown then button[i].Powered = true elseif button[i].PoweredFromLeft == false and button[i].PoweredFromRight == false and button[i].PoweredFromUp == false and button[i].PoweredFromDown == false then button[i].Powered = false end[/lua] I know what the problem is but no idea how to solve it. I'm aware it works like 1,2,3. If you cut out 2 then there will be no connection, but if you cut out 1, 2 will think 3 is the power source and vice versa. Help?
Sorry, you need to Log In to post a reply to this thread.