poweruser
Member-
Content Count
248 -
Joined
-
Last visited
-
Medals
Everything posted by poweruser
-
Civi dies as he picks up a weapon
poweruser replied to Kerry's topic in ARMA - MISSION EDITING & SCRIPTING
Post what you did with that "other line". Something like this? <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _allowedItems = ["ACE_Bandage"]; Â _allowedItems = ["ACE_Morphine"]; It should be: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_allowedItems = ["ACE_Bandage","ACE_Morphine"]; -
Civi dies as he picks up a weapon
poweruser replied to Kerry's topic in ARMA - MISSION EDITING & SCRIPTING
1) By giving those global variables the prefix/tag "Kerry_", I'm making sure that I'm using a variable name, which is not already used by some other addon or mod. This simply avoids overlaps, that would cause errors or break some functionality. 2) Both edit: updated the script above - removes dead or non-existent units from the array Kerry_watchedUnits now - fixed a typo - list of allowed items is a local variable now -
Civi dies as he picks up a weapon
poweruser replied to Kerry's topic in ARMA - MISSION EDITING & SCRIPTING
go to your mission folder, and create a empty text file in there. Rename it to "scriptofdeath.sqf" (w/o the quotes). Copy-paste this code in there <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">private["_items","_allowedItems","_x"]; if(isServer) then {     if(isnil "Kerry_scriptOfDeath") then {         Kerry_scriptofDeath = true;         Kerry_watchedUnits = [(_this select 0)];         _allowedItems = [];  // here you can add class names of items that are allowed                   // example:   _allowedItems = ["30Rnd_556x45_Stanag"];         while { (count Kerry_watchedUnits) > 0 } do {             {                 if(isNull _x || (!alive _x)) then {                     Kerry_watchedUnits = Kerry_watchedUnits - [_x];                 } else {                     _items = ((magazines _x) + (weapons _x)) - _allowedItems;                     if(count _items > 0) then {                         _x setdamage 1;                         Kerry_watchedUnits = Kerry_watchedUnits - [_x];                     };                 };             } forEach Kerry_watchedUnits;             sleep 5;         };         Kerry_scriptofDeath = nil;     } else {         Kerry_watchedUnits = Kerry_watchedUnits + [_this select 0];     }; }; true In the mission editor, copy-paste this line <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">tmp  = [this] execVM "scriptofdeath.sqf" into the Initialisation text field of each unit that shall not carry anything. -
check which side killed someone
poweruser replied to Specter's topic in ARMA - MISSION EDITING & SCRIPTING
the entry "GUER" from array in the last the line as well. Check my post above, I edited it for your needs and shortened it a bit -
check which side killed someone
poweruser replied to Specter's topic in ARMA - MISSION EDITING & SCRIPTING
At mission start init a counter variable for each side and the kills limit: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">counterWest = 0; counterEast = 0; civDeathLimit = 4; Then give each each civilian a killed eventhandler: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this addeventhandler ["killed", {_this execVM "civkilled.sqf";}]; civkilled.sqf: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">private["_killer","_currVal"]; _killer = _this select 1; _currVal = 0; if(side _killer == west || side _killer == east) then {     _currVal = call (compile format["counter%1 = counter%1 + 1; counter%1", side _killer]);     if(_currVal == civDeathLimit) then {         [side _killer] execVM "armCivilians.sqf";         // remove the following 2 lines if you want the civs to be able to go mad at more than one faction         // an alternative to setting all counters higher than the limit, is to remove the "killed"-ehs from the remaining civ units.         counterWest = 5;         counterEast = 5;     }; }; In the script 'armCivilians.sqf' you can go on now on your own, with arming them and telling them to attack the new enemys ( the value (_this select 0) holds the side that reached the limit). The command 'setFriend' doesn't seem to have any effects on the civilian side, but you can order a civ unit to attack a single target with the command 'doFire'. -
units assigned to vehicle but then won't move
poweruser replied to versus's topic in ARMA - MISSION EDITING & SCRIPTING
Will the group leader be in the same hmmwv as well? Then assign/movein him as driver -
You can use a firewall to block the used ports on all IPs, except the one you want it to run on. Then you have to set up the servers to use different ports of course ( -port= option). ArmA ports (all UDP): port (default: 2302) incoming & outgoing port+1  incoming  (server-query, gamespy) port+3  incoming & outgoing  (VoN)
-
In the class 'f15c_mod_mesh' the property type is set up wrong. It expects a integer, not a string (currently: "VAir"). Changing it's value to 2, will fix it.
-
Trigger Condition: Height of Aircraft
poweruser replied to mattxr's topic in ARMA - MISSION EDITING & SCRIPTING
That's just a sidenote on performance, the shorter the list the less cpu time is required to check all entries. And the trigger runs this count check every cycle. As destroyed aircrafts (or null-object after it has been deleted) can't fly higher than 12m, is not necessary to check them. Shouldn't matter in most cases, only if your mission will run for hours and destroyed choppers respawn (and added to the array o.c.), and trigger is set on 'repeatedly' -
Trigger Condition: Height of Aircraft
poweruser replied to mattxr's topic in ARMA - MISSION EDITING & SCRIPTING
Set up a global array, to which you add all the aircrafts that you want to observe. Trigger condition: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">({ (getPos _x) select 2 > 12} count AircraftsToWatch ) > 0 'AircraftsToWatch' is that array. From time to time clean up the array from destroyed aircrafts, in order to keep the list short. -
Weapon Shot Delay
poweruser replied to soul_assassin's topic in ARMA : CONFIGS AND SCRIPTING (addons)
What type of vehicle is it for? Tank / plane / infantry weapon ? Give it two launchers with different ammo. a) A dummy launcher and dummy ammo, which the player controls / fires (it's supposed to do nothing, just sit there and look beautiful) b) The real launcher with real ammo. But only the magazines are added to the vehicle, not the launcher. Then add a fired-eh to the vehicle. There check if the dummy launcher was fired. If yes, wait your desired delay, add the real launcher to the vehicle as well and switch to it from the dummy launcher. Then use the fire command to launch the real missile. Finally remove the real launcher again and switch back to the dummy one. Don't know if the lock on a vehicle of the dummy launcher remains for the real one. -
First you need to define your soundfile in the mission, that's done in the file description.ext http://community.bistudio.com/wiki/Description.ext#Sounds Then use the respective command to play it.
-
Requesting the Basics about addon scripting
poweruser replied to tj72's topic in ARMA : CONFIGS AND SCRIPTING (addons)
That yells for a UserAction. It does about the same as the scripting command 'addaction', but with a few more possibilites. Here's a example (2nd code box): http://community.bistudio.com/wiki/Animations The class UserActions goes into your objects class, like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgVehicles {     class xyz;     class yourObject : xyz {         // bunch of properties         class UserActions {             // define your useractions here         };     }; }; -
[Question]Custom Unit Configuration.
poweruser replied to spamurai's topic in ARMA - MISSION EDITING & SCRIPTING
The default equipment of a unit is defined in its config class.You can change it in the mission via scripting. Commands: removeallweapons , (remove/add)weapon , (remove/add)Magazine , ... Check Ofpec's comref or the Bistudio wiki for details and examples. This is definded in the config, property weaponSlots Basic abilities (medic / deactivating mines) are defined in the config of the unit. Advanced abilities, like the two you mentioned, are scripted within the mission. -
Because of this behaviour and the code <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player removeaction myaction; having some effect (it really removes the action), I'm sure the action was added to the player instead of to the radio. Multiplayer   (Assuming the action was added to the radio and works as expected): In the mission editor, create a trigger. Condition: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">ADuke_scuddisabled On Activation: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[] execVM "disabled1_mp.sqf" Now your script "disabled1.sqf" needs to be split up into 2 scripts. "disabled1.sqf" holds all commands with global effect. "disabled1_mp.sqf" holds all commands with local effect. "disabled1.sqf"   is run on the client who disables the scud <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">ADuke_scuddisabled = true; publicVariable "ADuke_scuddisabled"; player switchmove "OTKSTANDA2"; sleep 4; deletevehicle blinky1; scudonedriver setbehaviour "stealth"; scudone setfuel 0; player switchmove "AidlPercMstpSnonWnonDnon06"; sleep 5; scudonedriver leavevehicle scudone; scudonedriver setbehaviour "combat"; "disabled1_mp.sqf"    is run on all machines when someone disables the scud <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"><nameOfRadio> removeaction myaction;  // TODO: insert name of radio/control panel, to which the action was added if(player distance scudone < 20) then { playsound "disabled"; }; sleep 6; "2" objStatus "done"; TitleText["Objective Complete!! SCUD ONE is disabled","PLAIN"]; "scud1" setMarkerType "marker"; "scud1" setMarkerColor "Colorred";
-
Ingame read Addon and Config path detail
poweruser replied to [aps]gnat's topic in ARMA : CONFIGS AND SCRIPTING (addons)
Just a side note: Depending on the data type of the config entry you have to use different parse commands: getText / getNumber / getArray -
OFPEC - ArmA CfgVehicles The building classes start somewhere around the center of that site
-
Computer science starts counting at 0, not at 1. Try the turret indexes 0 and 1, instead of 1 and 2.
-
Is there a mod that changes ONLY the AI?
poweruser replied to otrebla_snake_ita's topic in ARMA - ADDONS & MODS: DISCUSSION
You should try ECS. Website: ARMA: Enhanced Configuration System Topic on this forum: Link By default it's doing alot of changes too, but they are scripted only. No changes where are done to ArmA's original game config (except weapon sound replacements). It comes with 2 setting files (in the \@ECS\bin\ Â folder), which let you turn on/off or finetune every feature of ECS. Here's a table that explains each setting: Settings table (it's in the readme files too) The settings marked with M-IAIC / IAIC have to do with ECS controlling the AIs. The weapon sounds can be reverted by removing the file ecs_armory.pbo, to get back the ai radio messages remove the file ecs_quiet.pbo For compatibility with addons that use XEH, install the ECS Themis addon as well. -
How do I change tank turret direction?
poweruser replied to Meathead's topic in ARMA - MISSION EDITING & SCRIPTING
There's no command to set the turret direction directly, but you can put an AI gunner in the tank, and tell it to target something, then the AI will turn the turret for you. -
Disabling subtitles with addon
poweruser replied to CarlGustaffa's topic in ARMA : CONFIGS AND SCRIPTING (addons)
It's the setting ECS_public10, set it to 'false' on the server to turn off the additional chat text messages. Changing it on the client machine is ineffective as the server overwrites the ecs_public settings of all clients, unless you're hosting a game on your local computer, In this file:    @ECS\bin\ECS_public.hpp change it to   ECS_public10[] = {false}; -
Determining if an object exists
poweruser replied to gunterlund's topic in ARMA - MISSION EDITING & SCRIPTING
When the object (invisible H) has not been created because of the probability of presence, then you have two possibilities to check this case: In case you know the varibale name it should have (set in the mission editor in the field "name"): <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?(isNil "variablename") : goto "exit" In case you only know a reference (_Object) that should point to this object: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?(format["%1",_Object] == "scalar bool array string 0xe0ffffef") : goto "exit" -
31st NORMANDY MOD - WW2 Â -BETA RELEASE
poweruser replied to rip31st's topic in ARMA - ADDONS & MODS: COMPLETE
ArmA: Troubleshooting: error code 8876086c This is caused by third party content using textures with non 2^n (32,64,128,256,etc) dimensions. It may not effect all video cards. That's the reason why some peoples games crash. The error messages name the texture's resolution and size, some infos to track down the incorrect files. -
Change Driver Position on Bike/Motorbike
poweruser replied to Marccom's topic in ARMA : CONFIGS AND SCRIPTING (addons)
You can do that in Oxygen2PE as well. 1) Open a any soldier/civilian model (from the sample models) 2) Make sure the window "Animations" is displayed 3) Right click in the Animations window, select "From Matrices", choose the .rtm file you want to edit 4) You'll see 3 keyframes listed (in this example; could be way more) in the Animation Window, double click the one of phase 1 or 2 and the animation, defined by the .rtm, will be applied to the model in the View window 5) Now edit the driver position like you would edit any other model (moving/rotating/...) 6) When you're done, save it by right-clicking in the Animations window, select "Export Matrices" -
Change Driver Position on Bike/Motorbike
poweruser replied to Marccom's topic in ARMA : CONFIGS AND SCRIPTING (addons)
You need to edit the driver animations of those bikes. \wheeled3\TT650\DATA\ANIM\TT650_Driver.rtm \wheeled3\M1030\DATA\ANIM\M1030_Driver.rtm