Jump to content

Rommel

Member
  • Content Count

    1225
  • Joined

  • Last visited

  • Medals

Everything posted by Rommel

  1. Agreed with Scar, just link the unit to the two markers, it will randomly spawn at one of them, obviously the script does give more control, but it is a simple situation, so that isn't needed.
  2. Rommel

    Script Help

    1. myGroupName = group this; http://community.bistudio.com/wiki/group http://community.bistudio.com/wiki/this 2. I have a system for this, but it is by no means easy; your better off using spawned groups that generically patrol the area. myGroup = [POSITION, SIDE, COUNT] call BIS_fnc_SpawnGroup 3. myCount = count units (group this); In the trigger: {alive _x} count myGroupName < myCount * 0.75
  3. Having laid out the principles in the BIKI posts and FAQ's, I'm just helping answer the question. You can't re-design everyone's system. Hopefully they'll figure it out on their own. I for one never use global variables in any of my systems unless it must be done; which is quite rare (assuming you leave out functions).
  4. Rommel

    Script Help

    Writing the code to best explain the linearity and steps. _boom = { //explode script }; _object addaction ["Defuse","defuse.sqf"]; _diffused = false; while {not KRU_defused} do { if ((velocity player) distance [0,0,0] > 0.9) then { //vector magnitude, ie speed of player [] call _boom; }; if ((player call CBA_fnc_getAnimType) select 1 != "prone") then { [] call _boom; }; }; defuse.sqf KRU_defused = true; There is some things missing, but should give you a rough idea.
  5. Ha, I apologize, I'm not at home at the moment :p. This should give you the best of both. :cool: for "_i" from 1 to opGunCount do { _s = format["opGun%1", _i]; _v = "D30_RU" createVehicle _pos; missionNamespace setVariable [_s,_v]; //_v setVehicleVarName _s; //If this is needed, then do it, otherwise disregard publicVariable _s; };
  6. http://kronzky.info/minefield/index.htm Hope that helps.
  7. In a regular piece of code, missionNamespace is the namespace you are operating within, why did he specify it? It is a work around to avoid compiling a string via compile to increase performance over the method I gave you. Is this script being run more than once? If not, then don't worry about it. ;)
  8. if (not isnil "nil") then {nil = [] call {}} :j: It is a bit strange you can assign data to a ?data type? though.
  9. Your code says this: gun = nil; gun = vehicle; publicvariable "gun"; You want this: for "_i" from 1 to opGunCount do { _v = "D30_RU" createVehicle _pos; call compile ["opGun%1 = _v;", _i]; publicVariable format["opGun%1",_i]; };
  10. Having created CBA_fnc_getDistance myself (previously RMM_fnc_getDistance), its use can seem abstract at best. Especially since the code is in pseudo form (it is even a 1 line function): A distance B What is it then? Well it is the following: (ARG(0) call CBA_fnc_getPos) distance (ARG(1) call CBA_fnc_getPos) Meaning? Well here is an example of some of the parameters [player,"respawn_west"] [player,[0,0,0]] [player,group player] [player,trigger1] [player,task1] Meaning, any two parameters of the types: marker, position, group, task, location, trigger etc. Unlike the BIS native function.
  11. Description: These functions are some of most used generalised functions that I have produced for ArmA 2, and despite sharing them with others, they are used in my upcoming scripts. They will be loaded into memory, and that is the end of it, there are no running scripts in this pack, they are simply functions for use by the mission maker / programmer. Contents (mission folder): init.sqf mission.sqm RMM_core.sqf functions\f_doActionArgument.sqf functions\f_getAlive.sqf functions\f_getDirection.sqf functions\f_getDistance.sqf functions\f_getForecast.sqf functions\f_getGroup.sqf functions\f_getNearest.sqf functions\f_getNearestBuilding.sqf functions\f_getPosition.sqf Usage: functions\f_doActionArgument.sqf Parameters: object addAction ["Action name", "functions\f_doActionArgument.sqf", {code}]; Example: this addaction ["Ask to Follow", "functions\f_doActionArgument.sqf", {[_target] joinSilent (group _caller)}]; Local Variables: _target, _caller Relevant BIKI: http://community.bistudio.com/wiki/addAction functions\f_getAlive.sqf Description: A function used to find out who is alive in an array, being a group or an array. Parameters: Units Array, Group or Unit Example: (Units player) call RMM_f_getAlive Returns: Array of alive units or Alive Unit functions\f_getDirection.sqf Description: A function used to find out the direction of a unit, group, or between two positions. Parameters: Array containing two of [Object, Location, Group or Position] Example: [[0,0,0], group player] call RMM_f_getDirection; Returns: Number - Direction in degrees functions\f_getDistance.sqf Description: A function used to find out the distance between two positions. Parameters: Array containing two of [Object, Location, Group or Position] Example: _distance = [Player, [0,0,0]] call RMM_f_getDistance Returns: Number - Distance in meters functions\f_getForecast.sqf Description: Function that returns a string containing the weather forecast Example: _string = call RMM_f_getForecast Returns: String - Weather Forecast functions\f_getGroup.sqf Description: A function used to find out the group of an object Example1: _group = player call RMM_f_getGroup Example2: _group = (group player) call RMM_f_getGroup Returns: Group functions\f_getNearest.sqf Description: A function used to find out the nearest entity parsed in an array to a position. Compares the distance between entity's in the parsed array. Parameters: Array with [[Object, Location, Group or Position], [Array of [Objects, Locations, Groups and or Positions]] or [[Object, Location, Group or Position], [Array of [Objects, Locations, Groups and or Positions], Distance] Example: _nearestVeh = [player, vehicles] call RMM_f_getNearest Example2: _nearestGroup = [[0,0,0], allGroups] call RMM_f_getNearest Returns: Nearest given entity or List of entities within given distance functions\f_getNearestBuilding.sqf Description: A function used to find out the nearest building and appropriate building positions available Parameters: Object Example:_array = player call RMM_f_getNearestBuilding Returns: Array with [building object, building positions (count)] functions\f_getPosition.sqf Description: A function used to position of an entity Parameters: [Object, Location, Group or Position] Example: _position = (group player) call RMM_f_getPosition Returns: Position - [X,Y,Z] Dependencies: None Installation: Simple installation; copy and paste the functions folder (and its contents) into your mission directory. copy and paste the RMM_Core.sqf file into your mission directory. Either copy the line out of the init.sqf or paste the following line somewhere to execute the RMM_Core.sqf. execvm "RMM_Core.sqf"; Compatibility Issues: None known Bug Report: If you find anything, just post here or send me an email to rommel@australianarmedforces.org ... or forever hold your peace. Author: Rommel Date: 02/12/2009 (thats 12/02/2009 for the yanks) Revision: 1.03 ------------- DOWNLOAD ------------- Size: 4KB Type: 7zip | .7z Unpacker: www.7-zip.org Mirrors: http://www.4shared.com/file/163868701/e0f6de78/RMM_CoreChernarus.html
  12. Rommel

    ACM broken?

    Correct again. But they are separate lists, and the presence of the custom one allows the ACM to revert to it.
  13. Rommel

    ACM broken?

    Correct; and it will start from an empty list. ;)
  14. I believe it has a line where scripts are executed upon certain events, perhaps throw the code in there. (In the revive_init.sqf)
  15. Rommel

    ACM broken?

    The default class list is [], it reads that then defaults locally, ie you can't remove from nothing. You have to build it up with what you do want, not what you don't. It was poor handling on BI's part. ;)
  16. Remove the semi colons and its SQS... that script will work either way. Except change execVM to exec...
  17. while {true} do { sleep (60*5); skiptime -(1/(60 / 5)); }; Reverses the clock by 5 minutes every 5minutes.
  18. 1. Place the BRDM2. 2. Put the following in its init line. 0 = _this spawn {_pos = getposatl _this;_this setposatl [0,0,0];sleep (60*5);_this setposatl _pos}; Instead of [0,0,0], a position on land where the thing can stay for 5 minutes could be used, even: getmarkerpos "mybrdm2tempmarker" Would suffice. Hope that helped.
  19. SQF or its no deal. :p _unit = _this select 0; _marker = _this select 1; _xoffset = _this select 2; //_yoffset = _this select 3; _position = getmarkerpos _marker; _position set [0, (_position select 0) + _xoffset]; //_position set [1, (_position select 1) + _yoffset]; _group = group _unit; _wp = _group addwaypoint [_position, 0]; _group setCurrentWaypoint _wp; Added in the ability to do a Y offset there incase you need it aswell. 0 = [myplane, "mymarker", 200] execvm "offset.sqf"
  20. 0 = execvm "script.sqf" Hard coded constant assignment for the win! (The handle return works, but the assignment obviously fails, so its a win situation.)
  21. http://dev-heaven.net/docs/cba/index/Functions.html Hope this helps. ;)
  22. I am still working on this among other things, a new feature called the freezer, the alternative to the reducer, it deletes units completely and then restores them when you come near. This reduces load by 100% thanks to the new BIS beta patch. Having 2500 units on the map (in terms of logical presence) with 60FPS is fantastic. The new release will be soon, and in highly modular, it will be released as an addon, but I may make mission variants for simple plug and play. ;) Using both the reducer, and freezer is the best combination, reducer for roaming groups (such as whole map patrols), and the freezer for all other groups (which do not need to move as dynamically, ie defenders, town patrols etc).
  23. All these are now in CBA, this is now deprecated and there are huge improvements on them in CBA. If you don't use CBA, then... well just use it, it is the best addon for ArmA2, and gives enormous functionality to addon/mission makers. And to re-iterate a common association, CBA != ACE, and has no physical content as such, only fixes and functions. :rolleyes: EDIT: If you *must* have no addons, ie for a public server, then I could make a mission side variant of them again with the new functionality. EDIT2: I am planning on making some interesting releases (in the form of addons, due to limited functionality of scripting, and the stacks on effect that occurs in mission folders...) for mission makers very soon, aimed at Arrowhead but obviously functional in A2 (ideally A2 1.06 however).
  24. Rommel

    ARMACast | The Arma 2 Podcast

    That PC Gamer pod cast is up, starts about 1h 00m 00s in, not that listening before that wasn't interesting, but WoW talk made me fast forward :D.
  25. That is because you are not cleaning up the groups that are empty! If you remove the empty groups, then it is fine because it re-uses old group names. If you are going over the 144 group limit (somehow!) you are most definitely on the road to breaking your game. :p
×