Jump to content

twirly

Member
  • Content Count

    1304
  • Joined

  • Last visited

  • Medals

Everything posted by twirly

  1. There's quite a few posts on that already...try this one see if it helps.... http://forums.bistudio.com/showthread.php?t=83948
  2. twirly

    hunting?

    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
  3. twirly

    IF statements

    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
  4. twirly

    AI Editing

    Done any Arma 2 scripting before?
  5. Select the Side as Empty..... Ammo should then be available under Class.
  6. 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.
  7. Agreed! Immersion breaker for sure.
  8. Hi mate. What are you trying to add ammo to?
  9. 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.
  10. 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; }; };
  11. Works fine inside a trigger for me with.... this && ((e2 knowsAbout p0 > 1) || (e2 knowsAbout p1 > 1))
  12. 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!
  13. if ((e2 knowsAbout p0 > 1) || (e2 knowsAbout p1 > 1)) then { Should work just fine. Your problem is something else.....not the "||"
  14. 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.
  15. 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.
  16. Ah...ok mate. You seem to have a good system going already for tracking the numbers....that's sweet.
  17. I think Bulldog Six's post is your best bet!...try to understand what's going on there.
  18. Hey Jakerod.... maybe this can help you find your special positions more easily. Look in the spoiler.
  19. 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
  20. No...not at all. EDIT: I downloaded your mission and the camera also works fine for me.
  21. No worries to delete the file...it will just be re-created next time you run a mission.
  22. 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.
  23. ...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!
×