View Full Version : Vehicle open doors
GAIGHER
July 14th, 2010, 10:24 AM
Salut les gens
:suicide:
Can we do that opens the vehicle door ?
(.device_machine)
Merci les gens
Inferno
July 14th, 2010, 01:42 PM
It is possible to do with scripts. You would have to make a trigger volume on the door and when a player drives up to it you use device_set_position 1.
davidd
July 15th, 2010, 05:10 AM
Thank you Inferno
GAIGHER
July 15th, 2010, 12:13 PM
Thank !
:downsgun:
I thought not succeed.
I knew not where to place "device_set_position 1" :-3
I have written a script , with little hope.
Functioning !
My script:
(script continuous open_door
(if (= (volume_test_object trigg1 vehicle1) true)
(device_set_position door1 1.0)
)
)
In Sapien:
(does not works in Sapien)
http://img651.imageshack.us/img651/7409/sapien.jpg
In Game:
(works just in game)
http://img155.imageshack.us/img155/6849/openk.jpg
:neckbeard: THX Inferno !
GAIGHER
July 25th, 2010, 06:07 PM
Does not work in multiplayer.
:gonk:
(script continuous open_door
(if (= (volume_test_object trigg1 vehicle1) true)
(device_set_position door1 1.0)
)
)
What view Host:
(Door is open for Host)
http://img227.imageshack.us/img227/5616/hosto.jpg
What view No Host:
(Door is closed for No Host)
http://img689.imageshack.us/img689/7096/nohost.jpg
I tested:
(I used "death box" script)
(script continuous open_door
(begin
(if (= (volume_test_object trigg1 (list_get (players) 0)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 1)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 2)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 3)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 4)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 5)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 6)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 7)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 8)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 9)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 10)) true)
(begin
(device_set_position door1 1.0)
)
)
( if (= (volume_test_object trigg1 (list_get (players) 11)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 12)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 13)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 14)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 15)) true)
(begin
(device_set_position door1 1.0)
)
)
)
)
It works. :neckbeard:
I tested to more doors.
The script:
(3 doors , 3 triggers)
(script continuous open_door
(begin
(if (= (volume_test_object trigg1 (list_get (players) 0)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 1)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 2)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 3)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 4)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 5)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 6)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 7)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 8)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 9)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 10)) true)
(begin
(device_set_position door1 1.0)
)
)
( if (= (volume_test_object trigg1 (list_get (players) 11)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 12)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 13)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 14)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg1 (list_get (players) 15)) true)
(begin
(device_set_position door1 1.0)
)
)
(if (= (volume_test_object trigg2 (list_get (players) 0)) true)
(begin
(device_set_position door2 1.0)
)
)
(if (= (volume_test_object trigg2 (list_get (players) 1)) true)
(begin
(device_set_position door2 1.0)
)
)
(if (= (volume_test_object trigg2 (list_get (players) 2)) true)
(begin
(device_set_position door2 1.0)
)
)
(if (= (volume_test_object trigg2 (list_get (players) 3)) true)
(begin
(device_set_position door2 1.0)
)
)
(if (= (volume_test_object trigg2 (list_get (players) 4)) true)
(begin
(device_set_position door2 1.0)
)
)
(if (= (volume_test_object trigg2 (list_get (players) 5)) true)
(begin
(device_set_position door2 1.0)
)
)
(if (= (volume_test_object trigg2 (list_get (players) 6)) true)
(begin
(device_set_position door2 1.0)
)
)
(if (= (volume_test_object trigg2 (list_get (players) 7)) true)
(begin
(device_set_position door2 1.0)
)
)
(if (= (volume_test_object trigg2 (list_get (players) 8)) true)
(begin
(device_set_position door2 1.0)
)
)
(if (= (volume_test_object trigg2 (list_get (players) 9)) true)
(begin
(device_set_position door2 1.0)
)
)
(if (= (volume_test_object trigg2 (list_get (players) 10)) true)
(begin
(device_set_position door2 1.0)
)
)
( if (= (volume_test_object trigg2 (list_get (players) 11)) true)
(begin
(device_set_position door2 1.0)
)
)
(if (= (volume_test_object trigg2 (list_get (players) 12)) true)
(begin
(device_set_position door2 1.0)
)
)
(if (= (volume_test_object trigg2 (list_get (players) 13)) true)
(begin
(device_set_position door2 1.0)
)
)
(if (= (volume_test_object trigg2 (list_get (players) 14)) true)
(begin
(device_set_position door2 1.0)
)
)
(if (= (volume_test_object trigg2 (list_get (players) 15)) true)
(begin
(device_set_position door2 1.0)
)
)
(if (= (volume_test_object trigg3 (list_get (players) 0)) true)
(begin
(device_set_position door3 1.0)
)
)
(if (= (volume_test_object trigg3 (list_get (players) 1)) true)
(begin
(device_set_position door3 1.0)
)
)
(if (= (volume_test_object trigg3 (list_get (players) 2)) true)
(begin
(device_set_position door3 1.0)
)
)
(if (= (volume_test_object trigg3 (list_get (players) 3)) true)
(begin
(device_set_position door3 1.0)
)
)
(if (= (volume_test_object trigg3 (list_get (players) 4)) true)
(begin
(device_set_position door3 1.0)
)
)
(if (= (volume_test_object trigg3 (list_get (players) 5)) true)
(begin
(device_set_position door3 1.0)
)
)
(if (= (volume_test_object trigg3 (list_get (players) 6)) true)
(begin
(device_set_position door3 1.0)
)
)
(if (= (volume_test_object trigg3 (list_get (players) 7)) true)
(begin
(device_set_position door3 1.0)
)
)
(if (= (volume_test_object trigg3 (list_get (players) 8)) true)
(begin
(device_set_position door3 1.0)
)
)
(if (= (volume_test_object trigg3 (list_get (players) 9)) true)
(begin
(device_set_position door3 1.0)
)
)
(if (= (volume_test_object trigg3 (list_get (players) 10)) true)
(begin
(device_set_position door3 1.0)
)
)
( if (= (volume_test_object trigg3 (list_get (players) 11)) true)
(begin
(device_set_position door3 1.0)
)
)
(if (= (volume_test_object trigg3 (list_get (players) 12)) true)
(begin
(device_set_position door3 1.0)
)
)
(if (= (volume_test_object trigg3 (list_get (players) 13)) true)
(begin
(device_set_position door3 1.0)
)
)
(if (= (volume_test_object trigg3 (list_get (players) 14)) true)
(begin
(device_set_position door3 1.0)
)
)
(if (= (volume_test_object trigg3 (list_get (players) 15)) true)
(begin
(device_set_position door3 1.0)
)
)
)
)
In Sapien:
http://img137.imageshack.us/img137/927/trigg.jpg
It works , if we exceed not more than 4 players. :ohdear:
(the door closed , in the arrival of a 4th player)
http://img413.imageshack.us/img413/5527/opendoor.jpg
What to do ? :ugh:
THX All , Sry for Up :cop:
Donut
July 28th, 2010, 11:24 PM
for multiplayer doors to sync, you have to have to make it so when a player is in a trigger volume, it spawns a vehicle that kills a biped. vehicles and bipeds both sync, but devices dont. have the script check for the death of the biped, and if the biped is dead, open the door.
... but youre using a trigger volume, and player positions obviously sync, so why isnt it working without that vehicle biped fix?
E: can somebody confirm what i just said? that was all from memory of over 2 or 3 years ago.
staticchanger
July 29th, 2010, 12:31 AM
Correct me if I'm wrong but the biped doesn't actually sync it's just the fact that it doesn't move, which causes it to get killed on all clients by the syncing vehicle. Would attaching an AI to the vehicle cause the door to open? I can't remember if AI could trigger those doors.
Edit: I was confused also as too why the trigger volumes weren't working. I created a light bridge that synced perfectly online (i think 10 was the most we ever had in it) using two trigger volumes as on/off switches.
Inferno
July 29th, 2010, 02:06 PM
Copied from the Yoyov2Script.
/// these scripts run the gates. when the button is pushed the host drops a vehicle repeatedly on top of the on biped. this causes the doors to move into the closed position. then when the button is turned off ( or the automatic re-open activates after 30 seconds) the vehicle is teleported over the off biped and the doors reopen
(script continuous "gateflag1_check"
(if ( = (device_get_position gateflag1_control) 1 )
(begin (object_teleport gateflag1_crusher gateflag1_open_flag) (sleep 15) )
(begin (object_teleport gateflag1_crusher gateflag1_closed_flag) (sleep 15) )
)
)
(script continuous "gateflag1_auto"
(sleep_until ( = (device_get_position gateflag1_control) 1 ) )
(sleep 1800)
(device_set_position gateflag1_control 0)
)
(script continuous "gateflag1_sync"
(if ( < (unit_get_health gateflag1_open_biped) 0.1 )
(begin (device_set_position gateflag1_machine 1) (object_create_anew gateflag1_closed_biped) (object_create_anew gateflag1_open_biped) (sleep 15) )
)
(if ( < (unit_get_health gateflag1_closed_biped) 0.1 )
(begin (device_set_position gateflag1_machine 0) (object_create_anew gateflag1_open_biped) (object_create_anew gateflag1_closed_biped) (sleep 15) )
)
)
GAIGHER
July 31st, 2010, 03:59 PM
Yes , I had heard talk this proceed.
I edit the script , it works :woop:
(I did not want to "control")
My script:
(script continuous "door_opened"
(if ( = (volume_test_object trigger vehicle) true)
(begin (object_teleport vehicle_crusher flag_biped) (sleep 02) )
(begin (object_teleport vehicle_crusher flag_none) (sleep 02) )
)
(if ( < (unit_get_health biped) 0.1 )
(begin (device_set_position door 1) (object_create_anew biped) (sleep 01) )
)
)
In Sapien:
http://img266.imageshack.us/img266/8574/tutoz.png
Explication:
When the "vehicle" penetrates in "trigger" , the "vehicle_crusher" teleports on "flag_biped" , the "biped" dies , the door opens.
The "vehicle" fate of "trigger" , the "vehicle_crusher" teleports on "flag_none" , the "biped" not dies , the door closes.
:ugh:
I noticed that two biped appears for the No Host.
And sometimes the 1st pushes the 2nd in outside.
(beyond the reach of crusher)
http://img571.imageshack.us/img571/3827/pouser.jpg
(after several openings a biped is at the outside , for the No Host)
Beyond the reach of crusher.
(the door closes for No Host)
http://img697.imageshack.us/img697/6610/pargner.jpg
(it correct positioning of the biped)
My script for 3 door and 3 vehicles :ugh: :
(script continuous "door1_opened"
(if ( = (volume_test_object trigg_1 v1) true)
(begin (object_teleport v1_crusher flag_biped_1) (sleep 02) )
(begin (object_teleport v1_crusher flag_none_1) (sleep 02) )
)
(if ( = (volume_test_object trigg_1 v2) true)
(begin (object_teleport v1_crusher flag_biped_1) (sleep 02) )
(begin (object_teleport v1_crusher flag_none_1) (sleep 02) )
)
(if ( = (volume_test_object trigg_1 v3) true)
(begin (object_teleport v1_crusher flag_biped_1) (sleep 02) )
(begin (object_teleport v1_crusher flag_none_1) (sleep 02) )
)
(if ( = (volume_test_object trigg_1 v4) true)
(begin (object_teleport v1_crusher flag_biped_1) (sleep 02) )
(begin (object_teleport v1_crusher flag_none_1) (sleep 02) )
)
(if ( < (unit_get_health biped_1) 0.1 )
(begin (device_set_position door_1 1) (object_create_anew biped_1) (sleep 01) )
)
)
(script continuous "door2_opened"
(if ( = (volume_test_object trigg_2 v1) true)
(begin (object_teleport v2_crusher flag_biped_2) (sleep 02) )
(begin (object_teleport v2_crusher flag_none_2) (sleep 02) )
)
(if ( = (volume_test_object trigg_2 v2) true)
(begin (object_teleport v2_crusher flag_biped_2) (sleep 02) )
(begin (object_teleport v2_crusher flag_none_2) (sleep 02) )
)
(if ( = (volume_test_object trigg_2 v3) true)
(begin (object_teleport v2_crusher flag_biped_2) (sleep 02) )
(begin (object_teleport v2_crusher flag_none_2) (sleep 02) )
)
(if ( = (volume_test_object trigg_2 v4) true)
(begin (object_teleport v2_crusher flag_biped_2) (sleep 02) )
(begin (object_teleport v2_crusher flag_none_2) (sleep 02) )
)
(if ( < (unit_get_health biped_2) 0.1 )
(begin (device_set_position door_2 1) (object_create_anew biped_2) (sleep 01) )
)
)
(script continuous "door3_opened"
(if ( = (volume_test_object trigg_3 v1) true)
(begin (object_teleport v3_crusher flag_biped_3) (sleep 02) )
(begin (object_teleport v3_crusher flag_none_3) (sleep 02) )
)
(if ( = (volume_test_object trigg_3 v2) true)
(begin (object_teleport v3_crusher flag_biped_3) (sleep 02) )
(begin (object_teleport v3_crusher flag_none_3) (sleep 02) )
)
(if ( = (volume_test_object trigg_3 v3) true)
(begin (object_teleport v3_crusher flag_biped_3) (sleep 02) )
(begin (object_teleport v3_crusher flag_none_3) (sleep 02) )
)
(if ( = (volume_test_object trigg_3 v4) true)
(begin (object_teleport v3_crusher flag_biped_3) (sleep 02) )
(begin (object_teleport v3_crusher flag_none_3) (sleep 02) )
)
(if ( < (unit_get_health biped_3) 0.1 )
(begin (device_set_position door_3 1) (object_create_anew biped_3) (sleep 01) )
)
)
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.