-
Content Count
1304 -
Joined
-
Last visited
-
Medals
Everything posted by twirly
-
Spawn on a carrier
twirly replied to frosties's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
There's quite a few posts on that already...try this one see if it helps.... http://forums.bistudio.com/showthread.php?t=83948 -
Wow! Cool. That's about as Kiwi as it get's bro. Someone's gonna have to put some testicles on them in game hogs! :D
-
Hi mate...welcome to the forums. You have to start by looking in the link below and learning a few things. You will need a certain level of scripting knowledge before "helping you out" will actually work!! http://forums.bistudio.com/showthread.php?t=78089
-
Done any Arma 2 scripting before?
-
No Ammo Under Class heading in Units
twirly replied to nycapken's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Select the Side as Empty..... Ammo should then be available under Class. -
Reveal all enemy units closer then 25m distance to all friendly units in 50m distance
twirly replied to wiggum2's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
There could be problems if you used global variables! Local variables shouldn't cause problems. Local variables are local to the script they are used in....global variables can be used across all scripts. No reason why 20 groups couldn't use it if it's written properly. -
Agreed! Immersion breaker for sure.
-
No Ammo Under Class heading in Units
twirly replied to nycapken's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi mate. What are you trying to add ammo to? -
can you get a buildings objectID via a script
twirly replied to zonekiller's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Here's mine that I just made.... will return the ID's of buildings. Not everyone uses CBA. I don't because I enjoy making my own stuff for what I need. This is a first pass....very simple and probably can be done better...but it works well. In your init.sqf:- fnc_getBuildID = compile preprocessFile "fnc_getBuildID.sqf"; Create a file in your missions folder called "fnc_getBuildID.sqf"; fnc_getBuildID.sqf:- /* fnc_getBuildID.sqf - Twirly 22 Sept 2011 Function for returning building ID's In your init.sqf:- fnc_getBuildID = compile preprocessFile "fnc_getBuildID.sqf"; Call with:- _id = [building] call fnc_getBuildID; */ private ["_build","_sn","_sf","_ef","_na","_id","_i","_item"]; _build = _this select 0; _sn = toArray (str (_build)); _sf = false;_ef = false;_na = [];_id = 0; for "_i" from 0 to (count _sn)-1 do { _item = _sn select _i; if (_sf and (not (_ef))) then { _na set [count _na,_item]; }; if (_item == 35) then { _sf = true; }; if (_item == 58) then { _ef = true; }; }; if ((count _na) >=3) then { _na set [((count _na)-1) ,"delete"]; _na = _na - ["delete"]; _na set [0 ,"delete"]; _na = _na - ["delete"]; _id = toString (_na); }; _id Use like this:- _id = [_build] call fnc_getBuildID; Hope it helps. Not really needed but....demo here. -
can you get a buildings objectID via a script
twirly replied to zonekiller's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
If only we had more string functions! -
Reveal all enemy units closer then 25m distance to all friendly units in 50m distance
twirly replied to wiggum2's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Well first off... it's structured all wrong. Try it like this and immediately it becomes apparent that there's something wrong with your brackets. There seems to be an extra one on top that you don't need....and also no closing bracket for the "if" statement. I don't use it myself but maybe using Squint will help you big time. I'm not sure about your line in red.... get the structure right first. [color="Red"]{[/color] if ((_unit knowsabout _x) == 1.3 AND (side _x) == _enemySide )} foreach _nearTargets then { hint "1"; while {count waypoints _groupHunter > 0} do { deletewaypoint (waypoints _groupsHunter select 0) }; hint "2"; waituntil {count waypoints _groupHunter == 0}; hint "3"; _delay = (if (count _this > 2) then {_this select 2} else {10}); hint "4"; while { ({alive _x} count units _groupName > 0) && ({alive _x} count units _grouptarget > 0) } do { _groupName move getpos leader _grouptarget; sleep _delay; }; }; -
Is there anything why || or OR should not work ?
twirly replied to wiggum2's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Works fine inside a trigger for me with.... this && ((e2 knowsAbout p0 > 1) || (e2 knowsAbout p1 > 1)) -
can you get a buildings objectID via a script
twirly replied to zonekiller's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
FYI... vehinfo.intro is a mission....not a script! Scripts end in ".sqf" or ".sqs" not ".intro".... The intro part is the island. So it's a mission called vehinfo on the island intro! -
Is there anything why || or OR should not work ?
twirly replied to wiggum2's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
if ((e2 knowsAbout p0 > 1) || (e2 knowsAbout p1 > 1)) then { Should work just fine. Your problem is something else.....not the "||" -
How to edit an already existing mission?
twirly replied to Achilles1's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Well... Yes you probably can. But it would require some scripting knowledge and examining the mission and figuring out where to insert the necessary code. -
How to edit an already existing mission?
twirly replied to Achilles1's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Sounds like you did everything right. The mission should be available in the editor. Maybe use Windows Explorer to make sure your files have gone to the right place. -
Garrison House Area Script
twirly replied to jakerod's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Ah...ok mate. You seem to have a good system going already for tracking the numbers....that's sweet. -
A pilot unit may have skills Engineer?
twirly replied to jetherjr's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I think Bulldog Six's post is your best bet!...try to understand what's going on there. -
Garrison House Area Script
twirly replied to jakerod's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hey Jakerod.... maybe this can help you find your special positions more easily. Look in the spoiler. -
Have a look here..."spawn plane" was the search terms used. There are a lot of posts about this already. It's not that difficult to search for it yourself mate! This was the first post that came up and hopefully will help you. http://forums.bistudio.com/showthread.php?t=12498
-
Can someone please make a demo mission for me....
twirly replied to ArmAriffic's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
No...not at all. EDIT: I downloaded your mission and the camera also works fine for me. -
Can someone please make a demo mission for me....
twirly replied to ArmAriffic's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
No worries to delete the file...it will just be re-created next time you run a mission. -
Garrison House Area Script
twirly replied to jakerod's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi mate.... There's so much code it's hard to follow.... it seems only you know what you are doing! What I did in my little snippet I posted for you is remove any positions that were used. Delete them from the array. That way they couldn't be used again. I'm not quite sure if that has any bearing on what you are doing or asking for here. I'm really struggling to understand why you aren't trying to find the positions using an algorithm?. Your script is already at 348 kilobytes. As far as I know that is unheard of....and you are going to add even more!!! The scripting commands were created to help avoid this kind of tedious programming and to make things flexible. There must be a way to do what you are doing... in let's say.... less than 100 lines of code and be useable everywhere. Anyway mate... to each his own... and if you are having fun.... well that's what it is all about. Keep at it. Sorry I couldn't really help. -
...and in typical BIS fashion you move on to the next project while this one is still massively bugged. That's the same BS that's been going on for the last ten years! After all.... keeping the frustration level at maximum is the BIS way!
-
A pilot unit may have skills Engineer?
twirly replied to jetherjr's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Correct.