A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE Technical / Map Design »Armor Lock Script Help...

Author Topic: Armor Lock Script Help... (21 messages, Page 1 of 1)
Moderators: Dennis

tylerp14
Joined: Oct 12, 2010

Ohai der...


Posted: Apr 23, 2011 08:58 PM    Msg. 1 of 21       
Yea, I have a armor lock, a good one, its finished but one thing needs to be fixed. The timer. The way it currently is, you'll have how ever long you havent used it in + 30 seconds (so if you dont use it for 5 minutes, you'll have 5:30). I need to fix this so it works every 15 seconds. I'll post the whole script below, and if you want the Armor Lock when its finished (Will be finished when I get this done) PM me and I'll give it to you.

(global short armor_lock_timer 0)

(script continuous armorlockcheck
(sleep_until (= (vehicle_test_seat_list armor_lock a-driver (players)) false) 1)
(unit_set_enterable_by_player armor_lock false)
(object_set_collideable armor_lock false)
(sound_impulse_stop seanthelawn\halo_reach\characters\cyborg\armor_lock\sounds\armor_lock_loop)
(object_can_take_damage (unit (list_get (players) 0)))
(unit_impervious (players) false)
(object_destroy armor_lock)
)

(script continuous flashlightcheck
(sleep_until (and (= (unit_get_current_flashlight_state (unit (list_get (players) 0))) true)
(>= armor_lock_timer 30)) 1)
(object_create_anew armor_lock)
(object_set_collideable armor_lock true)
(unit_set_enterable_by_player armor_lock true)
(objects_attach (unit (list_get (players) 0)) body armor_lock body)
(objects_detach (unit (list_get (players) 0)) armor_lock)
(unit_enter_vehicle (unit (list_get (players) 0)) armor_lock a-driver)
(sound_impulse_start seanthelawn\halo_reach\characters\cyborg\armor_lock\sounds\armor_lock_loop armor_lock 1.00)
(sound_impulse_start seanthelawn\halo_reach\characters\cyborg\armor_lock\sounds\armor_lock_begin armor_lock 1.00)
(unit_set_enterable_by_player armor_lock false)
(object_cannot_take_damage armor_lock)
(object_cannot_take_damage (unit (list_get (players) 0)))
(unit_impervious (players) true)
)

(script continuous armor_lock_disable
(sleep_until (<= armor_lock_timer 30) 1)
(player_enable_input false)
(effect_new_on_object_marker "seanthelawn\halo_reach\characters\cyborg\armor_lock\effects\defensive detonation" armor_lock body)
(sleep 5)

(player_enable_input true)
(object_can_take_damage (unit (list_get (players) 0)))
(unit_impervious (players) false)
(unit_set_enterable_by_player armor_lock false)
(object_set_collideable armor_lock false)
(unit_exit_vehicle (unit (list_get (players) 0)))
(sound_impulse_stop seanthelawn\halo_reach\characters\cyborg\armor_lock\sounds\armor_lock_loop)
(sleep 1)
(object_destroy armor_lock)
)

(script continuous armor_lock_timer
(if (vehicle_test_seat_list armor_lock a-driver (players))
(set armor_lock_timer (- armor_lock_timer 1))
(set armor_lock_timer (+ armor_lock_timer 1))
)
)


Thanks a lot if you can help with this.
Aslo, can somebody re-write this so it works online for all 16 players?

Edited by tylerp14 on Apr 24, 2011 at 01:58 AM


cyboryxmen
Joined: Nov 7, 2010

--CG artist-- New mission. Refuse this Mission!


Posted: Apr 24, 2011 02:30 AM    Msg. 2 of 21       
You do know that this counts as double posting right?
-Zekilk


tylerp14
Joined: Oct 12, 2010

Ohai der...


Posted: Apr 24, 2011 02:33 AM    Msg. 3 of 21       
I posted this before I posted this in a comment about the other Armor Lock release.


cyboryxmen
Joined: Nov 7, 2010

