odyseus 19 Posted September 13, 2012 (edited) hey guys i have this on a trigger. It creates the object with no problem now i want to turn it on it y axis. how can i do it. :confused: this is the code: screen = "Misc_Videoprojektor_platno" createVehicle [(getMarkerPos "place1")0,180,0]; screen setObjectTexture [0,"intel\pictures\16AA_Logo.paa"]; screen setPos [ (getPos screen select 0), (getPos screen select 1), (getPos screen select 2) +1]; does anyone know what i m doing wrong? Edited September 13, 2012 by Odyseus Share this post Link to post Share on other sites
kylania 568 Posted September 13, 2012 If you mean rotate it use setDir. Share this post Link to post Share on other sites
panther42 52 Posted September 13, 2012 screen = "Misc_Videoprojektor_platno" createVehicle [(getMarkerPos "place1")0,180,0]; I'm curious as to what the highlighted code is supposed to do? Share this post Link to post Share on other sites
odyseus 19 Posted September 13, 2012 It was just my unsuccessful try on rotating the object! :D Thx Kylania as always! I will try this right now!:D Share this post Link to post Share on other sites
odyseus 19 Posted September 14, 2012 Hey guys. I cant set height. Please take a look at my code and tell me what i m doing wrong. Remember the marker is at the LDH. I thought that by replacing +1 i would get the height but not working. :( screen = "Misc_Videoprojektor_platno" createVehicle (getMarkerPos "place1"); screen setObjectTexture [0,"intel\pictures\16AA_Logo.paa"]; screen setPos [getPos screen select 0, getPos screen select 1, (getPos screen select 2) +1]; screen setDir 180; Share this post Link to post Share on other sites
f2k sel 164 Posted September 14, 2012 (edited) screen = "Misc_Videoprojektor_platno" createVehicle (getMarkerPos "place1"); screen setObjectTexture [0,"intel\pictures\16AA_Logo.paa"]; screen setPosASL [getPosASL screen select 0, getPosASL screen select 1, 15.9]; screen setDir 180; you may need to adjust the height to get the exact position. Edited September 14, 2012 by F2k Sel Share this post Link to post Share on other sites
odyseus 19 Posted September 14, 2012 Thank you brother!!!!! :D Got it!!! Share this post Link to post Share on other sites
Deadfast 43 Posted September 14, 2012 I'd wary of using setPosASL on the LHD, the height of your object will change as the tide changes. Share this post Link to post Share on other sites
odyseus 19 Posted September 14, 2012 I'd wary of using setPosASL on the LHD, the height of your object will change as the tide changes. So what is the best solution? Share this post Link to post Share on other sites
odyseus 19 Posted September 18, 2012 (edited) Hey F2K would this work ?? screen setVehicleVarName "sign_1"; I want to name the projector sign_1 how do i do it? Edited September 18, 2012 by Odyseus Share this post Link to post Share on other sites
kylania 568 Posted September 18, 2012 I want to name the projector sign_1 how do i do it? Just a few posts down you'll find this answer. Share this post Link to post Share on other sites
odyseus 19 Posted September 18, 2012 Sorry Kylania!!! I dont see it "I m stupid" :( How does that apply to my case? uhnnnnnn?? Share this post Link to post Share on other sites
panther42 52 Posted September 18, 2012 Odyseus, you're already using a global variable for your projector. screen is global, as it does not have the underscore(_). screen = "Misc_Videoprojektor_platno" createVehicle (getMarkerPos "place1"); screen setObjectTexture [0,"intel\pictures\16AA_Logo.paa"]; screen setPosASL [getPosASL screen select 0, getPosASL screen select 1, 15.9]; screen setDir 180; Do you just want to access the global variable, or are you dead set on "naming" it, as would be done in the editor name field? You could just change screen to sign_1, or use the missionNameSpace like kylania said. More info here on missionNameSpace: missionNamespace Share this post Link to post Share on other sites
kylania 568 Posted September 18, 2012 (edited) Ok here's a demo. This is simple, but the logic to get there is a little abstract so probably is confusing. :) First we have a row of signs, all colored red. Then we have triggers which will turn the signs green when a specific unit (bob_0 through bob_3) exist by a simple "alive bob_2" condition for example. Left most sign is 0, right most would be 3. This should all be easy to understand. Then we have a spawning trigger which rolls a random number, 0 through 3, hints it to you so you know which sign should be changing then creates a vehicle using bob_x as it's name. Here's the code for that trigger: roll = floor(random 4); hint format["Roll was %1", roll]; missionNamespace setVariable [[color="#FF8C00"]format ["bob_%1", roll][/color], [color="#FF0000"]"HMMWV" createVehicle getMarkerPos "spawnMarker"[/color]]; Looks complicated at first, but it's really just 2 things. The first part of the code in orange simply takes the roll and and creates a string of bob_x from it. So bob_1 if the roll was 1 or bob_0 if the roll was 0. The second part in red is a simple createVehicle command to make a HMMWV at the marker "spawnMarker". By using it this way we're essentially doing this: bob_1 = "HMMWV" createVehicle getMarkerPos "spawnMarker" but doing it randomly! So we create the random roll, name and therefore vehicle by the missionNamespace command which Celery had mentioned in the thread I linked and that name is then useable in the game as the four triggers show. Make sense? :) You could compact the whole thing into this: missionNamespace setVariable [format ["bob_%1", floor(random 4)], "HMMWV" createVehicle getMarkerPos "spawnMarker"]; But I left the roll separate so you could see it working. Edited September 18, 2012 by kylania Share this post Link to post Share on other sites
odyseus 19 Posted September 21, 2012 sadly i can could not find the projector screen on the map so I had to spaw one by trigger. I though screen was the name. I try changing it to sign_1 but i was getting some error. Do not know why. So i use set Variable and it worked. Thx guys, I will learn i promise. :) Thank you Kylania I will study your walkthrough :) Share this post Link to post Share on other sites
ALEX.50 0 Posted December 3, 2019 screen = "Misc_Videoprojektor_platno" createVehicle [(getMarkerPos "place1")0,180,0]; screen setObjectTexture [0,"intel\pictures\16AA_Logo.paa"]; screen setPos [ (getPos screen select 0), (getPos screen select 1), (getPos screen select 2) +1]; +1 to +2 EX: screen setPos [ (getPos screen select 0), (getPos screen select 1), (getPos screen select 2) +2]; Script Download My https://www.4shared.com/rar/YY32rqq_ea/16aa_Briefing_Script_demoutes.html http://www.armaholic.com/page.php?id=15289 https://prnt.sc/q5d0je Share this post Link to post Share on other sites