Jump to content

mikie boy

Member
  • Content Count

    664
  • Joined

  • Last visited

  • Medals

Everything posted by mikie boy

  1. Check the tutorial has it in there whole section on eventhandlers
  2. Used killed event handle. Which is BASICALLY, 'In the eve t of death do this'... When player dies u can respawn him in same position. You could also have a wait until command for waiting until players health gets to a certain level. Then stop him dying and put him in unconscious state. Various ways to do it really.
  3. Use event handlers.. Depending on what u want to do.. Could use rescan or killed.
  4. Cheers chaps for all the kind words, glad it has been well received and you are finding it useful. You should quickly read through this thread to see if any of the errors (typos) i made are not duplicated when you follow it. Only think there are a couple. Hopefully i should have some time around end of June to actually complete chapter 4, and get the multiplayer guide completed. Im hoping to setup a guide on how to put a project/mission together Mike
  5. quick and dirty way... you could use a waituntil command in the script - inside... waituntil{!bombActive || bombActive}; if (bombActive) then { terminate _Script; }; addaction given a global variable that changes value - in turn waituntil is met. hopefully you get the picture.
  6. Updated Version. https://dl.dropboxusercontent.com/u/17725328/BIS_forum/GroupMenuNew.jpg (120 kB) Download link Updated version… This version has the added extra of Group management (concept taken from Zuff’s Group management). This version contains the following… • AI recruitment process – selection of 6 types of soldiers. Automatically identifies which side you are on so no fiddling with sides. • Dialog now stays open until you close it - does not close each time you recruit a soldier • AI deletion from group, if group leader. • Whole AI squad deletion, if group leader. • New – Group Management. • Leave current group. • Join a new group from a selection of groups (AI groups, Human Groups, and Mixed groups). • View other groups, for AI players. • Specifically view human players within a group to assist with locating friends. • Identification of your own group. • Step down as leader. • Become leader – MP compatible. • Options to turn off/on the menu. • Option to turn off/on just AI recruitment. • Option to increase/decrease Amount of AI to recruit. • Option to turn off/on Deletion AI when leaving a group with no Humans in it. • Option to turn off/on Group clear up of empty groups. Anyway - hope this is useful. Installation ------- Simply copy the code below into your init.sqf waitUntil { isServer ||!isNull player }; ExecVM "FOCKRecruitAI\RecruitInit.sqf"; and copy across the Description file - ensure any Existing parameters are changed accordingly Copy across the two folders to you mission folder
  7. sorry chaps havent been on here for a while - the menu should be addaction - not a key
  8. mikie boy

    Java Mission Editing

    Check out naughts OOP coding, along with the workings of Code34 who is using it to create some cool stuff.
  9. from my experience - and this is not in any way shape or form good authority, i would presume that the local variable is removed from memory once the call to that particular script is complete. I can only assume that it remains in memory whilst a script/function is still using that particular variable. Much like that of a using call - im guessing a variable is create/copied upon calling a function, then anything in side that called function is created and manipulated as required for the life of the function. On the return i would assume that the new variable declared (to hold the return) is enacted and the variable created in the function is removed from memory. As for the global method/ array holding object - all depends on what you are doing. There is also setvariable that can be used to assist with such calls to information. For the global on the server - it again all depends on what you are creating, efficiency, and assisting others to read your code. You will have to think about locality later and for JIP when declaring globals and although only for server, will players need to affect them, change them, etc. You got a specific question in mind or senario? again, take what i said above with a pinch of salt...
  10. distance = suareroot of sum (x2-x1)2 + (y2-y1)2 remember doing this a long time ago - cant find it so from the top of my head -a really awful work around - im sure there is a command for this _returnDistValue = [[1234.000, 4321.000],[2222.000,3333.000]] call coordcheck; coordCheck = { _coord1x = _this select 0 (select 0); _coord1y = _this select 0 (select 1); _coord2x = _this select 1 (select 0); _coord2y = _this select 2 (select 1); partX = _coord2x - _coord1x; partX = partX * partX; partY = _coord2y - _coord1y; partY = partY * partY; FinalDistance = partX + partY; FinalDistance = sqrt FinalDistance; //return Final distance FinalDistance };
  11. distance command can do that - Returns the distance in meters between two Objects, Positions or Locations. it will take an array as positions - assuming that what you want - player position. or failing that when you click on map - make a marker - get its position and compare not tried the CBA function - failing both of these you can use a bit of the olde Pythagoras' Theorem :)
  12. Arma2net + Arma2netmysqlplugin
  13. mikie boy

    Battlefield clearance

    A really horrible way to do it....every killed unit - replace with a new one - but place him in the dead position and cancel his ability to move. then once youve finished kill that unit
  14. mikie boy

    Basic hint script not working

    Did you copy the code from the text? if so itll be the "" they are in a different font/format and show up differently in sqf code
  15. mikie boy

    Code Optimization

    This measn you are sending your function a string instead of a group - the group is not a string.. ["ParaGroup1", "[21279.2,14018.8,0.00141048]", "0", in fact , neither is the [x,y,z] array, or the numberical index - just look at what you are sending your function and see what is needed for each variable. [ParaGroup1, [21279.2,14018.8,0.00141048], 0, etc Hope that helps
  16. Now with added AI reviving players - video to show the work in progress
  17. Cheers Kremator - I think thats where this is heading - even if i get it set up - im sure someone can tidy it up Yeah its kinda like that now but i can def implement that on a getHit location system, or if im really lazy a random system lol
  18. Just downloaded the example that is some nice work, but I can kinda see what Johnson11B2P is saying though, and i get where Iceman77 is coming from. I think they (community) would appreciate it if you could provide a simple missions, with a simple explanation to assist (I dont mean the actual OOP principles, but how to implement your classes once created). I actually think that if this could be utilised correctly (and with enough support), this would definitely improve the scripting levels in Arma. And it may assist those wanting to learn SQF by following website like i posted, which then offers a greater volume of tutorials etc. And more importantly a greater understanding of coding. I've not programmed in PHP before, but i think ill take a look just to see where this leads. However i can see its fairly straight forward if you have OOP understanding and experience. All in all - Nice work Keep it up
  19. Iceman77 and anyone else who may find this oop SQF interesting - useful website for learning various languages... however look at the PHPobject orientated part - may help shed some light on it. http://www.codecademy.com/tracks/php
  20. http://forums.bistudio.com/showthread.php?161190-FOCK-Simple-Arty-Map-click-or-Manual-Coordinates not the greatest, havent updated it since, but its on the list to do. Coding is a bit pants - but it works....
  21. mikie boy

    Enemy Count For Trigger

    if you are carrying out a reinforcement script and learning the basics - good to keep an eye on groups numbers. Maximum group count i think is 250 (someone may correct me). Therefore its handy to see how many groups are in existence and how to remove said groups to ensure you have room to create more. Also its a means of learning efficient scripting. while {true} do { { if ((count (units _x)) == 0) then { if (side _x == EAST) then {deleteGroup _x; _x = grpNull; _x = nil}; }; } foreach allGroups; sleep 60; }; just something to consider
  22. Iceman77... lol -cheers bud, yes i know ive been fairly useless in last few months - MSc is taking up most of my time,but i will get it done in 2014 :) @LKincheloe - it started as a fair fight script, not even sure why, but im working on a ranked based database save system, and i guess the medic element will be added via this - so yeah full revive. i will however release this as it is with the revive of the player by ai soon.
  23. Lol i was way out. Guess answering questions at 2am isnt a good idea.
  24. think its to do with restrictions on the clothing for different factions - Iceman77 has commented on this on several posts i think
  25. mikie boy

    addaction and JIP

    nice one Dan - i remember it being something like that -
×