--CG artist-- New mission. Refuse this Mission!


Posted: Apr 24, 2011 02:36 AM    Msg. 4 of 21       
Quote: --- Original message by: tylerp14
I posted this before I posted this in a comment about the other Armor Lock release.


Sounds reasonable. Now if you don't mind, how does this script work in summary?
-Zekilk


tylerp14
Joined: Oct 12, 2010

Ohai der...


Posted: Apr 24, 2011 04:35 AM    Msg. 5 of 21       
Bugs with Armor Lock in MP so far: When there are 2 players and when one uses armor lock while the other uses Armor Lock it teleports to other player to the player thats using AL (Armor Lock), and until the player using AL gets out of Armor Lock, you cant do anything. Next bug is when you crouch and use AL you fall through the map. Next bug after that is the nades dont deflect while using AL with this version. Next bug after that is it needs to work for all 16 players. Next bug after that is sheilds take damage. Next bug is when a vehicle hits you, like a warthog, when a warthog hits you the warthog just goes through the player when it should bounce off it or destroy it. Last bug known, the time needs to be activated for only 15 seconds then de-activate instead of being on forever. (Currently to get out of it you press E or wait until it dis-charges.)

I need to know how to fix these but I dont know how. I seriously need some help here, I cant be the only one trying to perfect Armor Lock for CE. I mean seriously guys...

Here's some pictures of it so far:



Edited by tylerp14 on Apr 24, 2011 at 05:25 AM


cyboryxmen
Joined: Nov 7, 2010

--CG artist-- New mission. Refuse this Mission!


Posted: Apr 24, 2011 09:31 AM    Msg. 6 of 21       
(global short armor_lock_timer 0)
(global short player_number 0)

(script static "unit" player
(unit (list_get (players) player_number))
)

(script continuous flashlightcheck
(sleep_until (and (unit_get_current_flashlight_state (player)) (> armor_lock_timer 14) ))
(player_enable_input 0)
(unit_set_enterable_by_player armor_lock 1)
(objects_attach (player) "body" armor_lock "body")
(objects_detach (player) armor_lock)
(unit_enter_vehicle (player) armor_lock "a-driver")
(object_set_collideable armor_lock 1)
(object_cannot_take_damage armor_lock)
(object_cannot_take_damage (player))
(unit_impervious (player) 1)
(unit_impervious armor_lock 1)
)

