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 »script error???

Author Topic: script error??? (7 messages, Page 1 of 1)
Moderators: Dennis

hexthat
Joined: Nov 2, 2013


Posted: Nov 7, 2013 05:16 PM    Msg. 1 of 7       
(script static "unit" player0
(unit (list_get (players )0 )))

(script static "unit" player1
(unit (list_get (players )1 )))

(script static "void" hudmsg1
(show_hud_help_text true)
(hud_set_help_text obj1)
(hud_set_objective_text obj1)
(sleep 200)
(show_hud_help_text false)
)

(script static "void" hudmsg2
(show_hud_help_text true)
(hud_set_help_text obj2)
(sleep 200)
(show_hud_help_text false)
)

(script static "void" lift_cutscene
(player_enable_input 0)
(volume_teleport_players_not_inside move_c1_b40_lift1600 recorded_cortana_lift_spot)
(player_enable_input 0)
(recording_play (player0 ) cortana_lift )
(player_enable_input 0)
(camera_control 1)
(cinematic_start)
(cinematic_show_letterbox 0)
(camera_set cam5 25)
(sleep 25)
(camera_set cam6 20)
(sleep 20)
(camera_set cam7 30)
(sleep 30)
(camera_set cam8 36)
(sleep 130)
(camera_control 0)
(cinematic_stop)
(object_create c1_lift_smalldoor)
(volume_teleport_players_not_inside move_c1_b40_lift1600 recorded_cortana_lift_spot2)

)

(script startup startup_cutscene
(player_enable_input 0)
(camera_control 1)
(cinematic_start)
(cinematic_show_letterbox 1)
(cinematic_start)
(cinematic_show_letterbox 1)
(cinematic_set_title_delayed chapter_start 1.4)
(camera_set cam3 30)
(sleep 30)
(sound_impulse_start "sound\dialog\a30\a30_010_cortana" none 1 )
(sleep 30)
(camera_set cam1 70)
(sleep 50)
(device_group_set tele_spot 0)
(sleep 50)
(volume_teleport_players_not_inside tely recorded_Start)
(camera_set cam2 90)
(sleep 90)
(camera_control 0)
(cinematic_stop)
(print "And... and I'm... I'm real. I'm a real girl!" )
(hudmsg1)
(game_save)
)

(script startup fogg_startup
;;START AT BSP 5
(switch_bsp 5)
;
;;C1 STAGE
(sleep_until (volume_test_objects_all c1_encounters_trigger (players)) 12)
(player_enable_input 0)
(camera_control 1)
(volume_teleport_players_not_inside recorded_trigger1 recorded_spot)
(cinematic_start)
(cinematic_show_letterbox 1)
(cinematic_set_title_delayed new_weapon 0.8)
(print "Cortana: New special ordnance, ...synthesizing weapon." )
(camera_set cam4 5)
(sleep 110)
(player_add_equipment (player0 )cor_mag_pro true )
(player_add_equipment (player1 )cor_mag_pro true )
(sleep 70)
(camera_control 0)
(ai_place c1_encountA)
(cinematic_stop)
(game_save)
;
;;CLOSE DOOR 1
(sleep_until (volume_test_objects_all close_c1_opened1 (players)) 12)
(device_set_position_immediate c1_opened1 0)
(device_set_power c1_opened1 0)
(game_save)
;
;;BRING LIFT TO ME
(sleep_until (volume_test_objects_all move_c1_b40_lift1600 (players)))
(device_set_position c1_b40_lift1600 0)
(sleep_until (volume_test_objects_all recorded_cortana_lift (players)))
(lift_cutscene)
;
;;CLOSE DOOR 2
(sleep_until (volume_test_objects_all close_b5_opened2 (players)) 12)
(device_set_position_immediate b5_opened2 0)
(device_set_power b5_opened2 0)
;
;;CLOSE DOOR 3
(sleep_until (volume_test_objects_all close_b3_opened1 (players)) 12)
(device_set_position_immediate b3_opened1 0)
(device_set_power b3_opened1 0)
;
;;CLOSE DOOR 4
(sleep_until (volume_test_objects_all close_b4_opened1 (players)) 12)
(device_set_position_immediate b4_opened1 0)
(device_set_power b4_opened1 0)
;
;;CLOSE DOOR 5
(sleep_until (volume_test_objects_all close_a2_opened2 (players)) 12)
(device_set_position_immediate a2_opened2 0)
(device_set_power a2_opened2 0)
;
;;CLOSE DOOR 6
(sleep_until (volume_test_objects_all close_a3_opened1 (players)) 12)
(device_set_position_immediate a3_opened1 0)
(device_set_power a3_opened1 0)
;
)

