28.02.2013, 10:54
Hello, So im trying to sync my traffic lights to my Gates that Lower and lift on a timer, now im not soo good at maths, nor do i know how to do this, so if anyone could please help me that would be GREAT! 
Now this is my timer:
Now The Timer Works Great (thanks to DaRk_RaiN)
So i want the timer to sync to the traffic lights
the traffic lights stay on for about 32 seconds
Red - 20 seconds
Yellow - 2 seconds
Green - 10 seconds
Some Screenshots of what i mean:
http://imgur.com/IxnQFtr&zEvGTYI&pzC4fuS#0
http://imgur.com/IxnQFtr&zEvGTYI&pzC4fuS#1
http://imgur.com/IxnQFtr&zEvGTYI&pzC4fuS#2
I know this is kinda hard, but ANY HELP is Greatly appreciated

Now this is my timer:
Quote:
new drag1; new drag2; new DragPos; |
Quote:
public OnGameModeInit() { SetTimer("Drag",10*1000,1); DragPos = 0; drag1 = CreateObject(970, -172.43, 1409.84, 66.71, 0.00, 0.00, 90.00); drag2 = CreateObject(970, -172.43, 1404.64, 66.71, 0.00, 0.00, 90.00); |
Quote:
} forward Drag(); public Drag() { switch(DragPos) { case 0: { MoveObject(drag1, -172.43, 1409.84, 65.87 , 5.00); MoveObject(drag2, -172.43, 1404.64, 65.87 , 5.00); DragPos ++; return 1; } case 1: { MoveObject(drag1, -172.43, 1409.84, 66.71 , 5.00); MoveObject(drag2, -172.43, 1404.64, 66.71 , 5.00); DragPos = 0; return 1; } } return 1; } |
So i want the timer to sync to the traffic lights
the traffic lights stay on for about 32 seconds
Red - 20 seconds
Yellow - 2 seconds
Green - 10 seconds
Some Screenshots of what i mean:
http://imgur.com/IxnQFtr&zEvGTYI&pzC4fuS#0
http://imgur.com/IxnQFtr&zEvGTYI&pzC4fuS#1
http://imgur.com/IxnQFtr&zEvGTYI&pzC4fuS#2
I know this is kinda hard, but ANY HELP is Greatly appreciated