(script continuous armor_lock_disable
(sleep_until (= armor_lock_timer 0))
(effect_new_on_object_marker "seanthelawn\halo_reach\characters\cyborg\armor_lock\effects\defensive

detonation" armor_lock body)
(sleep 30)
(object_can_take_damage armor_lock)
(object_can_take_damage (player))
(unit_impervious (player) 0)
(unit_impervious armor_lock 0)
(unit_set_enterable_by_player armor_lock 0)
(object_set_collideable armor_lock 0)
(unit_exit_vehicle (unit (list_get (players) 0)))
(object_teleport armor_lock z_pot)
(player_enable_input 1)
)

(script continuous armor_lock_timer
(sleep 30)
(if (and (= (vehicle_test_seat_list armor_lock a-driver (player)) 0) (< armor_lock_timer 16))
(set armor_lock_timer (+ armor_lock_timer 1))
(set armor_lock_timer (- armor_lock_timer 1))
)
)

The script is now more organised with useless commands removed/replaced and it is now multiplayer friendly but the sounds were removed as it can be applied through the tags. You will also need to place a cutscene_flag somewhere out of sight called a z_pot.

The bugs that were fixed are:
Quote:
Next bug after that is sheilds take damage.
Next bug is when a vehicle hits you, like a warthog, when a warthog hits you the warthog just goes through the player when it should bounce off it or destroy it.
Last bug known, the time needs to be activated for only 15 seconds then de-activate instead of being on forever.

-Zekilk
Edited by cyboryxmen on Apr 24, 2011 at 09:32 AM


tylerp14
Joined: Oct 12, 2010

Ohai der...


Posted: Apr 24, 2011 02:55 PM    Msg. 7 of 21       
Im doing a different Armor Lock now. Can somebody write this script below to work for 2 extra players? So 3 players all together. If somebody can do do that for me I could figure out how to do 16 players if somebody writes it for 3 players to use in-game, I have 2 beta testers ready to try it with me, just have to wait until I get a script for 2 extra players.

(global short p0flashlight 0)
(global short p0charge 0)
(global short limit 15)
(global boolean p0alock 0)

(script static "unit" player
(unit (list_get (players) 0))
)

(script static "void" effectsmall
(effect_new_on_object_marker "armor_ability\lock\discharge small" (player) "body")
)
(script static "void" effectmedium
(effect_new_on_object_marker "armor_ability\lock\discharge medium" (player) "body")
)
(script static "void" effectlarge
(effect_new_on_object_marker "armor_ability\lock\discharge large" (player) "body")
)

(script continuous P0a
(sleep_until (unit_get_current_flashlight_state (player)) 1)
(set p0alock 1)
(unit_set_desired_flashlight_state (player) 0)
(sleep 30)
(sleep_until (or (= (vehicle_test_seat_list p0lock "crouch2" (players)) 0) (> p0flashlight limit)) 1)
(set p0alock 0)
)

(script continuous P0b
(sleep_until (= p0alock 1) 1)
(set rider_ejection 0)
(object_create_anew p0lock)
(objects_attach (player) "body" p0lock "body")
(objects_detach (player) p0lock)
(vehicle_load_magic p0lock "" (player))
(sleep 30)
(sleep_until (= p0alock 0) 1)
(vehicle_unload p0lock "")
(set rider_ejection 1)
(sleep 10)
(object_destroy p0lock)
)

(script continuous flashlightupdates
(sleep 30)
(if (or (= p0alock 1) (vehicle_test_seat_list p0lock "crouch2" (players)))
(begin (set p0flashlight (+ p0flashlight 1)) (set p0charge (+ p0charge 1)) )
(set p0flashlight (- p0flashlight 1))
)
)

(script continuous remove
(sleep_until (= (vehicle_test_seat_list p0lock "crouch2" (players)) 0) 1)
(object_destroy p0lock)
(if (> p0charge 3) (begin
(if (< p0charge 8) (effectsmall)
(if (< p0charge 12) (effectmedium) (effectlarge)
))
))
(set p0charge 0)
(sleep_until (= (vehicle_test_seat_list p0lock "crouch2" (players)) 1) 1)
)
(script continuous lolololol
(sleep_until (unit_get_current_flashlight_state p0lock) 1)
(vehicle_unload p0lock "")
)


Thanks if you can write it to work for 2 extra players for me.
Edited by tylerp14 on Apr 24, 2011 at 04:28 PM


Spartan314
Joined: Aug 21, 2010

Former biped rigger & FP animator


Posted: Apr 24, 2011 05:46 PM    Msg. 8 of 21       
Do you just compile the script in sapien and instead of flashlight it's an armor lock?


tylerp14
Joined: Oct 12, 2010

Ohai der...


Posted: Apr 24, 2011 05:56 PM    Msg. 9 of 21       
Yes, but you need certain tags that I have, the p0lock is a vehicle that looks like the armor lock position, and you need a few other things.


Spartan314
Joined: Aug 21, 2010

Former biped rigger & FP animator


Posted: Apr 24, 2011 09:43 PM    Msg. 10 of 21       
I just tried Zekilk's script but here's what happened (yes, i put z_pot)


04.25.11 13:41:59 [script line 11] this is not a valid object name.: armor_lock 1)
04.25.11 13:41:59 recompiling scripts after scenarios were merged.
04.25.11 13:41:59 [script line 8] this left parenthesis is unmatched.: (script continuous flashlightcheck


tylerp14
Joined: Oct 12, 2010

Ohai der...


Posted: Apr 24, 2011 10:37 PM    Msg. 11 of 21       
armor_lock is a vehicle. Im one of the few that has it. I'll release it after I get it working for 16 players.


Spartan314
Joined: Aug 21, 2010

Former biped rigger & FP animator


Posted: Apr 24, 2011 10:44 PM    Msg. 12 of 21       
oooh,
Well that was epic fail.
Wish I knew how to script so I could help...


tylerp14
Joined: Oct 12, 2010

Ohai der...


Posted: Apr 25, 2011 02:58 AM    Msg. 13 of 21       
Its ok, somebody will eventually come along and see this and help me make it work for all 16 players.


cyboryxmen
Joined: Nov 7, 2010

--CG artist-- New mission. Refuse this Mission!


Posted: Apr 25, 2011 05:16 AM    Msg. 14 of 21       

  • when you crouch and use AL you fall through the map.

  • the nades dont deflect while using AL with this version.

  • There is no sound.



These bugs could be fixed in the tags so I won't bother about them.

As for the rest, I just need to make some mini alterations to to fix all bugs and make it available for all 16 players but that won't be possible until I know how to make an object list and have a player number detect script.
-Zekilk


tylerp14
Joined: Oct 12, 2010

Ohai der...


Posted: Apr 25, 2011 03:57 PM    Msg. 15 of 21       
Ok well, kirby gave me his morphball script that makes a script work for 16 players, but since im not that good at scripting i'll let somebody convert the first script that I posted into 16 players I guess. Here is the Morphball Script:
(global boolean stillsearchering false)
(global short number 0)

(script continuous ball1
(if (= (unit_get_current_flashlight_state (unit (list_get (players) NUMBER))) 1)
(begin (unit_set_desired_flashlight_state (unit (list_get (players) NUMBER)) 0)
(set stillsearchering 1)
(if (= (vehicle_test_seat_list morphball1 "mb-driver" (players)) 0)
(begin
(object_create_anew morphball1)
(objects_attach (unit (list_get (players) number)) "body" morphball1 "driver")
(objects_detach (unit (list_get (players) number)) morphball1)
(vehicle_load_magic morphball1 "driver" (unit (list_get (players) number)))
(set stillsearchering 0)))
(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list morphball2 "mb-driver" (players)) 0)
(begin
(object_create_anew morphball2)
(objects_attach (unit (list_get (players) number)) "body" morphball2 "driver")
(objects_detach (unit (list_get (players) number)) morphball2)
(vehicle_load_magic morphball2 "driver" (unit (list_get (players) number)))
(set stillsearchering 0)))

(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list morphball3 "mb-driver" (players)) 0)
(begin
(object_create_anew morphball3)
(objects_attach (unit (list_get (players) number)) "body" morphball3 "driver")
(objects_detach (unit (list_get (players) number)) morphball3)
(vehicle_load_magic morphball3 "driver" (unit (list_get (players) number)))
(set stillsearchering 0)))

