-
Content Count
1304 -
Joined
-
Last visited
-
Medals
Everything posted by twirly
-
Used -malloc=tbb4malloc_bi all day yesterday and up to now while tinkering with my coop scripting. Considering if I got that shortcut right and it does work... and If I'm not imagining things it seemed a lot smoother for me. This was running two instances of the game on the one machine in two 1528x904 windows. Everything on high or higher except AA... that's set to low. PP also low. Mods running also. AMD 3 GHtz Quad Core 4 Gig (3 point whatever) of RAM Radeon HD 6870 EDIT: I'm not looking at framerates. Looking at framerates just pisses me off! This is just going on the general feel.
-
Tactical single building search script
twirly replied to garnett21a's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi mate... You should use the "code" or "php" tags to post code. It will be easier for us to read. You can still use the "spoiler" tags... just wrap it around the code tags. -
Checking if all OPFOR is dead?
twirly replied to AlxPachino's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
You can try this also mate... Create a file called.... ummm.... "topup.sqf" in your mission folder. Put this in it:- private ["_i","_cnt"]; while {alive player} do { _cnt = {(side _x) == east} count allUnits)}; if(_cnt <= 50) then { for "_i" from 0 to (72 - _cnt) do { [color="Red"]//spawn unit here... add your own code[/color] sleep 0.01; }; }; sleep 30; [color="Green"]//check every 30 seconds[/color] }; Execute this from anywhere at mission start. You can simply call it from your players init with:- nul = [] execVM "topup.sqf"; No need for a trigger. Untested by the way!! If it doesn't work you'll get the idea I'm sure. -
setWPpos, marker waypoint?
twirly replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Using doMove you can move just one or two units in the group without moving the whole group... which is the way move and addWayPoint both work. As an example.... you would use it if you wanted two guys to break off from your group and go search a building. EDIT: More... To check that a unit actually got to the position.... use something like waituntil {not (alive _soldier) or unitready _soldier}; -
setWPpos, marker waypoint?
twirly replied to thetrooper's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
http://community.bistudio.com/wiki/doMove -
Unlimited ammo made simple!
twirly replied to celery's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks for sharing Celery...and Bon as well for his little snippet! -
Russian Tank Battalion
twirly replied to schukow's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi... You say the crews start outside the tanks. How did you get them outside the tanks? ... are you spawning them? -
ARTY - another simple artillery script
twirly replied to TomNedry's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi mate... looks nice. Just to let you know your download link on your webpage doesn't work. -
dynamic object names with part of name provided by a variable
twirly replied to Tankbuster's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I think I've got it now.... As an example that may help others. I replaced:- call compile format ["%1_PatrolPts = [_mkrnam,[100]] call getMarkerLocs;",_mkrnam]; call compile format ["_spawnpts = %1_PatrolPts",_mkrnam]; With:- missionNamespace setvariable [_mkrnam + "_PatrolPts",[_mkrnam,[100]] call getMarkerLocs]; _spawnpts = missionNamespace getVariable (_mkrnam + "_PatrolPts"); Works fine! Always good to learn new stuff. Many thanks to the OP and all concerned. EDIT: ...and here's one I just can't seem to sort out :- call compile format ["%1_Contacts set [count %1_Contacts, _enemygrp]",[b]_sid[/b]]; _sid is a side.... EAST, WEST...etc. :confused: -
dynamic object names with part of name provided by a variable
twirly replied to Tankbuster's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Useful link.... good reading. Cheers for posting that. That's the bit I was missing. I have no performance issues with my call compiles... but I will have a look and try to understand how I might replace them. Thanks again. -
dynamic object names with part of name provided by a variable
twirly replied to Tankbuster's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I guess the part I didn't get... and still don't get... is why creating a variable in missionNamespace that contains "AH1Z" createVehicle (position player) actually executes it as code!! :confused: -
dynamic object names with part of name provided by a variable
twirly replied to Tankbuster's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Lol!.... I did... that 's why I don't understand how it works!! :) -
dynamic object names with part of name provided by a variable
twirly replied to Tankbuster's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Nice code. I don't pretend to know why that works... but it sure does... I just tested it. Thanks for the snippet! -
Adding eventHandler to joined units
twirly replied to das attorney's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Maybe something along these lines. I did run a little test and it seemed to work fine. private ["_group","_origunits ","_oldcount","_newcount","_i","_unit"]; _group = _this select 0; _origunits = units _group; _oldcount = count _origunits; _newcount = _oldcount; while {alive player} do { _newcount = count units _group; switch (_newcount > _oldcount) do { case true: { _oldcount = _newcount; for "_i" from 0 to (count (units _group))-1 do { _unit = units _group select _i; if (not (_unit in _origunits)) then { _unit addEventHandler ["fired", {_this spawn MY_SCRIPT}]; }; sleep 0.01; }; }; case false: { if (_newcount < _oldcount) then { //someone has died _oldcount = count units _group; _newcount = _oldcount; }; }; }; sleep 1; }; Run it on the group with:- nul = [_group] execVM "whatever.sqf"; -
Adding eventHandler to joined units
twirly replied to das attorney's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hey Das... do you mean join the players group as in Join In Progress in a multiplayer game.... or join as an existng soldier in the game simply joining the players group at sometime? -
dynamic object names with part of name provided by a variable
twirly replied to Tankbuster's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Try this mate.... _tx=0; while {_tx<10} do { call compile format ["txobj%1 = 'AH1Z' createVehicle (position player)",_tx]; _tx = _tx + 1: sleep 0.01; }; You should end up with txobj0, txobj1, _txobj2 etc... Also... there's no need for tx to be global unless you are using it somewhere else in your scripts...which you won't be in this little snippet that you posted...so keep it local with the underscore _tx. -
Strict or loose programming style, opinions
twirly replied to CarlGustaffa's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
That's what it really boils down to! EDIT: I should add.... condensed with one liners for me! ... so number 3. -
The running animation is still buggered.... they do a sort of quickstep when they run that looks very weird indeed. I rememeber reading a post about this a few betas back as well.
-
generic error in expression
twirly replied to gc8's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Ninja'd At a glance.... you seem to be missing a ";" at the very end of the file. At that last bracket. ....blah...blah...blah hint format ["done stopping %1 %2", speed _plane,_plane]; sleep 5; _plane setfuel 1; }[b][color="Red"];[/color][/b] -
"Trial by Fire" helicopter related question
twirly replied to valnwt's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Try this thread here mate... see if it helps you. http://forums.bistudio.com/showthread.php?t=73679 -
Cool... and cheers.
-
Hi mate... Do you mean that you want the choppers and planes to park next to each other in a certain area.... or maybe in a hangar? If so... I have never seen something like that. It would have to be scripted somehow. Maybe it'll click for someone else and turn out to be easy... but I think that would take a bit of work. EDIT: You can find a flat empty area with this... http://community.bistudio.com/wiki/isFlatEmpty
-
Hi Dwarden.... in the mission folder. I don't have a scripts folder!
-
My Single Player respawn script instantly stopped working with this patch. Went back to Build_85680 and no problems there... it works like it always has. That means a whole lot of stuff that used to work for me.... no longer works. A huge amount of work now seems to be a big waste of time and energy! What the hell can be causing this?!! EDIT: I have been using onPlayerKilled.sqf for my respawns and this no longer works. I am trying to script the same stuff I had in there before in .sqs and not having any luck. If I'm the only one impacted then I guess I'll have to learn .sqs all over again... but why was this changed? It worked as an .sqf... so why not leave the friggin' thing alone! Why not make them all work as .sqf's????? EDIT2: Onced I stopped fuming... lol!... I realised problem is easily(?) fixed by calling an .sqf from the .sqs. So once I change all my onPlayerkilled.sqf's to .sqs's and add another script... I'll be in good shape. The thing is...more functionality must be better than less functionality... so the change makes absolutely no sense to me!
-
Image not showing
twirly replied to Ikavnieks's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Shouldn't this be double quotes?.... <img image="BanditProblem.jpg"/>