Frantic 0 Posted January 3, 2007 Hi all. I wanna place objects like a house for example on an uneven ground, but the object should be straight and not uneven like the ground beneath it. Is there a command to make the objects straight, no matter how the ground is? with best wishes Frantic Share this post Link to post Share on other sites
feersum.endjinn 6 Posted January 3, 2007 http://community.bistudio.com/wiki/setVectorUp Share this post Link to post Share on other sites
el76 0 Posted January 3, 2007 setvectorup this setvectorup [0,0,1] into the init-field This should work. Share this post Link to post Share on other sites
Frantic 0 Posted January 3, 2007 Thx alot! now i just need to find out if it works on dedi servers too! Share this post Link to post Share on other sites
ManDay 0 Posted January 3, 2007 You doubt it will work on dedicated servers? Tell us if it doesnt work. Share this post Link to post Share on other sites
Frantic 0 Posted January 10, 2007 setvector works fine on servers too. setpos still does not work... Share this post Link to post Share on other sites
Scillion 0 Posted January 10, 2007 Make a script with this code. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;//Armed Assault Script ; _me = _this select 0 _north = _this select 1 _east = _this select 2 _height = _this select 3 _me setpos [(getpos _me select 0) + _north,(getpos _me select 1) + _east,(getpos _me select 2) + _height] put this in the init field of any unit: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[this,1,2,3] exec "nameofscript.sqs" Is this what you wanted for setpos? Good Luck. or skip the script and put this in init field:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> this setpos [(GetPos this select 0), (GetPos this select 1), 15] the this can be the name of the unit the 1 moves it north (or negative number south) the 2 moves it east(or negative number west) the 3 moves it up (or negative number down) Share this post Link to post Share on other sites
Frantic 0 Posted January 10, 2007 hej thx for trying to help. But if i use a script for putting the high, the setvector is not working anymore. and the Quote[/b] ]this setpos [(GetPos this select 0), (GetPos this select 1), 15] is not working on servers. i need a way to make setpos and setvector working at the same time... Share this post Link to post Share on other sites
Scillion 0 Posted January 10, 2007 You know more about it than I do. But I did find a page out there that might help you. (might not) Most global variables can be transmitted over the network with the exception of 1) Strings 2) Arrays however, even for the above variable types, there is a work around and that is COC Network services Certain commands are local, which means that if you run that code on machine A and the actual unit is local on Machine B, then the unit wont be effected by that command certain commands are global, which means no matter which machine you run it on, the unit/object will be affected by that command Example of a global command SETPOS Example of a local command SETDIR Problems can arise when you issue a global command on every machine eg if you have all machines run a script from say a trigger with a setpos command in thst script, the affected unit will be setpossed numerous times, this can obviously be problematic So to avoid this from happening, we can use switches, as in the example below ?(Local _unitname): _unitname setpos (getmarkerpos "Safezone") If you want specific code run on a server, then you can create a gamelogic, call it "server" and then use the following piece of code ?(Local Server): _unitname setpos (getmarkerpos "Safezone") Reason: Gamelogics created in the mission editor are local to the server only, so by referring to the name of the gamelogic as in the above example, we can be assured that the code it runs will only be run once and run on the server only Don't know if that helps. I don't really understand it. Share this post Link to post Share on other sites
t_d 47 Posted January 11, 2007 Since ArmA strings can be send over the net with publicVariable. setDir is global. Share this post Link to post Share on other sites
Scillion 0 Posted January 11, 2007 I really need a crash course in the whole " Global Commands Don't Work on Deticated Servers Thing ". Can someone with knowledge on the subject please describe the problem in a simple way. You can even say "Global commands don't work with Det. Servers Period." Then explain how to work around the problem (if possible). In a simple way. If there isn't a simple way then provide a simple mission demonstrating the right way to do it. Thx Share this post Link to post Share on other sites
Frantic 0 Posted January 12, 2007 Till now ive only found out that setpos is not working on dedicated servers. Has anyone found out more things which are not working on dedi servers? Share this post Link to post Share on other sites