(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list morphball4 "mb-driver" (players)) 0)
(begin
(object_create_anew morphball4)
(objects_attach (unit (list_get (players) number)) "body" morphball4 "driver")
(objects_detach (unit (list_get (players) number)) morphball4)
(vehicle_load_magic morphball4 "driver" (unit (list_get (players) number)))
(set stillsearchering 0)))

(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list morphball5 "mb-driver" (players)) 0)
(begin
(object_create_anew morphball5)
(objects_attach (unit (list_get (players) number)) "body" morphball5 "driver")
(objects_detach (unit (list_get (players) number)) morphball5)
(vehicle_load_magic morphball5 "driver" (unit (list_get (players) number)))
(set stillsearchering 0)))

(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list morphball6 "mb-driver" (players)) 0)
(begin
(object_create_anew morphball6)
(objects_attach (unit (list_get (players) number)) "body" morphball6 "driver")
(objects_detach (unit (list_get (players) number)) morphball6)
(vehicle_load_magic morphball6 "driver" (unit (list_get (players) number)))
(set stillsearchering 0)))

(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list morphball7 "mb-driver" (players)) 0)
(begin
(object_create_anew morphball7)
(objects_attach (unit (list_get (players) number)) "body" morphball7 "driver")
(objects_detach (unit (list_get (players) number)) morphball7)
(vehicle_load_magic morphball7 "driver" (unit (list_get (players) number)))
(set stillsearchering 0)))

