/
hs_doc.txt
5544 lines (1784 loc) · 88.7 KB
/
hs_doc.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(begin <expression(s)>)
returns the last expression in a sequence after evaluating the sequence in order.
(begin_random <expression(s)>)
evaluates the sequence of expressions in random order and returns the last value evaluated.
(if <boolean> <then> [<else>])
returns one of two values based on the value of a condition.
(cond (<boolean1> <result1>) [(<boolean2> <result2>) [...]])
returns the value associated with the first true condition.
(set <variable name> <expression>)
set the value of a global variable.
(and <boolean(s)>)
returns true if all specified expressions are true.
(or <boolean(s)>)
returns true if any specified expressions are true.
(+ <number(s)>)
returns the sum of all specified expressions.
(- <number> <number>)
returns the difference of two expressions.
(* <number(s)>)
returns the product of all specified expressions.
(/ <number> <number>)
returns the quotient of two expressions.
(min <number(s)>)
returns the minimum of all specified expressions.
(max <number(s)>)
returns the maximum of all specified expressions.
(= <expression> <expression>)
returns true if two expressions are equal
(!= <expression> <expression>)
returns true if two expressions are not equal
(> <number> <number>)
returns true if the first number is larger than the second.
(< <number> <number>)
returns true if the first number is smaller than the second.
(>= <number> <number>)
returns true if the first number is larger than or equal to the second.
(<= <number> <number>)
returns true if the first number is smaller than or equal to the second.
(sleep <short> [<script>])
pauses execution of this script (or, optionally, another script) for the specified number of ticks.
(sleep_forever [<script>])
pauses execution of this script (or, optionally, another script) forever.
(sleep_until <boolean> [<short>])
pauses execution of this script until the specified condition is true, checking once per second unless a different number of ticks is specified.
(wake <script name>)
wakes a sleeping script in the next update.
(inspect <expression>)
prints the value of an expression to the screen for debugging purposes.
(unit <object>)
converts an object to a unit.
(not <boolean>)
returns the opposite of the expression.
(pin <real> <real> <real>)
returns the first value pinned between the second two
(print <string>)
prints a string to the console.
(players)
returns a list of the players
(kill_volume_enable <trigger_volume>)
enables a kill volume
(kill_volume_disable <trigger_volume>)
disables a kill volume
(volume_teleport_players_not_inside <trigger_volume> <cutscene_flag>)
moves all players outside a specified trigger volume to a specified flag.
(volume_test_object <trigger_volume> <object>)
returns true if the specified object is within the specified volume.
(volume_test_objects <trigger_volume> <object_list>)
returns true if any of the specified objects are within the specified volume. trigger volume must have been postprocessed
(volume_test_objects_all <trigger_volume> <object_list>)
returns true if any of the specified objects are within the specified volume. trigger volume must have been postprocessed
(volume_return_objects <trigger_volume>)
returns list of objects in volume or (max 128).
(volume_return_objects_by_type <trigger_volume> <long>)
returns list of objects in volume or (max 128).
(list_get <object_list> <short>)
returns an item in an object list.
(list_count <object_list>)
returns the number of objects in a list
(list_count_not_dead <object_list>)
returns the number of objects in a list that aren't dead
(effect_new <effect> <cutscene_flag>)
starts the specified effect at the specified flag.
(effect_new_on_object_marker <effect> <object> <string_id>)
starts the specified effect on the specified object at the specified marker.
(damage_new <damage> <cutscene_flag>)
causes the specified damage at the specified flag.
(damage_object <damage> <object>)
causes the specified damage at the specified object.
(damage_objects <damage> <object_list>)
causes the specified damage at the specified object list.
(damage_players <damage>)
damages all players with the given damage effect
(object_create <object_name>)
creates an object from the scenario.
(object_create_clone <object_name>)
creates an object, potentially resulting in multiple objects if it already exists.
(object_create_anew <object_name>)
creates an object, destroying it first if it already exists.
(object_create_containing <string>)
creates all objects from the scenario whose names contain the given substring.
(object_create_clone_containing <string>)
creates clones for all objects from the scenario whose names contain the given substring.
(object_create_anew_containing <string>)
creates anew all objects from the scenario whose names contain the given substring.
(object_destroy <object>)
destroys an object.
(object_destroy_containing <string>)
destroys all objects from the scenario whose names contain the given substring.
(object_destroy_all)
destroys all non player objects.
(object_destroy_type_mask <long>)
destroys all objects matching the type mask
(objects_delete_by_definition <object_definition>)
deletes all objects of type <definition>
(object_hide <object> <boolean>)
hides or shows the object passed in
(object_set_shadowless <object> <boolean>)
set/reset shadow castingness of object
(object_function_set <long> <real>)
sets a global object function (0-3) to value
(object_set_function_variable <object> <string_id> <real> <real>)
sets funciton variable for sin-o-matic use
(object_clear_function_variable <object> <string_id>)
clears one funciton variables for sin-o-matic use
(object_clear_all_function_variables <object>)
clears all funciton variables for sin-o-matic use
(object_dynamic_simulation_disable <object> <boolean>)
disabled dynamic simulation for this object (makes it fixed)
(object_set_phantom_power <object> <boolean>)
sets phantom power to be latched at 1.0f or 0.0f
(object_wake_physics <object>)
wakes physics of an object. For example it would make an usupported crate fall
(object_set_ranged_attack_inhibited <object> <boolean>)
FALSE prevents object from using ranged attack
(object_set_melee_attack_inhibited <object> <boolean>)
FALSE prevents object from using melee attack
(objects_dump_memory)
debugs object memory usage
(object_get_health <object>)
returns the health [0,1] of the object, returns -1 if the object does not exist
(object_get_shield <object>)
returns the shield [0,1] of the object, returns -1 if the object does not exist
(object_set_shield_effect <object> <real> <real>)
sets the shield response effect (not current shield amount) to a given value over the given number of seconds (cinematic use only, remember to call (object_set_shield_effect 0 0) after use!)
(object_set_physics <object> <boolean>)
prevents an object from running physics or colliding with any other objects
(object_get_parent <object>)
returns the parent of the given object
(objects_attach <object> <string_id> <object> <string_id>)
attaches the second object to the first both strings can be empty
(object_at_marker <object> <string_id>)
returns the object attached to the marker of the given parent object
(objects_detach <object> <object>)
detaches from the given parent object the given child object
(object_set_scale <object> <real> <short>)
sets the scale for a given object and interpolates over the given number of frames to achieve that scale
(object_set_velocity <object> <real>)
Sets the (object-relative) forward velocity of the given object
(object_set_velocity <object> <real> <real> <real>)
Sets the (object-relative) velocity of the given object
(object_set_deleted_when_deactivated <object>)
when this object deactivates it will be deleted
(object_copy_player_appearance <object> <long>)
copy appearance into object from player n (starts counting from 0)
(object_model_target_destroyed <object> <string_id>)
returns TRUE if the specified model target is destroyed
(object_model_targets_destroyed <object> <string_id>)
returns TRUE if the specified model target is destroyed
(object_damage_damage_section <object> <string_id> <real>)
applies damage to a damage section, causing all manner of effects/constraint breakage to occur
(object_cannot_die <object> <boolean>)
Set whether the object can die from damage or not (as opposed to by scripting)
(object_vitality_pinned <object>)
returns TRUE if the object's vitality is currently pinned at some minimum value because it cannot die.
(garbage_collect_now)
causes all garbage objects except those visible to a player to be collected immediately
(garbage_collect_unsafe)
forces all garbage objects to be collected immediately, even those visible to a player (dangerous!)
(garbage_collect_multiplayer)
runs multiplayer garbage collection
(object_cannot_take_damage <object_list>)
prevents an object from taking damage
(object_can_take_damage <object_list>)
allows an object to take damage again
(object_cinematic_lod <object> <boolean>)
makes an object use the highest lod for the remainder of the levels' cutscenes.
(object_cinematic_collision <object> <boolean>)
makes an object not collide with other cinematic collision objects.
(object_cinematic_visibility <object> <boolean>)
makes an object bypass visibility and always render during cinematics.
(object_uses_cinematic_lighting <object> <boolean>)
makes an object use the cinematic directional and ambient lights instead of sampling the lightmap.
(cinematic_lighting_set_primary_light <real> <real> <real> <real> <real>)
sets the pitch, yaw, and color (red, green, blue) of the cinematic shadowing diffuse and specular directional light.
(cinematic_lighting_set_secondary_light <real> <real> <real> <real> <real>)
sets the pitch, yaw, and color (red, green, blue) of the cinematic non-shadowing diffuse directional light.
(cinematic_lighting_set_ambient_light <real> <real> <real>)
sets the color (red, green, blue) of the cinematic ambient light.
(objects_predict <object_list>)
loads textures/geometry/sounds necessary to present objects that are about to come on-screen
(objects_predict_high <object_list>)
loads textures/geometry/sounds necessary to present objects that are about to come on-screen
(objects_predict_low <object_list>)
loads textures/geometry/sounds necessary to present objects that are about to come on-screen
(object_type_predict_high <object_definition>)
loads textures necessary to draw an object that's about to come on-screen.
(object_type_predict_low <object_definition>)
loads textures necessary to draw an object that's about to come on-screen.
(object_type_predict <object_definition>)
loads textures necessary to draw an object that's about to come on-screen.
(object_teleport <object> <cutscene_flag>)
moves the specified object to the specified flag.
(object_set_facing <object> <cutscene_flag>)
turns the specified object in the direction of the specified flag.
(object_set_shield <object> <real>)
sets the shield vitality of the specified object (between 0 and 1).
(object_set_shield_stun <object> <real>)
set how long the shield will be stunned for, 0 is unstunned
(object_set_shield_stun_infinite <object>)
make this objects shield be stunned permanently
(object_set_permutation <object> <string_id> <string_id>)
sets the desired region (use "" for all regions) to the permutation with the given name, e.g. (object_set_permutation flood "right arm" ~damaged)
(object_set_region_state <object> <string_id> <model_state>)
sets the desired region (use "" for all regions) to the model state with the given name, e.g. (object_set_region_state marine head destroyed)
(objects_can_see_object <object_list> <object> <real>)
returns true if any of the specified units are looking within the specified number of degrees of the object.
(objects_can_see_flag <object_list> <cutscene_flag> <real>)
returns true if any of the specified units are looking within the specified number of degrees of the flag.
(objects_distance_to_object <object_list> <object>)
returns minimum distance from any of the specified objects to the specified destination object. (returns -1 if there are no objects to check)
(objects_distance_to_flag <object_list> <cutscene_flag>)
returns minimum distance from any of the specified objects to the specified flag. (returns -1 if there are no objects, or no flag, to check)
(map_info)
prints the current map and bsp name and index
(position_predict <real> <real> <real>)
in: x, y, z position. loads textures/geometry/sounds necessary to present locations that are about to come on-screen.
(shader_predict <shader>)
in: shader name. loads textures necessary for a shader.
(bitmap_predict <bitmap>)
in: bitmap name. loads all the bitmaps in that bitmap group
(script_recompile)
recompiles scripts.
(script_doc)
saves a file called hs_doc.txt with parameters for all script commands.
(help <string>)
prints a description of the named function.
(game_engine_objects)
returns a list of the special game engine objects
(random_range <short> <short>)
returns a random value in the range [lower bound, upper bound)
(real_random_range <real> <real>)
returns a random value in the range [lower bound, upper bound)
(physics_constants_reset)
resets all physics constants to earthly values
(physics_set_gravity <real>)
set global gravity acceleration relative to halo standard gravity
(physics_set_velocity_frame <real> <real> <real>)
sets a local frame of motion for updating physics of things that wish to respect it
(physics_disable_character_ground_adhesion_forces <real>)
turn off ground adhesion forces so you can play tricks with gravity
(havok_debug_start)
start up the havok visual debugger
(havok_dump_world <string> <boolean>)
dump the state of the havok world, with our without a movie
(havok_dump_world_close_movie)
end the capture of a havok dump movie
(havok_profile_start)
start profiling havok
(havok_profile_end)
start profiling havok
(havok_reset_allocated_state)
strips down and builds back up all allocated havok memory
(breakable_surfaces_enable <boolean>)
enables or disables breakability of all breakable surfaces on level
(breakable_surfaces_reset)
restores all breakable surfaces
(recording_play <unit> <cutscene_recording>)
make the specified unit run the specified cutscene recording.
(recording_play_and_delete <unit> <cutscene_recording>)
make the specified unit run the specified cutscene recording, deletes the unit when the animation finishes.
(recording_play_and_hover <vehicle> <cutscene_recording>)
make the specified vehicle run the specified cutscene recording, hovers the vehicle when the animation finishes.
(recording_kill <unit>)
kill the specified unit's cutscene recording.
(recording_time <unit>)
return the time remaining in the specified unit's cutscene recording.
(render_lights <boolean>)
enables/disables dynamic lights
(texture_camera_set_object_marker <object> <string_id> <real>)
sets the render texture camera to a given object marker
(texture_camera_off)
turns off the render texture camera
(render_lights_enable_cinematic_shadow <boolean> <object> <string_id> <real>)
enable/disable the specified unit to receive cinematic shadows where the shadow is focused about a radius around a marker name
(fog_report)
(fog_report_summary)
(fog_report_verbose)
(fog_mode_control <boolean> <boolean> <boolean> <boolean>)
(fog_override_off)
(fog_override_mode <long>)
(fog_override_mode_off)
(fog_override_atmospheric_fog <real> <string> <real> <real>)
(fog_override_atmospheric_fog_off)
(fog_override_secondary_fog <real> <string> <real> <real>)
(fog_override_secondary_fog_off)
(fog_override_sky_fog <real> <string>)
(fog_override_sky_fog_off)
(fog_override_planar_fog <real> <string> <real> <real> <real>)
(fog_override_planar_fog_off)
(fog_override_planar_fog_plane <real> <real> <real>)
(fog_override_planar_fog_plane_off)
(fog_override_planar_max_atmospheric_depth <real>)
(fog_override_planar_max_atmospheric_depth_off)
(fog_override_planar_planar_eye_density <real>)
(fog_override_planar_planar_eye_density_off)
(fog_override_atmospheric_secondary_blend <real>)
(fog_override_atmospheric_secondary_blend_off)
(fog_override_atmospheric_planar_blend <real>)
(fog_override_atmospheric_planar_blend_off)
(render_debug_structure_cluster_visibility <long>)
enables cluster visibility debugging
(render_debug_structure_cluster_fog <long>)
enables cluster fog debugging
(render_debug_structure_fog_plane <long>)
enables fog plane debugging
(render_debug_structure_fog_plane_infinite_extent <long>)
enables fog plane debugging
(render_debug_structure_fog_zone <long>)
enabled fog zone debugging
(render_debug_structure_fog_zone_floodfill <long>)
enables fog zone debugging
(render_debug_structure_all_fog_planes <boolean>)
enables fog plane debugging (all)
(render_debug_structure_all_cluster_errors <boolean>)
enables cluster error debugging (all)
(render_debug_structure_line_opacity <real> <real> <real> <real>)
sets the opacity (0 is default)
(render_debug_structure_text_opacity <real> <real> <real> <real>)
sets the opacity (0 is default)
(render_debug_structure_opacity <real> <real> <real> <real>)
sets the opacity (0 is default)
(render_debug_structure_non_occluded_fog_planes <boolean>)
controls non-occluded fog plane debugging
(scenery_animation_start <scenery> <animation_graph> <string_id>)
starts a custom animation playing on a piece of scenery
(scenery_animation_start_loop <scenery> <animation_graph> <string_id>)
starts a custom looping animation playing on a piece of scenery
(scenery_animation_start_relative <scenery> <animation_graph> <string_id> <object>)
starts a custom animation playing on a piece of scenery relative to a parent object
(scenery_animation_start_relative_loop <scenery> <animation_graph> <string_id> <object>)
starts a custom looping animation playing on a piece of scenery relative to a parent object
(scenery_animation_start_at_frame <scenery> <animation_graph> <string_id> <short>)
starts a custom animation playing on a piece of scenery at a specific frame
(scenery_animation_idle <scenery>)
starts the idle animation (if any) for a piece of scenery
(scenery_get_animation_time <scenery>)
returns the number of ticks remaining in a custom animation (or zero, if the animation is over).
(render_effects <boolean>)
(unit_can_blink <unit> <boolean>)
allows a unit to blink or not (units never blink when they are dead)
(unit_set_active_camo <unit> <boolean> <real>)
enable or disable active camo for the given unit over the specified number of seconds
(unit_open <unit>)
opens the hatches on the given unit
(unit_close <unit>)
closes the hatches on a given unit
(unit_kill <unit>)
kills a given unit, no saving throw
(unit_kill_silent <unit>)
kills a given unit silently (doesn't make them play their normal death animation or sound)
(unit_is_emitting <unit>)
returns whether or not the given unit is current emitting an ai
(unit_get_custom_animation_time <unit>)
returns the number of ticks remaining in a unit's custom animation (or zero, if the animation is over).
(unit_stop_custom_animation <unit>)
stops the custom animation running on the given unit.
(custom_animation <unit> <animation_graph> <string_id> <boolean>)
starts a custom animation playing on a unit (interpolates into animation if last parameter is TRUE)
(custom_animation_loop <unit> <animation_graph> <string_id> <boolean>)
starts a custom animation playing on a unit (interpolates into animation if last parameter is TRUE)
(custom_animation_relative <unit> <animation_graph> <string_id> <boolean> <object>)
starts a custom animation relative to some other object (interpolates into animation if last parameter is TRUE)
(custom_animation_relative_loop <unit> <animation_graph> <string_id> <boolean> <object>)
starts a custom animation relative to some other object (interpolates into animation if last parameter is TRUE)
(custom_animation_list <object_list> <animation_graph> <string_id> <boolean>)
starts a custom animation playing on a unit list (interpolates into animation if last parameter is TRUE)
(unit_custom_animation_at_frame <unit> <animation_graph> <string_id> <boolean> <short>)
starts a custom animation playing on a unit at a specific frame index(interpolates into animation if next to last parameter is TRUE)
(unit_is_playing_custom_animation <unit>)
returns TRUE if the given unit is still playing a custom animation
(object_set_custom_animations_hold_on_last_frame <boolean>)
changes the default behavior for custom animations
(object_set_custom_animations_prevent_lipsync_head_movement <boolean>)
when true, prevents lipsync from bobbing the head during custom animations. default is true.
(unit_set_actively_controlled <unit> <boolean>)
sets unit's actively controlled flag
(unit_get_team_index <unit>)
returns the team index of the unit, returns -1 if the unit does not have a team
(unit_aim_without_turning <unit> <boolean>)
allows a unit to aim in place without turning
(unit_set_enterable_by_player <unit> <boolean>)
can be used to prevent the player from entering a vehicle
(unit_get_enterable_by_player <unit>)
returns true if a player may enter the vehicle
(unit_only_takes_damage_from_players_team <unit> <boolean>)
used for the tartarus boss fight
(unit_enter_vehicle <unit> <vehicle> <string_id>)
puts the specified unit in the specified vehicle (in the named seat)
(unit_board_vehicle <unit> <string_id>)
Causes the given unit to attempt to board the named seat
(unit_set_emotion <unit> <short>)
sets a unit's facial expression (-1 is none, other values depend on unit)
(unit_set_emotion_animation <unit> <string_id>)
sets the emotion animation to be used for the given unit
(unit_set_emotional_state <unit> <string_id> <real> <short>)
sets a unit's facial expression by name with weight and transition time
(unit_enable_eye_tracking <unit> <boolean>)
enable/disable eye aiming on a unit
(unit_in_vehicle <unit>)
returns true if the given unit is seated on a parent unit
(vehicle_test_seat_list <vehicle> <string_id> <object_list>)
tests whether the named seat has an object in the object list (use "" to test all seats for any unit in the list)
(vehicle_test_seat <vehicle> <string_id> <unit>)
tests whether the named seat has a specified unit in it (use "" to test all seats for this unit)
(unit_set_prefer_tight_camera_track <unit> <boolean>)
sets the unit to prefer a tight camera track
(unit_exit_vehicle <unit>)
makes a unit exit its vehicle
(unit_exit_vehicle <unit> <short>)
makes a unit exit its vehicle (0 = normal exit to airborne, 1 = ejection, 2 = ejection + death, 3 = exit to ground)
(unit_set_maximum_vitality <unit> <real> <real>)
sets a unit's maximum body and shield vitality
(units_set_maximum_vitality <object_list> <real> <real>)
sets a group of units' maximum body and shield vitality
(unit_set_current_vitality <unit> <real> <real>)
sets a unit's current body and shield vitality
(units_set_current_vitality <object_list> <real> <real>)
sets a group of units' current body and shield vitality
(vehicle_load_magic <object> <unit_seat_mapping> <object_list>)
makes a list of units (named or by encounter) magically get into a vehicle, in the substring-specified seats (e.g. CD-passenger... empty string matches all seats)
(vehicle_unload <object> <unit_seat_mapping>)
makes units get out of an object from the substring-specified seats (e.g. CD-passenger... empty string matches all seats)
(unit_set_animation_mode <unit> <string_id>)
this unit will assume the named animation mode
(magic_melee_attack)
causes player's unit to start a melee attack
(vehicle_riders <unit>)
returns a list of all riders in a vehicle
(vehicle_driver <unit>)
returns the driver of a vehicle
(vehicle_gunner <unit>)
returns the gunner of a vehicle
(unit_get_health <unit>)
returns the health [0,1] of the unit, returns -1 if the unit does not exist
(unit_get_shield <unit>)
returns the shield [0,1] of the unit, returns -1 if the unit does not exist
(unit_get_total_grenade_count <unit>)
returns the total number of grenades for the given unit, 0 if it does not exist
(unit_has_weapon <unit> <object_definition>)
returns TRUE if the <unit> has <object> as a weapon, FALSE otherwise
(unit_has_weapon_readied <unit> <object_definition>)
returns TRUE if the <unit> has <object> as the primary weapon, FALSE otherwise
(unit_lower_weapon <unit> <short>)
lower the units weapon over x ticks
(unit_raise_weapon <unit> <short>)
raises the units weapon over x ticks
(unit_animation_forced_seat <string_id>)
all units controlled by the player will assume the given seat name (valid values are 'asleep', 'alert', 'stand', 'crouch' and 'flee')
(unit_doesnt_drop_items <object_list>)
prevents any of the given units from dropping weapons or grenades when they die
(unit_impervious <object_list> <boolean>)
prevents any of the given units from being knocked around or playing ping animations
(unit_suspended <unit> <boolean>)
stops gravity from working on the given unit
(unit_add_equipment <unit> <starting_profile> <boolean> <boolean>)
adds/resets the unit's health, shield, and inventory (weapons and grenades) to the named profile. resets if third parameter is true, adds if false. weapons will be marked as garbage if fourth parameter is true (for respawning equipment).
(weapon_hold_trigger <weapon> <long> <boolean>)
turns the trigger for a weapon on/off
(weapon_enable_warthog_chaingun_light <boolean>)
turns the trigger for a weapon on/off
(device_set_never_appears_locked <device> <boolean>)
changes a machine's never_appears_locked flag, but only if paul is a bastard
(device_set_power <device> <real>)
immediately sets the power of a named device to the given value
(device_get_power <device>)
gets the current power of a named device
(device_set_position <device> <real>)
set the desired position of the given device (used for devices without explicit device groups)
(device_get_position <device>)
gets the current position of the given device (used for devices without explicit device groups)
(device_set_position_immediate <device> <real>)
instantaneously changes the position of the given device (used for devices without explicit device groups
(device_group_get <device_group>)
returns the desired value of the specified device group.
(device_group_set <device> <device_group> <real>)
changes the desired value of the specified device group.
(device_group_set_immediate <device_group> <real>)
instantaneously changes the value of the specified device group.
(device_one_sided_set <device> <boolean>)
TRUE makes the given device one-sided (only able to be opened from one direction), FALSE makes it two-sided
(device_operates_automatically_set <device> <boolean>)
TRUE makes the given device open automatically when any biped is nearby, FALSE makes it not
(device_closes_automatically_set <device> <boolean>)
TRUE makes the given device close automatically after it has opened, FALSE makes it not
(device_group_change_only_once_more_set <device_group> <boolean>)
TRUE allows a device to change states only once
(device_set_position_track <device> <string_id> <real>)
set the desired position track animation to use (optional interpolation time onto track)
(device_set_overlay_track <device> <string_id>)
set the desired overlay animation to use
(device_animate_position <device> <real> <real> <real> <real> <boolean>)
animate the position over time
(device_animate_overlay <device> <real> <real> <real> <real>)
animate the overlay over time
(cheat_all_powerups)
drops all powerups near player
(cheat_all_weapons)
drops all weapons near player
(cheat_all_vehicles)
drops all vehicles on player
(cheat_teleport_to_camera)
teleports player to camera location
(cheat_active_camouflage <boolean>)
gives the player active camouflage
(cheat_active_camouflage_by_player <short> <boolean>)
gives a specific player active camouflage
(cheats_load)
reloads the cheats.txt file
(drop <string>)
drops the named tag e.g. objects\vehicles\banshee\banshee.vehicle
(ai_enable <boolean>)
turns all AI on or off.
(ai_enabled)
returns whether AI is turned on or off.
(ai_grenades <boolean>)
turns grenade inventory on or off.
(ai_dialogue_enable <boolean>)
turn combat dialogue on/off
(ai_dialogue_log_reset)
reset the dialogue log
(ai_dialogue_log_dump <string>)
dump a file of the given name with csv statistics on vocalizations
(ai_get_object <ai>)
returns the unit/object corresponding to the given actor
(ai_get_unit <ai>)
returns the unit/object corresponding to the given actor
(ai_attach <unit> <ai>)
attaches the specified unit to the specified encounter.
(ai_attach_units <object_list> <ai>)
attaches the specified list of units to the specified encounter.
(ai_detach <unit>)
detaches the specified unit from all AI.
(ai_detach_units <object_list>)
detaches the specified list of units from all AI.
(ai_place <ai>)
places the specified squad on the map.
(ai_place <ai> <short>)
places the given number of members of the specified squad.
(ai_place_in_vehicle <ai> <ai>)
places the specified squad (1st arg) on the map in the vehicles belonging to the specified vehicle squad (2nd arg).
(ai_cannot_die <ai> <boolean>)
AI cannot die from damage (as opposed to by scripting)
(ai_vitality_pinned <ai>)
Returns true if the ai's units are ALL vitality pinned (see object_vitality_pinned)
(ai_overcomes_oversteer <ai> <boolean>)
Don't use this for anything other than bug 3926. AI magically cancels vehicle oversteer.
(ai_kill <ai>)
instantly kills the specified encounter and/or squad.
(ai_kill_silent <ai>)
instantly and silently (no animation or sound played) kills the specified encounter and/or squad.
(ai_erase <ai>)
erases the specified encounter and/or squad.
(ai_erase_all)
erases all AI.
(ai_disposable <ai> <boolean>)
enables or disables automatic garbage collection for actors in the specified encounter and/or squad.
(ai_select <ai>)
selects the specified squad.
(ai_deselect)
clears the selected encounter.
(ai_set_deaf <ai> <boolean>)
enables or disables hearing for actors in the specified encounter.
(ai_set_blind <ai> <boolean>)
enables or disables sight for actors in the specified encounter.
(ai_magically_see <ai> <ai>)
Make one squad magically aware of another.
(ai_magically_see_object <ai> <object>)
Make a squad magically aware of a particular object.
(ai_set_active_camo <ai> <boolean>)
Turn on active camoflage on actor/squad/squad-group
(ai_suppress_combat <ai> <boolean>)
Turn on/off combat suppression on actor/squad/squad-group
(ai_migrate <ai> <ai>)
makes all or part of an encounter move to another encounter.
(ai_allegiance <team> <team>)
creates an allegiance between two teams.
(ai_allegiance_remove <team> <team>)
destroys an allegiance between two teams.
(ai_braindead <ai> <boolean>)
makes a group of actors braindead, or restores them to life (in their initial state)
(ai_braindead_by_unit <object_list> <boolean>)
makes a list of objects braindead, or restores them to life. if you pass in a vehicle index, it makes all actors in that vehicle braindead (including any built-in guns)
(ai_disregard <object_list> <boolean>)
if TRUE, forces all actors to completely disregard the specified units, otherwise lets them acknowledge the units again
(ai_prefer_target <object_list> <boolean>)
if TRUE, *ALL* enemies will prefer to attack the specified units. if FALSE, removes the preference.
(ai_teleport_to_starting_location_if_outside_bsp <ai>)
teleports a group of actors to the starting locations of their current squad(s) if they are currently outside the world.
(ai_renew <ai>)
refreshes the health and grenade count of a group of actors, so they are as good as new
(ai_force_active <ai> <boolean>)
forces an encounter to remain active (i.e. not freeze in place) even if there are no players nearby
(ai_force_active_by_unit <unit> <boolean>)
forces a named actor that is NOT in an encounter to remain active (i.e. not freeze in place) even if there are no players nearby
(ai_playfight <ai> <boolean>)
sets an encounter to be playfighting or not
(ai_reconnect)
reconnects all AI information to the current structure bsp (use this after you create encounters or command lists in sapien, or place new firing points or command list points)
(ai_berserk <ai> <boolean>)
forces a group of actors to start or stop berserking
(ai_set_team <ai> <team>)
makes an encounter change to a new team
(ai_allow_dormant <ai> <boolean>)
either enables or disables automatic dormancy for a group of actors
(ai_is_attacking <ai>)
returns whether a platoon is in the attacking mode (or if an encounter is specified, returns whether any platoon in that encounter is attacking)
(ai_fighting_count <ai>)
return the number of actors that are fighting in a squad or squad_group
(ai_living_count <ai>)
return the number of living actors in the specified encounter and/or squad.
(ai_living_fraction <ai>)
return the fraction [0-1] of living actors in the specified encounter and/or squad.
(ai_strength <ai>)
return the current strength (average body vitality from 0-1) of the specified encounter and/or squad.
(ai_swarm_count <ai>)
return the number of swarm actors in the specified encounter and/or squad.
(ai_nonswarm_count <ai>)
return the number of non-swarm actors in the specified encounter and/or squad.
(ai_actors <ai>)
converts an ai reference to an object list.
(ai_allegiance_broken <team> <team>)