UNN
Member-
Content Count
1767 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by UNN
-
Would you like to see a WW2 Eastern Front Mod?
UNN replied to =Spetsnaz='s topic in ARMA 2 & OA - ADDONS & MODS: DISCUSSION
I have exactly the same thought every time I play Arma2 online. Eastern front gets my vote, worlds were won and lost. -
But you can display a regular object thats normaly used as a proxy, just to make sure your current method is correct?
-
You generaly use proxies defined in CfgNonAIVehicles if they have special properties and simulations, like NV Goggles, Weapons, flags or random proxy selections e.t.c But if you do use the CfgNonAIVehicles method, then they are referenced differently in O2. For example your proxy config: class ProxyFern01 Would look like this in O2: proxy:Fern01.001 Just create a new proxy in O2, and put Fern01 as the proxy name. The engine automatical applies the prefix "proxy" when seaching through the configs. Edit: I should mention with this method they will only show up in game and not in Buldozer. But as T_D said, you may as well link directly to the p3d. Unless this is a requirement to get your proxies animated or map based objects?
-
Making a local script activate globally.
UNN replied to Richmuel UK's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I use SetVehicleInit when I want to remember all the actions for JIP players. Things like a user action to lay AP mines e.t.c But for a one off broadcast, it's no better or worse than any of the others. Creating an object just for the sake of it though...is a bit decadent :) -
Making a local script activate globally.
UNN replied to Richmuel UK's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Don't try and do to much in one go. Also try and get used to debugging your code. You will achieve far more that way, than waiting for someone to provide you with an ideal solution. For example create a simple mission with an object, call it Object01. Then create an init.sqf with the following: Init.sqf: Object01 AddAction ["Activate","ActivateScript.sqf"]; "ACTIVATION_STATUS" addPublicVariableEventHandler {Hint (_this select 1)}; For ActivateScript.sqf use this: ACTIVATION_STATUS="Someone has activated the user action!"; PublicVariable "ACTIVATION_STATUS"; If you can get that working ok, then you move onto the next step. Let us know how you get on. -
Making a local script activate globally.
UNN replied to Richmuel UK's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
There are, your markers for example. But some commands are local, so you have to take that into account. I didn't realize you were working with sqs. The above example was intended to be in sqf. If you check Arma2.rpt you will find a load of script errors. I've edited the example, so it might be worth you trying it again. But you will have to use the exact filenames, with the sqf extension. -
While... Do... Not working - Please help!
UNN replied to Frostman's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Missing a ; at the end of this line: private["_i","_rawaddress"] Should be: private ["_i","_rawaddress"]; You have to check Arma2.rpt now, as thats the only place it reports syntax errors. -
Making a local script activate globally.
UNN replied to Richmuel UK's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I would use addPublicVariableEventHandler, that way you can cater for JIP. Ok, I have'nt done much MP stuff in Arma2, but you could try this: Init.sqf: //Assuming you don't have to setup tasks on a dedicated server? If isServer Then { RIC_CURRENT_TASK=1 ; PublicVariable "RIC_CURRENT_TASK"; } Else { "RIC_CURRENT_TASK" addPublicVariableEventHandler {[_this select 1] ExecVM "TaskChanged.sqf"}; }; TaskChanged.sqf: _TaskID=_This Select 0; Switch (_TaskID) Do { Case 1 : {//Do Your first objective here}; Case 2 : { hint "Map found!\nBriefing Updated."; // Secondary Objective tskObj4 = player createSimpleTask["Secondary: Investigate Camp"]; tskObj4 setSimpleTaskDescription["The map from those bags shows another NAPA camp <marker name='OP2'>here.</marker> We should search it for more intel.", "Investigate Camp", "Investigate Camp"]; // Secondary Objective tskObj4_1 = player createSimpleTask["Secondary: Clear Checkpoints"]; tskObj4_1 setSimpleTaskDescription["The map from those bags pinpoints the location of 2 NAPA checkpoints <marker name='CP1'>here</marker> and <marker name='CP2'>here.</marker> We must secure them.", "Clear Checkpoints", "Clear Checkpoints"]; }; Case 3 : {//Another objective here}; }; Your user action intel1.sqf: _intel = _this select 0; _caller = _this select 1; _id = _this select 2; RIC_CURRENT_TASK=2; Publicvariable "RIC_CURRENT_TASK"; _intel execVM "markers.sqf"; intel1 = true; _intel removeAction _id; Markers would be: Markers.sqf: _markerstr = createMarker["CP1",[832.33,13989.72,1.53]]; _markerstr setMarkerShape "ICON"; "CP1" setMarkerType "HD_Destroy"; "CP1" setMarkerColor "ColorGreen"; "CP1" setmarkerdir 45"; "CP1" setMarkerText "Checkpoint"; _markerstr = createMarker["CP2",[796.09,13672.65,1.68]]; _markerstr setMarkerShape "ICON"; "CP2" setMarkerType "HD_Destroy"; "CP2" setMarkerColor "ColorGreen"; "CP2" setmarkerdir 45"; "CP2" setMarkerText "Checkpoint"; _markerstr = createMarker["OP2",[259.32,13790]]; _markerstr setMarkerShape "ICON"; "OP2" setMarkerType "Faction_GUE"; "OP2" setMarkerText "NAPA Camp"; Haven't tested the above scripts, but I hope you get the idea. -
createUnit problems! AI won't attack!
UNN replied to MAJORdorMo's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
You need to use the setFriend command as well: _N = markerPos "N"; _S = markerPos "S"; _E = markerPos "E"; _W = markerPos "W"; //creates AI HQ _OpforHQ = createCenter east; West setFriend [East,0]; East setFriend [West,0]; //creates the AI's groups grpNorth = createGroup east; grpSouth = createGroup east; grpEast = createGroup east; grpWest = createGroup east; "RUS_Soldier1" createUnit [_N, grpNorth]; "RUS_Soldier1" createUnit [_N, grpNorth]; "RUS_Soldier1" createUnit [_N, grpNorth]; "RUS_Soldier1" createUnit [_N, grpNorth]; -
I got this when trying out different SLI rendering modes with nHancer. Can't rememeber which mode off hand, just use nHancer to find a mode that gives you comprable FPS and no flashing.
-
Turret rotation / turret orientation
UNN replied to jdestrellado's topic in ARMA - MISSION EDITING & SCRIPTING
Want the turret direction? If you don't mind trigonometry then best use WeaponDirection else use: Player SideChat Format ["Turret Dir %1",Deg ((Vehicle Player) AnimationPhase "MainTurret")] -
Eventhandlers in configs.
UNN replied to nullsystems's topic in ARMA 2 & OA : ADDONS - Configs & Scripting
If you don't want to or can't, create a config to handle the inheritance. You can always use a script: //Get all the men at the start of a mission _Processed=AllUnits; //Add the user action {_x addAction ["Unit Action", "unit_action.sqf"]} ForEach _Processed; //Run for ever While {True} Do { //Remove any null objects _Processed=_Processed-[ObjNull]; //See if there are any new men _New=AllUnits-_Processed; //We have some new men If ((Count _New)>0) Then { //Add the user action to the new men {_x addAction ["Unit Action", "unit_action.sqf"]} ForEach _New; //Add the newly processed units to the list _Processed=_Processed+_New; }; //You probably don't have to run this loop that often? Sleep 3; }; Probably need to add some extra stuff to cull dead units, but you get the idea? -
What is least CPU demanding?
UNN replied to tophe's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
waitUntil {sleep 0.1;_t = _t + 1;false}; As already mentioned, there isn't much point in this. You are essentialy doing two checks in time/frames with the added sleep command. Unless you want a loop on every frame or you really want the loops exit condition to be fired at the end of the loop, instead of the start. You may as well just use a While loop, with a sleep command? Another thing to consider is, WaitUntil (in Arma1 at least) will not stop when the player hits the escape key during a misison, unlike the While loop. I need to test this in Arma2, esp MP. If a client is manipulating a global object with a while loop and he hits the esc key. It should stop the global object from being updated. -
Accessing animation sources in scripts
UNN replied to [frl]myke's topic in ARMA 2 & OA : ADDONS - Configs & Scripting
Edit: Scratch what I just said, you have to use the animation class name from model.cfg: Player SideChat Format ["Phase %1",_vehicle AnimationPhase "IndicatorRPM"] -
Does it matter if it's more? I thought you generaly wouldn't notice the difference with any thing higher. 30FPS looks good to me, nice and smooth. If it never drops below that in MP I would be more than happy.
-
Problem with Arrays and loaded saved game.
UNN replied to squeeze's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Well multiplayer saves are new...I think? JIP adds a whole new dimension to. Init.sqs and init.sqf, along with AddAction script names. Are two of the few cases where the file extension you use dictates the expected script format. If you use init.sqf then the WaitUntil command will work ok. -
Problem with Arrays and loaded saved game.
UNN replied to squeeze's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Things like pointers get lost with saved games. Saving just writes the content of a variable to a text file. One way round it is to add checks for a restored saved game into your code. The most vulnerable scripts are those that have loops running for any amount of time, or large scripts that contain a few sleep or While, forEach loops e.t.c In Arma the Time command was reset once a saved game was loaded. So in your case you can grab the Time into a local variable. Then in your loops and after each Sleep command, do this: _Blah=_This Select 0; //Grab the scripts start time _StartTime=Time; Sleep 10; //Restore the array pointers If (Time<_StartTime) Then { Array1 = Array2; _StartTime=Time; }; //Do something with the new array pointer Array2 set[0,(Array2 select 0) + 1]; Hint Str (Array1 Select 0); [/Code] -
Well part of the problem is our auto-inheritance. When it comes to the Cargo System some vehicles are being made Cargo compatible when they shouldn't. So we are going to revise this for just the Cargo System. Flares are ok, at least they won't cause Arma to lock up. They might be launched from odd places compared to RL, but it's also down to addon makers inheriting from sensible classes and not just using the A10 for everything. The second problem is addons that don't work correctly with the ActivateAddon command and generating the 'content had been deleted error'. The F15 being a good example, I've looked through the configs and scripts but can't see why this addon generates the error when other third part addons don't. So if you find any more addons that create the 'content deleted error' please let us know. BTW I could not generate this error with our Lynx. Also this error is not fatal and does not compromise game play in any way. If I can't find any obvious reason why certain addons generate this error, I will add a function so you can activate them from the init line manually. Which unfortunately means some existing missions will have to be re-packed. Cheers
-
Yeah, your findings are correct. It's the same as the VBS2 version: setVariable (VBS2) It's a really usefull command.
-
In the past for the UAV, we had a looping script that effectivly attached the turret to the plane. So yeah that was two objects being broadcast across the network, to represent one. With the AttachTo command, there is no need for that. It can all be done localy, with just the calls to attach and detach along with any changes to the attached object, being sent when required?
-
If you haven't already, check out our video posted by Rock earlier in this thread. All that was done in Arma without the benefit of the new Arma2 commands like Attach, lockturret and screentoworld e.t.c So I think we have enough to do most things.
-
AttachTo and you -AC130 Gunship Simulation and More!
UNN replied to DaveP's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
The attach command has been in VBS2 for quite a while. In VBS you can use the SetVector commands on attached objects. I don't have ArmaII atm so I cant say if the same can be said for that. -
AttachTo and you -AC130 Gunship Simulation and More!
UNN replied to DaveP's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yeah, new the attach command is going to open up quite a few possibilities. You need to use the SetVectorUp and SetVectorDir commands once the object is attached. -
ArmedA2 Editing/modding similar to ArmedA1?
UNN replied to BeerHunter's topic in ARMA 2 & OA - ADDONS & MODS: DISCUSSION
Thats just a myth. Sqs and Sqf are just two different formats. It's how you execute those files that dictates how much cpu resource is taken up. You can bring Arma to it's knees with sqs just as easily. Sqf is more flexible. Sqs is just old. -
Yeah, would have been nice to have this built into the engine. But with the new batch of commands, modding aircraft turrets has just got a whole lot easier :)