//well this 1 got me thinking and i like to help where possible sooo...
//here's my solution
//make the trigger "bridge_on" extend to reach both "trigger_A" triggers
//delete the two "trigger_A" triggers
//...side...bridge1...bridge2...bridge3...side...// is this how the bridge works?
bridge_prep:
$bridge1 time 2
$bridge2 time 2
$bridge3 time 2
end
bridge_sway_on:
level.wackos_swayer = randomint (2) // will create a number 0, or 1
if (level.wackos_swayer == 0) // if left is chosen (0)
{
(level.sway_start = randomint (3) + 1 // will create a number 1, 2, or 3
}
else
{
(level.sway_start = randomint (3) + 6 // will create a number 6, 7, or 8
}
thread swaying // starts the motion
end
swaying:
if (parm.other istouching $bridge_on) // if any1 is touching the trigger
// which will be true when activated
// if ($player istouching $bridge_on) // use this if testing in single player
$bridge_on nottriggerable // stops other players interfering
{
switch level.sway_start // choose the outcome of the integer
{
case 1: // option 1
$bridge1 rotateXupto 8
$bridge1 move
// move the 1st part 8 degrees as u know
$bridge2 rotateXupto 12
$bridge2 move
// move the 2nd part 12 degrees
$bridge3 rotateXupto 8
$bridge3 waitmove
// move the 3rd part the same as the 1st
level.sway_start = randomint (4) + 5 // creates the next random position
// only ends once bridge2 has finished
thread swaying // starts the sway again
break // ends the switch command
case 2: // option 2
$bridge1 rotateXupto 4
$bridge1 move
$bridge2 rotateXupto 6
$bridge2 move
$bridge3 rotateXupto 4
$bridge3 waitmove
level.sway_start = randomint (4) + 5
thread swaying
break
case 3: // option 3
$bridge1 rotateXupto 2
$bridge1 move
$bridge2 rotateXupto 3
$bridge2 move
$bridge3 rotateXupto 2
$bridge3 waitmove
level.sway_start = randomint (4) + 5
thread swaying
break
case 4: // option 4
$bridge1 rotateXupto 0
$bridge1 move
$bridge2 rotateXupto 0
$bridge2 move
$bridge3 rotateXupto 0
$bridge3 waitmove
level.sway_start = randomint (4) + 5
thread swaying
break
case 5: // option 5
$bridge1 rotateXdownto 0
$bridge1 move
$bridge2 rotateXdownto 0
$bridge2 move
$bridge3 rotateXdownto 0
$bridge3 waitmove
level.sway_start = randomint (4) + 1
thread swaying
break
case 6: // option 6
$bridge1 rotateXdownto 358
$bridge1 move
$bridge2 rotateXdownto 357
$bridge2 move
$bridge3 rotateXdownto 358
$bridge3 waitmove
level.sway_start = randomint (4) + 1
thread swaying
break
case 7: // option 7
$bridge1 rotateXdownto 356
$bridge1 move
$bridge2 rotateXdownto 354
$bridge2 move
$bridge3 rotateXdownto 356
$bridge3 waitmove
level.sway_start = randomint (4) + 1
thread swaying
break
case 8: // option 8
$bridge1 rotateXdownto 352
$bridge1 move
$bridge2 rotateXdownto 348
$bridge2 move
$bridge3 rotateXdownto 352
$bridge3 waitmove
level.sway_start = randomint (4) + 1
thread swaying
break
}
}
else
{ // stop swaying
if level.sway_start >> 4) // bridge's last move was right
{
$bridge1 rotateXupto 0
$bridge1 move
$bridge2 rotateXupto 0
$bridge2 move
$bridge3 rotateXupto 0
$bridge3 waitmove
}
else
{ //bridge's last move was left
$bridge1 rotateXdownto 0
$bridge1 move
$bridge2 rotateXdownto 0
$bridge2 move
$bridge3 rotateXdownto 0
$bridge3 waitmove
}
$bridge_on triggerable
}
end