

samatra
Member-
Content Count
652 -
Joined
-
Last visited
-
Medals
-
Medals
-
Everything posted by samatra
-
fn_spawnVehicle.sqf error line 70
samatra replied to hogmason's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
This usually happens when you provide invalid argument into createVehicle. Keep in mind that findEmptyPosition might return [] (empty array) if no empty position was found, likely this is the case take this into account. -
Creating the appearance of scorched ground
samatra replied to kalelovil's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
createVehicle ["CraterLong", getPos _vehicle, [], 0, "CAN_COLLIDE"]; -
Just wanted to drop in a small note about gutting animals and meat: you can't gut sheep but sheep spawn around the map.
-
Multiplayer Framework rHINT and localize
samatra posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hello. What's the best practice for having localized messages sent through Multiplayer Framework? Obviously I can't use [nil, nil, rHINT, localize "STR_SOMETHING"] call RE; so what's the best way to do it? Thank you. -
How do I spawn Weapons in my backpack using script?
samatra replied to Crocdundee's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Use unitBackpack to return backpack and then use addWeaponCargoGlobal and addMagazineCargoGlobal to add stuff into it. -
'Distance to location' inaccurate
samatra replied to zorilya's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
getPosASL(_unit) distance (getpos _location) will do too -
Sleep Issues
samatra replied to UltimateBawb's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Are you sure you run it as thread? (spawn or execVM instead of call) -
Turning a vehicle with script
samatra replied to UltimateBawb's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
You also might want to set vector up so your vehicle looks properly on slopes _veh setVectorUp(surfaceNormal(getPos _veh)); (place this after setDir, _veh is obviously your vehicle) -
Help For Machinima Recording Multiple Reruns of Multiple Angles
samatra replied to krytosss's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yes, exactly. You can name it anything else you want. Doesn't matter, but you might want to put it into player's init to keep things bit more organized. Also you can create file init.sqf and put it there, init.sqf runs automatically when you start the mission. -
need help at cargo load script
samatra replied to admiral526's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Its not a mod, its a script, you just place it into your mission, add one line into init.sqf and you are good to go. If it says that it not found, they you placed it into wrong directory. It should be your mission directory. -
Help For Machinima Recording Multiple Reruns of Multiple Angles
samatra replied to krytosss's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I hate triggers so i'll help you with code. Create dialog.sqf file in your mission directory (%userprofile%\Documents\ArmA 2 Other Profiles) dialog.sqf: sleep 10; character1 say2d "line1"; sleep 10; character2 say2d "line2"; sleep 5; character1 say2d "line3"; Now add this into init line somewhere, but once: [] execVM "dialog.sqf"; -
Multiplayer Issues
samatra replied to UltimateBawb's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Read the difference between addWeaponCargoGlobal and addWeaponCargo and topic will become clear to you. -
Which pbo contains...?
samatra replied to _qor's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Just buy ArmA 2 and have all your problem solved. Multiplayer is 90% of ArmA experience, if not all 100%. -
need help at cargo load script
samatra replied to admiral526's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Check this out, a ready solution: http://forums.bistudio.com/showthread.php?94280-R3F-Artillery-and-Logistic-Manual-artillery-and-advanced-logistic-(mission-script) -
Which pbo contains...?
samatra replied to _qor's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Bad idea, you will be unable to play online with modified pbos. -
Put Weapons & backpack in ATV?
samatra replied to GIAT industries's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Don't know what you mean by "visible", but you need addWeaponCargoGlobal addBackpackCargoGlobal Init line of ATV: this addWeaponCargoGlobal ["M16A2", 1]; -
Random Spawn of items
samatra replied to Auss's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
_cache addWeaponCargoGlobal _obj,1; to _cache addWeaponCargoGlobal [_obj,1]; Also your "ItemMap" does nothing since 4th argument is unused (_this select 3) -
Scripting AddAction to mutiple Objects
samatra replied to ravsun's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Make sure you study this: addAction You can pass anything you want with addAction as 3rd argument, for instance if you have this addAction ["Take food", "take.sqf", this]; In object's init, then it will call take.sqf and send "this" into script take.sqf: hint format ["%1", (_this select 3)]; This should show you a hint with anything you sent as 3rd argument ("this" in my example, which should be an object that has action attached to it). -
addVehicle and moving by waypoints
samatra posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Here was description of some problem which I resolved myself few minutes after I created the thread. Dear mods, please delete this thread. Thank you. -
How to make draggable image in a dialog with limited moving borders.
samatra replied to DZR_Mikhail's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Oh, just a note, this will probably move entire dialog, not just image control. I'm not sure if moving only one control with mouse is possible. As for ctrlSetPos, don't forget to commit your control changes with ctrlCommit -
How to make draggable image in a dialog with limited moving borders.
samatra replied to DZR_Mikhail's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
You need to have your dialog with movingEnable = true; and your image control with moving = true; Not sure how to restrict movement though. -
AddAction trouble for dedicated server mission
samatra replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Here is solution without Function Module, though cuel's solution might work as well //Add code that executes when publicVar_intelList gets broadcasted "publicVar_intelList" addPublicVariableEventHandler { //Go through list of intel and add action to each { _x addAction ["Take this intel for later examination","scripts\takeIntel.sqf"]; } forEach publicVar_intelList; }; if (!isServer) exitWith {}; // This is an addition for version 0.4 sleep 9; _intel1 = [i0,i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14,i15,i16,i17,i18,i19]; //array of intel items //List of intel to broadcast to other players publicVar_intelList = []; //Loop of 6 iterations (0,1,2,3,4,5) for "_i" from 0 to 5 do { //Select random intel from array _int = _intel select floor(random(count _intel1)); //Delete selected intel from array so it wouldn't get picked twice _intel1 = _intel1 - [_int]; //Add selected intel into public variable for broadcasting it publicVar_intelList = publicVar_intelList + [_int]; }; //Broadcast variable with list of intel to other players publicVariable "publicVar_intelList"; Since I didn't test the code, there are few notes about it: - It might not add actions on server (only on clients) - It might not add actions for join in progress players If any of above is correct, then i'll explain how to fix it. -
vertical object
samatra replied to MacintoshRUS's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
http://community.bistudio.com/wiki/setVectorUp -
how to attach a script to a weaponholder
samatra replied to twisted's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
If TS will decided to follow Muzzleflash's advice, then i'd recommend to use WeaponHolder_MPA which is weapon holder that doesn't delete itself when empty.