You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
apply_pdm_to_ads // Enables PDM (handling) values to be applied properly during ADS
51
51
smooth_ads_transition // Smoothly applies the ADS accuracy bonus instead of only being applied when fully ADS
52
52
allow_silencer_hide_tracer // Controls wether or not silencers can hide tracers at all
53
+
use_separate_ubgl_keybind // Use separate keybind for switching to UBGL, or use vanilla system
53
54
aimmode_remember // When switching to UBGL the weapon will remember what mode you switched from and will put you back in that mode
54
55
freelook_while_reloading // // Allows freelook during reload animations
55
-
56
-
viewport_near [0.0, 1.0] // Adjust the camera near value
56
+
57
+
viewport_near [0.0, 1.0] // Adjust the camera near value
57
58
58
59
print_bone_warnings // Print warnings when using bone_position and bone_direction functions and encounter invalid bones
59
60
@@ -375,13 +376,15 @@
375
376
function set_bone_visible(u16 id, bool bVisibility, bool bRecursive, bool bHud)
376
377
function set_bone_visible(string bone_name, bool bVisibility, bool bRecursive, bool bHud)
377
378
379
+
function list_bones(bool bHud = false)
380
+
378
381
// Torch
379
382
function update_torch()
380
-
381
-
// Script Attachments
382
-
function add_attachment(number, string);
383
-
function get_attachment(number);
384
-
function remove_attachment(number);
383
+
384
+
// Script Attachments
385
+
function add_attachment(number, string);
386
+
function get_attachment(number);
387
+
function remove_attachment(number);
385
388
}
386
389
387
390
class CArtefact : CGameObject {
@@ -549,161 +552,161 @@
549
552
["flSlowDown"] = bit.lshift(1, 31),
550
553
}
551
554
552
-
// Child class of script_light - used specifically to attach it to script_attachments
553
-
// set_position and set_direction work as an offset to the parent attachment position/direction
554
-
class attachment_script_light : script_light {
555
-
property color;
556
-
property enabled;
557
-
property hud_mode;
558
-
property lanim;
559
-
property lanim_brightness;
560
-
property range;
561
-
property shadow;
562
-
property texture;
563
-
property type;
564
-
property volumetric;
565
-
property volumetric_distance;
566
-
property volumetric_intensity;
567
-
property volumetric_quality;
568
-
569
-
attachment_script_light ();
570
-
571
-
function set_direction(vector);
572
-
function set_direction(vector, vector);
573
-
function set_direction(number, number, number);
574
-
function set_position(vector);
575
-
function set_position(number, number, number);
576
-
}
577
-
578
-
class ScriptAttachment {
579
-
function add_attachment(number, string);
580
-
function attach_light(attachment_script_light*);
581
-
function bone_callback(number, number, boolean);
582
-
function bone_callback(number, const function<matrix>&, boolean);
583
-
function detach_light();
584
-
function get_attachment(number);
585
-
function get_bone_matrix(number);
586
-
function get_bone_visible(number);
587
-
function get_center();
588
-
function get_flags();
589
-
function get_light();
590
-
function get_model();
591
-
function get_origin();
592
-
function get_parent();
593
-
function get_parent_bone();
594
-
function get_position();
595
-
function get_rotation();
596
-
function get_scale();
597
-
function get_transform();
598
-
function get_ui();
599
-
function get_ui_bone();
600
-
function get_ui_rotation();
601
-
function play_motion(string, boolean, number);
602
-
function remove_attachment(number);
603
-
function remove_bone_callback(number);
604
-
function set_bone_visible(number, boolean);
605
-
function set_flags(number);
606
-
function set_model(string, boolean);
607
-
function set_origin(vector);
608
-
function set_origin(number, number, number);
609
-
function set_parent(ScriptAttachment*);
610
-
function set_parent(game_object*);
611
-
function set_parent_bone(number);
612
-
function set_position(vector);
613
-
function set_position(number, number, number);
614
-
function set_rotation(vector);
615
-
function set_rotation(number, number, number);
616
-
function set_scale(vector);
617
-
function set_scale(number, number, number);
618
-
function set_scale(number);
619
-
function set_ui(string);
620
-
function set_ui_bone(number);
621
-
function set_ui_position(vector);
622
-
function set_ui_position(number, number, number);
623
-
function set_ui_position();
624
-
function set_ui_rotation(vector);
625
-
function set_ui_rotation(number, number, number);
626
-
}
627
-
628
-
flags:
629
-
["eSA_RenderHUD"] = 1,
630
-
["eSA_RenderWorld"] = 2,
631
-
["eSA_CamAttached"] = 4,
632
-
633
-
Script Attachment examples:
634
-
635
-
-- adds script attachment with model gamedata\meshes\test\box.ogf to the actor's current active item in slot 1 (slots range from 0 to 65535)
636
-
local att = db.actor:active_item():add_attachment(1, "test\\box")
637
-
638
-
-- setting attachment parameters
639
-
640
-
-- functions accept both vectors or three values, scale even accepts one value
641
-
att:set_position(0,1,2)
642
-
att:set_rotation(vector():set(0,90,0))
643
-
att:set_scale(0.9)
644
-
645
-
-- render both on hud and world model (default is 2 -> only on world model)
646
-
att:set_flags(3)
647
-
648
-
-- create an attachment_script_light (can use script_light functions and properties)
649
-
-- ! make sure to keep a reference to the script light or it will be garbage collected !
650
-
att_light = attachment_script_light()
651
-
att_light.type = 2
652
-
att_light.hud_mode = true
653
-
654
-
-- attachment_script_light position and direction work as an offset to the attachment position/direction
655
-
att_light:set_position(0,0,2)
656
-
att_light:set_direction(0,90,0)
657
-
att_light:set_cone(math.rad(0.5))
658
-
att_light.color = fcolor():set(1,0,0,1)
659
-
660
-
-- attach it to the script attachment
661
-
att:attach_light(att_light)
662
-
663
-
664
-
-- attach the model to the actor instead of their active item
665
-
att:set_parent(db.actor)
666
-
667
-
-- make it a camera attachment
668
-
att:set_flags(4)
669
-
670
-
-- you can attach attachments to other attachments
671
-
att2 = att:add_attachment(0, "test\\box2")
672
-
att3 = att2:add_attachment(0, "test\\box2")
673
-
674
-
-- and transfer the whole chain of attachments to another parent
675
-
-- this will transfer att and its child attachments to the new parent
676
-
att:set_parent(db.actor:active_item())
677
-
678
-
-- same for child attachments
679
-
att3:set_parent(npc)
680
-
681
-
-- it's also possible to change the model at any time
682
-
-- the boolean tells the engine if existing bone callbacks should be kept in place or if they should be removed
683
-
att3:set_model("armor\\boots", false)
684
-
685
-
-- bone callbacks can be added like this
686
-
-- there are two types of bone callbacks
687
-
-- this makes the bone 1 of the attachment model follow the position of bone 6 of its parent object, the boolean tells the engine to overwrite any animation positions
688
-
-- same with bone 2 of the attachment model to bone 10 of the parent object
689
-
att3:bone_callback(1, 6, false)
690
-
att3:bone_callback(2, 10, false)
691
-
692
-
-- the second type of bone callbacks uses a script callback to change the position of a bone in real time
693
-
local lock = db.actor:add_attachment(1234, "interface\\lockpick\\lock3")
694
-
lock:set_flags(4)
695
-
lock:set_rotation(90,0,0)
696
-
lock:set_position(0,0,0.09)
697
-
-- the callback function "cylinder_callback" will be used to adjust the position of bone 1
// Child class of script_light - used specifically to attach it to script_attachments
556
+
// set_position and set_direction work as an offset to the parent attachment position/direction
557
+
class attachment_script_light : script_light {
558
+
property color;
559
+
property enabled;
560
+
property hud_mode;
561
+
property lanim;
562
+
property lanim_brightness;
563
+
property range;
564
+
property shadow;
565
+
property texture;
566
+
property type;
567
+
property volumetric;
568
+
property volumetric_distance;
569
+
property volumetric_intensity;
570
+
property volumetric_quality;
571
+
572
+
attachment_script_light ();
573
+
574
+
function set_direction(vector);
575
+
function set_direction(vector, vector);
576
+
function set_direction(number, number, number);
577
+
function set_position(vector);
578
+
function set_position(number, number, number);
579
+
}
580
+
581
+
class ScriptAttachment {
582
+
function add_attachment(number, string);
583
+
function attach_light(attachment_script_light*);
584
+
function bone_callback(number, number, boolean);
585
+
function bone_callback(number, const function<matrix>&, boolean);
586
+
function detach_light();
587
+
function get_attachment(number);
588
+
function get_bone_matrix(number);
589
+
function get_bone_visible(number);
590
+
function get_center();
591
+
function get_flags();
592
+
function get_light();
593
+
function get_model();
594
+
function get_origin();
595
+
function get_parent();
596
+
function get_parent_bone();
597
+
function get_position();
598
+
function get_rotation();
599
+
function get_scale();
600
+
function get_transform();
601
+
function get_ui();
602
+
function get_ui_bone();
603
+
function get_ui_rotation();
604
+
function play_motion(string, boolean, number);
605
+
function remove_attachment(number);
606
+
function remove_bone_callback(number);
607
+
function set_bone_visible(number, boolean);
608
+
function set_flags(number);
609
+
function set_model(string, boolean);
610
+
function set_origin(vector);
611
+
function set_origin(number, number, number);
612
+
function set_parent(ScriptAttachment*);
613
+
function set_parent(game_object*);
614
+
function set_parent_bone(number);
615
+
function set_position(vector);
616
+
function set_position(number, number, number);
617
+
function set_rotation(vector);
618
+
function set_rotation(number, number, number);
619
+
function set_scale(vector);
620
+
function set_scale(number, number, number);
621
+
function set_scale(number);
622
+
function set_ui(string);
623
+
function set_ui_bone(number);
624
+
function set_ui_position(vector);
625
+
function set_ui_position(number, number, number);
626
+
function set_ui_position();
627
+
function set_ui_rotation(vector);
628
+
function set_ui_rotation(number, number, number);
629
+
}
630
+
631
+
flags:
632
+
["eSA_RenderHUD"] = 1,
633
+
["eSA_RenderWorld"] = 2,
634
+
["eSA_CamAttached"] = 4,
635
+
636
+
Script Attachment examples:
637
+
638
+
-- adds script attachment with model gamedata\meshes\test\box.ogf to the actor's current active item in slot 1 (slots range from 0 to 65535)
639
+
local att = db.actor:active_item():add_attachment(1, "test\\box")
640
+
641
+
-- setting attachment parameters
642
+
643
+
-- functions accept both vectors or three values, scale even accepts one value
644
+
att:set_position(0,1,2)
645
+
att:set_rotation(vector():set(0,90,0))
646
+
att:set_scale(0.9)
647
+
648
+
-- render both on hud and world model (default is 2 -> only on world model)
649
+
att:set_flags(3)
650
+
651
+
-- create an attachment_script_light (can use script_light functions and properties)
652
+
-- ! make sure to keep a reference to the script light or it will be garbage collected !
653
+
att_light = attachment_script_light()
654
+
att_light.type = 2
655
+
att_light.hud_mode = true
656
+
657
+
-- attachment_script_light position and direction work as an offset to the attachment position/direction
658
+
att_light:set_position(0,0,2)
659
+
att_light:set_direction(0,90,0)
660
+
att_light:set_cone(math.rad(0.5))
661
+
att_light.color = fcolor():set(1,0,0,1)
662
+
663
+
-- attach it to the script attachment
664
+
att:attach_light(att_light)
665
+
666
+
667
+
-- attach the model to the actor instead of their active item
668
+
att:set_parent(db.actor)
669
+
670
+
-- make it a camera attachment
671
+
att:set_flags(4)
672
+
673
+
-- you can attach attachments to other attachments
674
+
att2 = att:add_attachment(0, "test\\box2")
675
+
att3 = att2:add_attachment(0, "test\\box2")
676
+
677
+
-- and transfer the whole chain of attachments to another parent
678
+
-- this will transfer att and its child attachments to the new parent
679
+
att:set_parent(db.actor:active_item())
680
+
681
+
-- same for child attachments
682
+
att3:set_parent(npc)
683
+
684
+
-- it's also possible to change the model at any time
685
+
-- the boolean tells the engine if existing bone callbacks should be kept in place or if they should be removed
686
+
att3:set_model("armor\\boots", false)
687
+
688
+
-- bone callbacks can be added like this
689
+
-- there are two types of bone callbacks
690
+
-- this makes the bone 1 of the attachment model follow the position of bone 6 of its parent object, the boolean tells the engine to overwrite any animation positions
691
+
-- same with bone 2 of the attachment model to bone 10 of the parent object
692
+
att3:bone_callback(1, 6, false)
693
+
att3:bone_callback(2, 10, false)
694
+
695
+
-- the second type of bone callbacks uses a script callback to change the position of a bone in real time
696
+
local lock = db.actor:add_attachment(1234, "interface\\lockpick\\lock3")
697
+
lock:set_flags(4)
698
+
lock:set_rotation(90,0,0)
699
+
lock:set_position(0,0,0.09)
700
+
-- the callback function "cylinder_callback" will be used to adjust the position of bone 1
0 commit comments