BomosBoy 13 Posted July 12, 2016 I have 3 questions about the rscObject / CT_OBJECT: 1. How i can enable/disable the moving of the Object with the mouse? 2. Which variable sets the position on the screen? (i need my object on the top right corner) 3. Can i set the Texture of the Object afterwards? (for example a weapon with a new skin) Thats my code and i never worked with ui objects before... class Test { idc = 5004; type = 82; enableZoom = 0; zoomDuration = 0.001; inBack = 1; model="\A3\Structures_F\Items\Food\Can_V3_F.p3d"; direction[]={0,0.5,0.5}; up[]={0,1,0}; scale="0.47 * 0.875 * (SafeZoneW Min SafeZoneH)"; xBack = 0.5; yBack = 0.5; zBack = 1.2; x = 0.5; y = 0.5; z = 0.2; }; Share this post Link to post Share on other sites
soolie 189 Posted July 13, 2016 class Test { idc = 5004; type = 82; movingEnable = false; // true to enable moving dialog with mouse enableZoom = 0; zoomDuration = 0.001; inBack = 1; model="\A3\Structures_F\Items\Food\Can_V3_F.p3d"; direction[]={0,0.5,0.5}; up[]={0,1,0}; scale="0.47 * 0.875 * (SafeZoneW Min SafeZoneH)"; xBack = 0.5; yBack = 0.5; zBack = 1.2; // x and y are the position on the screen. // current x and y put the top left corner of the object into the top left corner of the screen. // Use z in addition to scale to fine tune the size/ zoom of the object x = 0 * safezoneW + safezoneX; y = 0 * safezoneH + safezoneY; z = 2; }; As for the texture. Each object has a base model(.p3d). When the object is actually created in game, then it adds the texture it's supposed to or told to by scripting. In a dialog you are just displaying the base model and not creating the object so it's appearance cannot be changed. This is as far as I know and would love if someone could prove me wrong, and show me how to do it. Also, feel free to check out my GUI tutorial https://forums.bistudio.com/topic/189494-gui-tutorial-and-simple-vehicle-selector-release/ 2 Share this post Link to post Share on other sites
kylania 568 Posted July 13, 2016 Also, feel free to check out my GUI tutorial https://forums.bistudio.com/topic/189494-gui-tutorial-and-simple-vehicle-selector-release/ Wow! A recent, PRETTY, GUI tutorial? Thank you! :) 1 Share this post Link to post Share on other sites
BomosBoy 13 Posted July 13, 2016 Yea thank you! The problem is that i tired to add some vehicles as objects but they (like you said) have only the base texture (offroad is red everytime). I wanted to create my loadout menu with a weapon preview but i think thats not working if i cant change the texture..... EDIT: I added onObjectMoved = "(_this select 0) ctrlEnable false" to deactivate the moving of the object / mouse. Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted July 13, 2016 You could locally spawn the weapon in a weaponholder set to the screenToWorld position instead. Cheers Share this post Link to post Share on other sites