firecontrol
Member-
Content Count
23 -
Joined
-
Last visited
-
Medals
Everything posted by firecontrol
-
Get ScriptEdit <--- This is something of a godsend if you script at all. It even has the command reference taken straight from the wiki (updateable) in a panel on the right side.
-
SetPos problem and variable on dialog.
firecontrol replied to nullsystems's topic in ARMA - MISSION EDITING & SCRIPTING
Very odd. I just tested the last bit of code I gave you, and it worked quite nicely. I was able to create two ammo boxes, and when trying to make the third it said "Your quota is filled". I set it up with a trigger (radio alpha) that called the .sqf... and used a helo 'H' marker named "heli1". How've you got it set up? -
SetPos problem and variable on dialog.
firecontrol replied to nullsystems's topic in ARMA - MISSION EDITING & SCRIPTING
Sorry, didn't have time to check syntax. I think I might have left a dangling else in the above example.. (these are all just examples by the way, not tested at all. heheh) <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> if (CRATEAMOUNT< 2) then {    _ammocrate = "Reammobox" createvehicle [getpos heli1 select 0,getpos heli1 select 1,getpos heli1 select 2];   _ammocrate addweaponcargo ["Binocular",1];   CRATEAMOUNT = CRATEAMOUNT +1;   if (isServer) then   {    publicVariable "CRATEAMOUNT";   }   else   {   }; } else {  hint 'Your quota is filled'; }; if (true) exitWith {}; ..and yes, you can change global variables from anywhere, that's what they're designed for. -
SetPos problem and variable on dialog.
firecontrol replied to nullsystems's topic in ARMA - MISSION EDITING & SCRIPTING
Try using a global variable. To do so, in your init.sqs/f file declare and define it. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">CRATEAMOUNT = 0; Then in your function which is called remove the old local variables... <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> if (CRATEAMOUNT< 2) then {   _ammocrate = "Reammobox" createvehicle [getpos heli1 select 0,getpos heli1 select 1,getpos heli1 select 2];  _ammocrate addweaponcargo ["Binocular",1];  CRATEAMOUNT = CRATEAMOUNT +1;  if (isServer) then  {    publicVariable "CRATEAMOUNT";  }; }; else {   hint 'Your quota is filled'; }; if (true) exitWith {}; What happened here is that local variables are only known to the script. Once the script ends, then that memory is freed. As such, the contents of that variable go back into the bit bucket. A global variable should remain usable the life of the mission. To make a global variable, take off the _ from the name. _crateAmount becomes CRATEAMOUNT for instance. I use all caps for global variables just to help me keep things in order, it's not necessary though. One more thing, if this is for a MP type environment... you'll need to publicVariable any variable which needs to be transmitted to the clients. In this case, you'd need to update all the systems that one has been made. use <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (isServer) then {publicVariable "CRATEAMOUNT"} I've heard bad things start to happen when you have clients trying to publicVariable something, which is why we make sure only the server does it. -
I think what he means is to, let's say, unban them... you'd have to find their PID and delete it. When you #exec ban 2, for example, it adds their real PID to the ban.txt file automatically if I'm not mistaken?
-
Looking for a complete Server.CFG Reference
firecontrol replied to ManDay's topic in ARMA - MULTIPLAYER
The biki is the best I've found yet... Hopefully it'll be more complete as time goes on. As far as grass on a dedicated server: Clicky -
Understanding objectives and triggers
firecontrol replied to rothy's topic in ARMA - MISSION EDITING & SCRIPTING
Class Tree You can check for the number of classes in the trigger's area... trigger should be EAST(or opfor), present In the trigger's conditions: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"man" countType thislist == 0 for just enemy men. Combine the two for the vehicles and men. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">("man" countType thislist == 0) && ("landVehicle" countType thislist == 0) A good way to keep from having to hunt down that one bugger who's hiding is to use <= 3 or something instead of == 0. That means when enemy men left are less than or equal to 3, it triggers. Thislist is a fancy keyword that takes all the units in the "Triggered by" list that are inside the trigger's area... quite handy. As always a disclaimer... not tested. -
Understanding objectives and triggers
firecontrol replied to rothy's topic in ARMA - MISSION EDITING & SCRIPTING
Backwards there... == <--- checks for equality = <--- sets a variable -
Triggering when out of ammo
firecontrol replied to namreg's topic in ARMA - MISSION EDITING & SCRIPTING
The 'ammo' keyword is checking the current # of rounds remaining IN the weapon, not the soldier's supply. That's why it triggers when your first magazine is depleted. You need to use the 'magazines' keyword as well... such as: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(((sniperguy ammo "m24") == 0) && (count magazines sniperguy == 0 )) If he has other stuff on him.. like any smoke grenades, other magazines, etc that won't trigger until he has nothing left. To only count M24 magazines, use this instead: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(((sniperguy ammo "m24") == 0) && ({_x=="5Rnd_762x51_M24"} count magazines sniperguy == 0 )) -
How do you get a unit to move with a trigger?
firecontrol replied to Perrin-Major's topic in ARMA - MISSION EDITING & SCRIPTING
Well, you can make them empty, and create the pilots outside of them. Put a MOVE waypoint right under the pilot, then a GET IN waypoint on the helo, then the rest of the move, SAD, etc waypoints. Syncronize the trigger with the MOVE waypoint. -
setSkill array really work?
firecontrol replied to blackgrain's topic in ARMA - MISSION EDITING & SCRIPTING
Maybe set up some kind of experiment: One group setSkill via an array to 1, another group to 0.5, and another to 0.1, or even 0. Give them 3 seperate groups of targets (civilians or removeAllWeapons on opfor?) and see if there is a noticeable difference in their accuracy. Speaking of... when you: Hint format["%1",(coward skill "aimingaccuracy")]; after setting skill to 1.0... does it still say 0, or now does it say 1? If it says one, then that might confirm my theory of truncation. But I don't see why they would truncate.... makes no sense. I'm at work, else I'd be able to test it myself. -
setSkill array really work?
firecontrol replied to blackgrain's topic in ARMA - MISSION EDITING & SCRIPTING
Perhaps it's a precision issue, when you type cast from a number to a string? Anyone know how 'format' works exactly? As in C++ you can type cast variables, but you can also set precision so that decimals are not truncated and the like. By this I mean his accuracy really is 0.3... but when cast into a string, it drops the decimal and simply reports the integer 0? Just a thought... I really have no idea how exactly 'format' works other than it turns any type of variable into a string. -
Dedicated server debug
firecontrol replied to Comradesniper's topic in ARMA - MISSION EDITING & SCRIPTING
Edit: Nevermind.. appears my suggestion doesn't work either. -
easy weapons change respawn
firecontrol replied to Recon1's topic in ARMA - MISSION EDITING & SCRIPTING
Well, at mission start... just put it in his initialization field: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">removeAllWeapons this; this addMagazine "10Rnd_127x99_M107 "...(a few times); this addWeapon "M107" (and whatever else you want) When he respawns... call this from init.sqs: i.e. ---> Â [] exec "respawn.sqs" change 'player' to that specific player's name or else it will give it to all players when they respawn. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;this is respawn.sqs, for instance #START @ not (alive player) @ alive player if (local player) then { Â removeAllWeapons player; Â player addMagazine "10Rnd_127x99_M107 "; Â player addMagazine "10Rnd_127x99_M107 "; Â player addMagazine "10Rnd_127x99_M107 "; Â player addMagazine "10Rnd_127x99_M107 "; Â player addWeapon "M107"; } goto "START" note: always add the magazines before adding the weapon, else he'll start w/ an empty rifle. This is just to give you an idea of how to do it.. this is my no means how you would actually want to implement it in a true MP game... You'd have to set up some IF statements based on which type of player died, etc. Or better yet make it an SQF and use the switch/case feature. -
How to make cannons fire?
firecontrol replied to kinismo's topic in ARMA - MISSION EDITING & SCRIPTING
waitUntil is used in SQF files. @ is used in SQS files. The snippet he gave you is written in an SQF format. Here's how I did it, this will actually create explosions at the marker "tgt" in a 50 square meter zone as well... <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_arty = _this select 0 _posX = getMarkerPos "tgt" select 0 _posY = getMarkerPos "tgt" select 1 _arty doWatch [_posx, _posy, 6000] Â Â Â Â Â Â Â Â Â ~((random 2.5) + 3) _arty fire "D30" Â Â Â Â Â Â ~8 _posX = _posX + ((random 100) - 50) _posY = _posy + ((random 100) - 50) "SH_125_HE" createVehicle [_posx, _posy, 0] IMPACT = true; if (local server) then {publicVariable "IMPACT"} exit I call it from 3 different D30's.. that's why the random wait is in there. So they don't all fire at exactly the same time. i.e. [arty1] exec "fire.sqs"; [arty2] exec "fire.sqs"; etc. -
Pilot, chopper problem - if / while
firecontrol replied to nullsystems's topic in ARMA - MISSION EDITING & SCRIPTING
How'd that work for you? Any luck? I'm planning on creating a scenario like you have set up to test out some alternate options for ya. -
Pilot, chopper problem - if / while
firecontrol replied to nullsystems's topic in ARMA - MISSION EDITING & SCRIPTING
You're in dire need of some ()'s. Always use them, even if you don't think you need them, or if it doesn't error. It keeps things nicely organized. For instance: @ ( (player distance heli1 > 4) || (player !driver heli1) ) The interpreter will start with the innermost parenthesis and work outwards. Think of anything inside the () Like this: ((long expression) || (long expression)) = Â ( x || y ) Â = Â (z) Now the interpreter knows exactly what you mean. Remember the computer is dumb, it just does what you tell it to. -
guide to make Mp mission map(coop) and that stuff
firecontrol replied to 2ndLt.Tyrsted-3/1-'s topic in ARMA - MISSION EDITING & SCRIPTING
That works well if you don't use any scripts or functions... i.e. completely editor made missions. In MP things get rather tricky with client/server relationships. Broadcasting of variables, knowing that only the server should create units/vehicles, knowing that you have to execute certain scripts &/or commands on each client, etc. etc. the list goes on. I haven't found any comprehensive guide to all these intricacies yet, but there are some good guides on ofpec.com and the wiki. -
That would be kinda nifty too... if for instance you don't see any RPGs lying about. Tell Private Schmuckatelly to go find one... maybe with a timeout saying he can't find one after searching the nearby dead enemies, or if there are no dead enemies within a couple hundred meters it fails as well. This is addition to being able to point to a dead guy or ammo box and have them gear at it easily of course. I don't like to overly micromanage AI (which is necessary unfortunately.)
-
Similar thing I do far too often: Whilst flying... holding alt to freelook... ooo a red square... <TAB> to target the blighter.... Yay, I love my desktop wallpaper! I know, I know... let go of alt first. Sometimes it's the last thing I'd be thinking about, especially while trying to destroy enemy armor without being shot out of my seat. Anyone want to donate to my "I'm an idiot and need a TrackIR" fund? I have paypal.
-
Do you use a STANDARD (4:3) or WIDESCREEN Monitor
firecontrol replied to benus's topic in ARMA - GENERAL
Well, if we can nitpick here... can I make a small request for addon makers? Is it possible in ArmA to zoom just the scoped view and leave the outside not zoomed? If anyone's played Red Orchestra with a scoped rifle, you'll know exactly what I mean. As it is now, stock BIS ArmA, it wouldn't matter since you can't see around your scope when using it anyway. But the picture in the first post of the Acog.. flaws aside, the center (looking through the lenses of the scope) should be zoomed, whilst the rest should not be zoomed. I doubt this is possible with the current ArmA engine.. but there are much smarter people than I here who I hope prove me wrong. :) -
A quote from Ghost644, slightly edited (original here.) change terrainGrid=whatever; to terrainGrid=50; and you're set. Like you said, the mission will override the server setting if it's in there.
-
MfG Medicus <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">voteThreshold=0.33; // when one third agrees, this is enough to confirm a vote Changing the Threshold to 2.0 (or anything above 1.0) will make it impossible for people to vote someone as an admin. It keeps people from voting at all actually, so they can't vote to kick someone off, change maps, etc. It works because the player population needs above 100% agreement, which is impossible. In a 10 man server, 20 people would have to vote, for instance. In any case, I wish there was a way to just disable the vote admin feature without hindering the other votes. Maybe in a patch.