(script continuous level_jumping
(if (= (device_group_get stob5) 1) (begin (device_group_set_immediate stob5 0) (switch_bsp 4) (volume_teleport_players_not_inside tely bsp5tele)))
(if (= (device_group_get stob3) 1) (begin (device_group_set_immediate stob3 0) (switch_bsp 2) (volume_teleport_players_not_inside tely bsp2tele)))
(if (= (device_group_get stob4) 1) (begin (device_group_set_immediate stob4 0) (switch_bsp 3) (volume_teleport_players_not_inside tely bsp3tele)))
(if (= (device_group_get stoa2) 1) (begin (device_group_set_immediate stoa2 0) (switch_bsp 0) (volume_teleport_players_not_inside tely bsp0tele)))
(if (= (device_group_get stoa3) 1) (begin (device_group_set_immediate stoa3 0) (switch_bsp 1) (volume_teleport_players_not_inside tely bsp1tele)))
)


when i die it plays a static script "lift_cutscene" but without the biped and i would like just normal death cam stuff you know???


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Nov 7, 2013 06:13 PM    Msg. 2 of 7       
Because your checking if ALL the objects in an object_list are somewhere. When a player is dead, they are not part of the players object_lift, hence 100% (zero out of zero) of the players are in the trigger volume, so it will continue through and play. Instead of just checking that all players are in the trigger volumes, you can also check that at least someone is alive by including an 'and' statement along with (> (list_count (players)) 0).


hexthat
Joined: Nov 2, 2013


Posted: Nov 8, 2013 11:39 AM    Msg. 3 of 7       
thank you, what does the player biped become part of at death?

im new to scripting and i couldnt get the "and" to work with sleep_until so i just added another sleep_until after the first

(sleep_until (volume_test_objects_all recorded_cortana_lift (players)))
(sleep_until (> (list_count (players)) 0))


how do you join the two?

i tried
(sleep_until (volume_test_objects_all recorded_cortana_lift (players))
and (> (list_count (players)) 0))


but it asks for a short so i tried
(sleep_until (volume_test_objects_all recorded_cortana_lift (players)) 12
and (> (list_count (players)) 0))


then it asks for a long.... well i just adding another sleep_until worked out but i couldnt get the "and" function to work with sleep_until
Edited by hexthat on Nov 8, 2013 at 11:48 AM

i guess the biped doesnt changed to anything it just cant play animations when dead
Edited by hexthat on Nov 8, 2013 at 01:57 PM


kirby_422
Joined: Jan 22, 2006

Apparently public enemy number 1?


Posted: Nov 8, 2013 03:01 PM    Msg. 4 of 7       
The player biped is removed from the object_list when its dead. If you want access to a corpse, you need to create a global variable, and assign the biped to it.

(sleep_until (and (volume_test_objects_all recorded_cortana_lift (players)) (> (list_count (players)) 0)) 12)


