DooM4MR 10 Posted March 19, 2012 (edited) Hello, Iam learning Arma 2 scripting and I have 2 questions (for now ;)): couldn't find this info here... so > How to spawn vehicle and make it flipped or on side, for example, crashed car that will spawn on its side? > is it possible to create light source, set the radius of it to 2m for example, and its blur and then rotate it so its lights forward and attach it to players hand? (like flashlight but in A2) :confused: > how to make faster day/night change? for example 1 hour its night and next hour its night etc? > can triggers make environmental chnages such as crush bridge for example? > can I script AI behaviors,to make AI unit (soldier) do some action that never was in its logics? hmm cant think of good example now :\ lets say to make him move silently and undetected and sneak behind the player or something like this, to make AI smarter then they are. unrelated question, I dont want to open new thread for it, is ACE2 mod is for Arma 2 or OA only? I cant find this mod for arma 2 help please! Does arma 2 servers are same servers as for A2F? Thanks :). Edited March 19, 2012 by DooM4MR Share this post Link to post Share on other sites
hellfire257 3 Posted March 23, 2012 (edited) I can answer your first one. You can use BIS_fnc_setPitchBank. It is a function so make sure you initialise it somewhere (init.sqf for example) and have the functions module placed. Use this line to initialise it: BIS_fnc_setPitchBank = compile preprocessFileLineNumbers "ca\modules\functions\objects\fn_setPitchBank.sqf"; Here are the usage instructions taken from the function itself: /************************************************************ Set Pitch and Bank By Andrew Barron Parameters: [object, pitch, bank] Returns: nothing Rotates an object, giving it the specified pitch and bank, in degrees. Pitch is 0 when the object is level; 90 when pointing straight up; and -90 when pointing straight down. Bank is 0 when level; 90 when the object is rolled to the right, -90 when rolled to the left, and 180 when rolled upside down. Note that the object's yaw can be set with the setdir command, which should be issued before using this function, if required. The pitch/bank can be leveled out (set to 0) by using the setdir command. Example: [player, 45, -45] call BIS_fnc_setPitchBank ************************************************************/ Edited March 23, 2012 by Hellfire257 Share this post Link to post Share on other sites
DementedFool117 10 Posted March 23, 2012 Answer to the second one: yes it is possible, by either waypoints (INACCURATE and delayed/interceptable/not very reliable) or scripts with "Move", "Target", "setCombatmode" and other commands, but this is very tricky and I don't even dare to try to explain, since it is, well, very complicated if you want sophisticated measures to be taken by the AI. Also, scriptlag and general AI behaviour MAY cause glitchyness and may not work a 100% perfect (as in most maps and scripts out there), but it is entirely possible by either triggers or looped scripts with several requirements to advance to the next "stage" of the script. Best tear one of the Zeus_AI scripts apart and some of the Insurgency (or other Maps with deep AI-Scripting) to see how they get the AI to move and do all kinds of hijinx. Share this post Link to post Share on other sites