
DarkLord0912
Joined: Jan 17, 2009
Works on bigger and better things
|
Posted: Mar 6, 2009 02:30 AM
Msg. 1 of 18
Yeah was wondering if anyone knows how to make the prison cell doors work on a50 u know the ones Captain keyes is locked behind>>>
Yeah I know how to place them and assign a device group and a control to them but when u hit the switch nothing happends?
|
|
|

Polamee
Joined: Feb 25, 2008
MP2SPMT's founder
|
Posted: Mar 6, 2009 04:17 AM
Msg. 2 of 18
Meh. use object_destroy to destroy them after you hit the switch in a script.
|
|
|

DarkLord0912
Joined: Jan 17, 2009
Works on bigger and better things
|
Posted: Mar 6, 2009 09:53 AM
Msg. 3 of 18
O Ididn't know how to set up a script for it>>> Just for some other things?
|
|
|

OpsY
Joined: Feb 19, 2007
Frobisher Bay
|
Posted: Mar 6, 2009 10:11 AM
Msg. 4 of 18
basically device groups and such are only for SP. If you want to use them online, you have to add scripts to make them sync else only host will see it working properly
|
|
|

DarkLord0912
Joined: Jan 17, 2009
Works on bigger and better things
|
Posted: Mar 6, 2009 09:32 PM
Msg. 5 of 18
It's for SP and I still don't know how to get it working?
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Mar 6, 2009 09:37 PM
Msg. 6 of 18
I'm not sure how to set up the door to open when the control is hit, but do something like this: (script startup script ([code for device]) (object_destroy [name of door]) )
I'm pretty sure you know what to replace [name of door] with...
|
|
|

DarkZealot
Joined: Jan 1, 2008
Time management: 40% Xbox, 30% PC, 30% Skating
|
Posted: Mar 6, 2009 10:04 PM
Msg. 7 of 18
There is a permutation for it. You could use object_set_permutation but object_destroy works better IMO.
|
|
|

MissingSpartan7
Joined: Feb 19, 2009
I abandoned this forum a long time ago...
|
Posted: Mar 6, 2009 10:35 PM
Msg. 8 of 18
Quote: --- Original message by: DarkLord0912 Yeah was wondering if anyone knows how to make the prison cell doors work on a50 u know the ones Captain keyes is locked behind>>>
Yeah I know how to place them and assign a device group and a control to them but when u hit the switch nothing happends? i thought i went throught this with you. *remembers* zteam released their campaign scripts with all the coding! back in sec Edited by MissingSpartan7 on Mar 6, 2009 at 10:37 PM
|
|
|

DarkLord0912
Joined: Jan 17, 2009
Works on bigger and better things
|
Posted: Mar 6, 2009 10:44 PM
Msg. 9 of 18
Waht u mean the zteam where's it at?
|
|
|

MissingSpartan7
Joined: Feb 19, 2009
I abandoned this forum a long time ago...
|
Posted: Mar 6, 2009 10:54 PM
Msg. 10 of 18
zteam released their campaign scripts, its on halomaps- search "zteam" anyway...
(object_set_permutation *prison_door_name* "" "door_off-100" )
Edited by MissingSpartan7 on Mar 6, 2009 at 10:56 PM
|
|
|

DarkLord0912
Joined: Jan 17, 2009
Works on bigger and better things
|
Posted: Mar 6, 2009 11:07 PM
Msg. 11 of 18
Okay yeah I found the zteam scripts WOW! So much LOL yeah missing spartan7 I'll try what u posted give me a sec..
Hey spartan 7 is there suppose to be more to it cuz it wan't work by it's self? Edited by DarkLord0912 on Mar 6, 2009 at 11:11 PM
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Mar 7, 2009 12:20 AM
Msg. 12 of 18
I thought I told you....
Every script MUST have a header, aka (script startup / dormant / continuous / static / stub.
In this case, use (script startup
Then you must have a condition to sleep until, otherwise it won't change it when you want it to, aka the code for the device.
|
|
|

DarkLord0912
Joined: Jan 17, 2009
Works on bigger and better things
|
Posted: Mar 7, 2009 12:42 AM
Msg. 13 of 18
Okay that worked but It made the door go away as soon as the map started...I wanted it to go away when u hit a switch?
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Mar 7, 2009 12:45 AM
Msg. 14 of 18
Quote: --- Original message by: Gamma927 I thought I told you....
Every script MUST have a header, aka (script startup / dormant / continuous / static / stub.
In this case, use (script startup
Then you must have a condition to sleep until, otherwise it won't change it when you want it to, aka the code for the device. Edit: Oh, I think you wanted the code... Here's what I got from Zteam's scripts: (sleep_until (= (device_group_get prison_a_switch_position )1 ))
REMEMBER: NEVER USE IT ALONE. In this case, use it in front of the object_set_permutation. I believe that the switch is called prison_a_switch_position, and the doors will unlock when you turn it on. Here's the full code: (script dormant mig_marines_prison_a (sleep_until (= (device_group_get prison_a_switch_position )1 )) (begin_random (begin (device_group_set prison_door_a_position_a 1 )(sleep (random_range 20 45 ))) (begin (device_group_set prison_door_a_position_b 1 )(sleep (random_range 20 45 ))) (begin (device_group_set prison_door_a_position_c 1 )(sleep (random_range 20 45 )))(begin (device_group_set prison_door_a_position_d 1 )(sleep (random_range 20 45 )))) (object_set_permutation cell_a_door_a "" "door_off-100" ) (object_set_permutation cell_a_door_b "" "door_off-100" ) (object_set_permutation cell_a_door_c "" "door_off-100" ) (object_set_permutation cell_a_door_d "" "door_off-100" ) (object_set_permutation cell_a_door_e "" "door_off-100" ) (object_set_permutation cell_a_door_f "" "door_off-100" ) (object_set_permutation cell_a_door_g "" "door_off-100" )(object_set_permutation cell_a_door_h "" "door_off-100" ))
Edited by Gamma927 on Mar 7, 2009 at 12:47 AM
|
|
|

DarkLord0912
Joined: Jan 17, 2009
Works on bigger and better things
|
Posted: Mar 7, 2009 01:17 AM
Msg. 15 of 18
Hey thanks gamma and everyone else I got it working :)
|
|
|

PVT Jenkins
Joined: Feb 23, 2009
Advance!!!!!
|
Posted: Mar 7, 2009 12:02 PM
Msg. 16 of 18
Hey on the script how do you get a marine with his flashlight on
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Mar 7, 2009 12:04 PM
Msg. 17 of 18
Do you know how to create and compile a script?
|
|
|

MissingSpartan7
Joined: Feb 19, 2009
I abandoned this forum a long time ago...
|
Posted: Mar 8, 2009 12:11 AM
Msg. 18 of 18
obviously he doesn't there's probly a script in a50 (truth and rec) somewhere
|
|
|