(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list morphball8 "mb-driver" (players)) 0)
(begin
(object_create_anew morphball8)
(objects_attach (unit (list_get (players) number)) "body" morphball8 "driver")
(objects_detach (unit (list_get (players) number)) morphball8)
(vehicle_load_magic morphball8 "driver" (unit (list_get (players) number)))
(set stillsearchering 0)))

(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list morphball8 "mb-driver" (players)) 0)
(begin
(object_create_anew morphball8)
(objects_attach (unit (list_get (players) number)) "body" morphball8 "driver")
(objects_detach (unit (list_get (players) number)) morphball8)
(vehicle_load_magic morphball8 "driver" (unit (list_get (players) number)))
(set stillsearchering 0)))

(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list morphball9 "mb-driver" (players)) 0)
(begin
(object_create_anew morphball9)
(objects_attach (unit (list_get (players) number)) "body" morphball9 "driver")
(objects_detach (unit (list_get (players) number)) morphball9)
(vehicle_load_magic morphball9 "driver" (unit (list_get (players) number)))
(set stillsearchering 0)))

(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list morphball10 "mb-driver" (players)) 0)
(begin
(object_create_anew morphball10)
(objects_attach (unit (list_get (players) number)) "body" morphball10 "driver")
(objects_detach (unit (list_get (players) number)) morphball10)
(vehicle_load_magic morphball10 "driver" (unit (list_get (players) number)))
(set stillsearchering 0)))

(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list morphball11 "mb-driver" (players)) 0)
(begin
(object_create_anew morphball11)
(objects_attach (unit (list_get (players) number)) "body" morphball11 "driver")
(objects_detach (unit (list_get (players) number)) morphball11)
(vehicle_load_magic morphball11 "driver" (unit (list_get (players) number)))
(set stillsearchering 0)))

(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list morphball12 "mb-driver" (players)) 0)
(begin
(object_create_anew morphball12)
(objects_attach (unit (list_get (players) number)) "body" morphball12 "driver")
(objects_detach (unit (list_get (players) number)) morphball12)
(vehicle_load_magic morphball12 "driver" (unit (list_get (players) number)))
(set stillsearchering 0)))

(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list morphball13 "mb-driver" (players)) 0)
(begin
(object_create_anew morphball13)
(objects_attach (unit (list_get (players) number)) "body" morphball13 "driver")
(objects_detach (unit (list_get (players) number)) morphball13)
(vehicle_load_magic morphball13 "driver" (unit (list_get (players) number)))
(set stillsearchering 0)))

(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list morphball14 "mb-driver" (players)) 0)
(begin
(object_create_anew morphball14)
(objects_attach (unit (list_get (players) number)) "body" morphball14 "driver")
(objects_detach (unit (list_get (players) number)) morphball14)
(vehicle_load_magic morphball14 "driver" (unit (list_get (players) number)))
(set stillsearchering 0)))

(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list morphball15 "mb-driver" (players)) 0)
(begin
(object_create_anew morphball15)
(objects_attach (unit (list_get (players) number)) "body" morphball15 "driver")
(objects_detach (unit (list_get (players) number)) morphball15)
(vehicle_load_magic morphball15 "driver" (unit (list_get (players) number)))
(set stillsearchering 0)))