Open sapien, hit the ~ button, type script_doc, hit enter. hs_doc.txt will appear in your HCE folder (if your using OS sapien, it will be in the reports folder, where OS' copy of debug.txt is). This will list all scripting commands; if you don't know how to use something like 'and' in the future, just read that, and it will give you the syntax.


hexthat
Joined: Nov 2, 2013


Posted: Nov 21, 2013 10:55 AM    Msg. 5 of 7       
How do I get the map to reset and play as legendary without loading a different map? I could only get it working by making a 2.42mb map with a small script in it to work the way I wanted.



Map Name:Fogg

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

(script static "unit" player1
(unit (list_get (players )1 )))

(script static "void" end_fogg
(game_won)
(sleep 30)
(game_won)
(sleep 30)
(game_won)
(sleep 30)
(game_won)
(sleep 30)
(game_won)
(sleep 30)
(game_won)
(sleep 30)
(game_won)
(sleep 30)
(game_won)
(sleep 30)
(game_won)
(sleep 30)
(game_won)
(sleep 30)
(quit)
)

(script static "void" hudmsg1
(show_hud_help_text true)
(hud_set_help_text obj1)
(hud_set_objective_text obj1)
(sleep 200)
(show_hud_help_text false)
)

(script static "void" hudmsg3
(show_hud_help_text true)
(hud_set_help_text obj3)
(enable_hud_help_flash true)
(sleep 120)
(enable_hud_help_flash false)
(show_hud_help_text false)
(sleep 27)
(map_name fogg_impossy)
)

(script static "void" hudmsg4
(show_hud_help_text true)
(hud_set_help_text obj4)
(enable_hud_help_flash true)
(sleep 200)
(enable_hud_help_flash false)
(show_hud_help_text false)
(sleep 33)
(end_fogg)
)

(script static "void" hudmsg2
(if (= (game_difficulty_get_real) impossible) (hudmsg4) (begin
(show_hud_help_text true)
(hud_set_help_text obj2)
(enable_hud_help_flash true)
(sleep 120)
(enable_hud_help_flash false)
(show_hud_help_text false)
(hudmsg3)))
)

(script static "void" hudmsg5
(show_hud_help_text true)
(hud_set_help_text obj5)
(sleep 150)
(show_hud_help_text false)
)

(script static "void" lift_cutscene
(player_enable_input 0)
(camera_control 1)
(volume_teleport_players_not_inside move_c1_b40_lift1600 recorded_cortana_lift_spot)
(player_enable_input 0)
(recording_play (player0 ) cortana_lift )
(player_enable_input 0)
(cinematic_start)
(cinematic_show_letterbox 0)
(camera_set cam5 25)
(sleep 25)
(camera_set cam6 20)
(sleep 20)
(camera_set cam7 30)
(sleep 30)
(camera_set cam8 36)
(sleep 130)
(camera_control 0)
(cinematic_stop)
(game_save)
(object_create c1_lift_smalldoor)
(volume_teleport_players_not_inside move_c1_b40_lift1600 recorded_cortana_lift_spot2)
)

(script static "void" hunt_cutscene
(camera_control 1)
(player_enable_input 0)
(cinematic_start)
(cinematic_show_letterbox 1)
(camera_set cam9 0)
(sleep 35)
(cinematic_set_title_delayed chapter_hunt 1.6)
(print "It's just one hunter..." )
(camera_set cam10 60)
(sleep 60)
(camera_set cam11 40)
(sleep 40)
(camera_set cam12 30)
(sleep 30)
(camera_set cam13 30)
(sleep 30)
(camera_set cam14 30)
(sleep 30)
(camera_set cam15 30)
(sleep 30)
(cinematic_show_letterbox 0)
(camera_control 0)
(player_enable_input 1)
(cinematic_stop)
)

(script static "void" b3a_hunt_test
(sleep_until (volume_test_objects_all b3a_hunt_trigger (players)) 12)
(if (> (ai_living_count b3_encountA) 0) (begin
(activate_team_nav_point_object default_red player (list_get (ai_actors b3_encountA) 0) 0.6)
(hudmsg5)
(sleep_until (= (ai_living_count b3_encountA) 0) 15)
(deactivate_team_nav_point_object player (list_get (ai_actors b3_encountA) 0))
(device_set_power b3a_doolsmall 1)
) (device_set_power b3a_doolsmall 1))
)

(script static "void" floor_1b_title
(cinematic_show_letterbox 1)
(cinematic_set_title_delayed chapter_1b 1.2)
(sleep 200)
(cinematic_show_letterbox 0)
)

(script static "void" floor_6c_title
(cinematic_show_letterbox 1)
(cinematic_set_title_delayed chapter_6c 1.2)
(sleep 200)
(cinematic_show_letterbox 0)
)

(script static "void" floor_1a_title
(cinematic_show_letterbox 1)
(cinematic_set_title_delayed chapter_1a 1.2)
(sleep 200)
(cinematic_show_letterbox 0)
)

(script startup startup_cutscene
(player_enable_input 0)
(camera_control 1)
(cinematic_start)
(cinematic_show_letterbox 1)
(cinematic_start)
(cinematic_show_letterbox 1)
(cinematic_set_title_delayed chapter_start 1.4)
(camera_set cam3 30)
(sleep 60)
(sound_impulse_start "sound\dialog\a30\a30_010_cortana" none 1 )
(camera_set cam1 70)
(sleep 50)
(device_group_set tele_spot 0)
(sleep 50)
(volume_teleport_players_not_inside tely recorded_Start)
(camera_set cam2 90)
(sleep 90)
(camera_control 0)
(cinematic_stop)
(print "And... and I'm... I'm real. I'm a real girl!" )
(hudmsg1)
(game_save)
)

(script startup fogg_startup
;;START AT BSP 5
(switch_bsp 5)
;
;;C1 STAGE A
(sleep_until (volume_test_objects_all c1_encounterA_trigger (players)) 12)
(player_enable_input 0)
(camera_control 1)
(volume_teleport_players_not_inside recorded_trigger1 recorded_spot)
(cinematic_start)
(cinematic_show_letterbox 1)
(if (= (game_difficulty_get_real) impossible) (begin
(cinematic_set_title_delayed new_weapon 1.2)
(print "Cortana: New special ordnance, ...synthesizing weapon." )
))
(camera_set cam4 5)
(sleep 110)

(if (= (game_difficulty_get_real) impossible)
(begin
(player_add_equipment (player0 )cor_mag_pro true )
(player_add_equipment (player1 )cor_mag_pro true )
)
(begin
(player_add_equipment (player0 )cor_mag_noob true )
(player_add_equipment (player1 )cor_mag_noob true )
))
(sleep 70)
(camera_control 0)
(ai_place c1_encountA)
(cinematic_stop)
(game_save)
;
;;BRING LIFT TO ME
(sleep_until (volume_test_objects_all move_c1_b40_lift1600 (players)))
(device_set_position c1_b40_lift1600 0)
(sleep_until (and (volume_test_objects_all recorded_cortana_lift (players)) (> (list_count (players)) 0)) 12)
(lift_cutscene)
;
;;C1 STAGE B
(sleep_until (volume_test_objects_all c1_encounterB_trigger (players)) 12)
(ai_place c1_encountB)
(floor_1b_title)
(game_save)
;
;;B5 STAGE A
(sleep_until (volume_test_objects_all tely (players)) 12)
(ai_place b5_encountA)
(game_save)
;
;;B5 STAGE B
(sleep_until (volume_test_objects_all b5_encounterB_trigger (players)) 12)
(ai_place b5_encountB)
(game_save)
;
;;B3 STAGE A
(sleep_until (volume_test_objects_all b3_encounterA_trigger (players)) 12)
(ai_place b3_encountA)
(game_save)
(sleep_until (volume_test_objects_all close_b3_opened1 (players)) 12)
(sleep_until (> (list_count (players)) 0) 5)
(hunt_cutscene)
(b3a_hunt_test)
(sleep_until (volume_test_objects_all b3_b40_lift_trigger (players)) 12)
(ai_place b3_encountB)
(floor_6c_title)
;
;;A2 STAGE
(sleep_until (volume_test_objects_all a2_encounterA_trigger (players)) 12)
(ai_place a2_encountA)
(sleep_until (volume_test_objects_all a2_b40_lift_trigger (players)) 12)
(ai_place a2_encountB)
(floor_1a_title)
(game_save)
;
;;A3 STAGE
(sleep_until (volume_test_objects_all a3_encounter_trigger (players)) 12)
(ai_place a3_encount)
(game_save)
(sleep 50)
(sleep_until (= (ai_living_count a3_encount) 0) 12)
(hudmsg2)
;
)

(script startup DOOR_CLOSE
;;CO-OP CHECK
(sleep 100)
(sleep_until (!= (game_is_cooperative) (> (list_count (players)) 0)) 30)
;
;;CLOSE DOOR 1
(sleep_until (volume_test_objects_all close_c1_opened1 (players)) 12)
(device_set_position_immediate c1_opened1 0)
(device_set_power c1_opened1 0)
(game_save)
;
;;CLOSE DOOR 2
(sleep_until (volume_test_objects_all close_b5_opened2 (players)) 12)
(device_set_position_immediate b5_opened2 0)
(device_set_power b5_opened2 0)
(game_save)
;
;;CLOSE DOOR 3
(sleep_until (volume_test_objects_all close_b3_opened1 (players)) 12)
(device_set_position_immediate b3_opened1 0)
(device_set_power b3_opened1 0)
(game_save)
;
;;CLOSE DOOR 4
(sleep_until (volume_test_objects_all close_b4_opened1 (players)) 12)
(device_set_position_immediate b4_opened1 0)
(device_set_power b4_opened1 0)
(game_save)
;
;;CLOSE DOOR 5
(sleep_until (volume_test_objects_all close_a2_opened2 (players)) 12)
(device_set_position_immediate a2_opened2 0)
(device_set_power a2_opened2 0)
(game_save)
;
;;CLOSE DOOR 6
(sleep_until (volume_test_objects_all close_a3_opened1 (players)) 12)
(device_set_position_immediate a3_opened1 0)
(device_set_power a3_opened1 0)
(game_save)
;
)

(script continuous level_jumping
(if (= (device_group_get stob5) 1) (begin (device_group_set_immediate stob5 0) (switch_bsp 4) (volume_teleport_players_not_inside tely bsp5tele) (ai_erase_all) (game_save)))
(if (= (device_group_get stob3) 1) (begin (device_group_set_immediate stob3 0) (switch_bsp 2) (volume_teleport_players_not_inside tely bsp2tele) (ai_erase_all) (game_save)))
(if (= (device_group_get stob4) 1) (begin (device_group_set_immediate stob4 0) (switch_bsp 3) (volume_teleport_players_not_inside tely bsp3tele) (ai_erase_all) (game_save)))
(if (= (device_group_get stoa2) 1) (begin (device_group_set_immediate stoa2 0) (switch_bsp 0) (volume_teleport_players_not_inside tely bsp0tele) (ai_erase_all) (game_save)))
(if (= (device_group_get stoa3) 1) (begin (device_group_set_immediate stoa3 0) (switch_bsp 1) (volume_teleport_players_not_inside tely bsp1tele) (ai_erase_all) (game_save)))
)



Map Name:fogg_impossy
(script startup fogg_impossy
(game_difficulty_set impossible)
(map_name fogg)
)


A Juicy Frank
Joined: Oct 28, 2013


Posted: Nov 22, 2013 12:16 AM    Msg. 6 of 7       
(script startup make_imposs
(if (!= (game_difficulty_get) impossible)
(begin
(game_difficulty_set impossible)
(map_name fogg)
))) ;end begin, if, script


hexthat
Joined: Nov 2, 2013


Posted: Nov 22, 2013 01:22 AM    Msg. 7 of 7       
too many errors

first of all i cant run that at start up cause it would not go with game-play, so i could make it a static script but it loads the last check point for the map fogg so that doesnt go with gameplay either

~edit add
i got the fogg_impossy map size down to 1.04mb

is there a way to delete all checkpoints?
Edited by hexthat on Nov 22, 2013 at 01:23 AM


say i loaded a map on normal then got a check point and decided i want to play it on hard and reload the map it starts it over but if i change it back to normal it loads the check point i had saved while it was playing normal, if i change it back to hard it would load the last check point i got on hard

it stores more then more then one check point which is very very strange
Edited by hexthat on Nov 23, 2013 at 12:01 PM

i guess it does that so if you keep dying at one checkpoint it will load the second to last checkpoint
Edited by hexthat on Nov 23, 2013 at 12:02 PM

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 1:15 AM 141 ms.
A Halo Maps Website