(if (= stillsearchering 1) (begin (if (= (vehicle_test_seat_list morphball16 "mb-driver" (players)) 0)
(begin
(object_create_anew morphball16)
(objects_attach (unit (list_get (players) number)) "body" morphball16 "driver")
(objects_detach (unit (list_get (players) number)) morphball16)
(vehicle_load_magic morphball16 "driver" (unit (list_get (players) number)))
(set stillsearchering 0)))

)))) )))))))))))))))))))))))))))) ))
(set number (+ number 1))
(if (= (> number 15) 1) (set number 0))
)
(script continuous exiting
(if (= (unit_get_current_flashlight_state morphball1) 1) (vehicle_unload morphball1 "driver"))
(if (= (unit_get_current_flashlight_state morphball2) 1) (vehicle_unload morphball2 "driver"))
(if (= (unit_get_current_flashlight_state morphball3) 1) (vehicle_unload morphball3 "driver"))
(if (= (unit_get_current_flashlight_state morphball4) 1) (vehicle_unload morphball4 "driver"))
(if (= (unit_get_current_flashlight_state morphball5) 1) (vehicle_unload morphball5 "driver"))
(if (= (unit_get_current_flashlight_state morphball6) 1) (vehicle_unload morphball6 "driver"))
(if (= (unit_get_current_flashlight_state morphball7) 1) (vehicle_unload morphball7 "driver"))
(if (= (unit_get_current_flashlight_state morphball8) 1) (vehicle_unload morphball8 "driver"))
(if (= (unit_get_current_flashlight_state morphball9) 1) (vehicle_unload morphball9 "driver"))
(if (= (unit_get_current_flashlight_state morphball10) 1) (vehicle_unload morphball10 "driver"))
(if (= (unit_get_current_flashlight_state morphball11) 1) (vehicle_unload morphball11 "driver"))
(if (= (unit_get_current_flashlight_state morphball12) 1) (vehicle_unload morphball12 "driver"))
(if (= (unit_get_current_flashlight_state morphball13) 1) (vehicle_unload morphball13 "driver"))
(if (= (unit_get_current_flashlight_state morphball14) 1) (vehicle_unload morphball14 "driver"))
(if (= (unit_get_current_flashlight_state morphball15) 1) (vehicle_unload morphball15 "driver"))
(if (= (unit_get_current_flashlight_state morphball16) 1) (vehicle_unload morphball16 "driver"))
(object_destroy_containing morphball)
)


Spartan314
Joined: Aug 21, 2010

Former biped rigger & FP animator


Posted: Apr 25, 2011 11:38 PM    Msg. 16 of 21       
I thought this was about armor lock. O.o


UBE Chief
Joined: Sep 28, 2009

Raising the bar, one kill at a time.


Posted: Apr 25, 2011 11:47 PM    Msg. 17 of 21       
That last script was to show that something like the Morphball can be used for all 16 players at one time, so that the OP can use it for his AL.


tylerp14
Joined: Oct 12, 2010

Ohai der...


Posted: Apr 26, 2011 01:44 PM    Msg. 18 of 21       
Yeah, now I just need somebody to use the Morphball and make it work with the Armor Lock script...lol


Spartan314
Joined: Aug 21, 2010

Former biped rigger & FP animator


Posted: May 4, 2011 02:26 AM    Msg. 19 of 21       
so who's done it?


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: May 4, 2011 01:33 PM    Msg. 20 of 21       
I wrote an MP one, tried to send it to him like a week or so ago, but he never accepted the file transfer (of course, to lazy to try compiling it to see if it had unmatched paranthesis or worked correctly after the modifications, but still)


tylerp14
Joined: Oct 12, 2010

Ohai der...


Posted: May 5, 2011 04:56 AM    Msg. 21 of 21       
Quote: --- Original message by: kirby_422
I wrote an MP one, tried to send it to him like a week or so ago, but he never accepted the file transfer (of course, to lazy to try compiling it to see if it had unmatched paranthesis or worked correctly after the modifications, but still)


uhhh...Try sending it again please?

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 2:29 PM 157 ms.
A Halo Maps Website