Jump to content

Larrow

Member
  • Content Count

    2770
  • Joined

  • Last visited

  • Medals

Community Reputation

1595 Excellent

About Larrow

  • Rank
    Warrant Officer

Profile Information

  • Gender
    Male
  • Location
    LAR setpos (you getpos [-2,getdir you]);LAR say3d["BOO!"]

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. https://gamedevelopment.tutsplus.com/tutorials/collision-detection-using-the-separating-axis-theorem--gamedev-169 Along with the new boundingbox and vector commands should make this pretty efficient to run.
  2. Sounds about right, thisList is a list of objects that satisfies the activation. If you have no activation then there is no list. Just true will make the trigger fire no matter the activation. This will make the trigger activate even though there maybe no thisList results. Supply an activation. I suppose it depends on what you are actually doing and where. Can always make your own code to provide a list... _myList = allunits select { _x inArea thisTrigger && { side group _x isEqualTo west } };
  3. From the code shown in this post of @zagor64bz Add to the top of ATGear.sqf ... params[ "_unit" ]; And change all this to _unit. this does not work, as per the error is undefined. this is for referencing an entity in its init box. _unit does not work as it is undefined in the ATGear.sqf. It is defined in the recruit script but as soon as you execVM ATGear.sqf it is a separate variable space, so any previous local variables are lost( out of scope). The above fixes this, much like how you have _unit = _this select 0; in your recruit script to extract the passed unit, you need to do the same when passing the unit from the recruit script to the ATGear script. So either _unit = _this select 0; OR params[ "_unit" ]; they both do the same thing, extract the unit from the arguments passed to each scripts. Then for the rest of ATGear you can use _unit as a reference to the unit, instead of this.
  4. Quick example mission. Think that works out right, tried to lock the loops as much as possible and score loop is timed to every sector score update. Should give you something to go off of. Edit: Fixed phase and occasional script overlap. Posted code and test mission updated.
  5. Larrow

    CFGsound

    As @Grumpy Old Man said. Also remoteExec only works with a limited set of commands, look in configfile >> "CfgRemoteExecCommands" if the command is not listed then it is not supported for use directly in the remoteExec functionName .
  6. Larrow

    Spawning Units in Marker, help

    EOS ( Enemy Occupation System ) If you actually read the instructions document that came with the download it actually tells you how to set this up. The Armaholic page even has a link to the forum page for the script where you could of got better help from, from people who use the script.
  7. Larrow

    CFGsound

    Seems fine to me, two post about two different subjects. One about CfgSounds the other about an event.
  8. Larrow

    Delete task from array

    Try this... think thats correct but totally untested. Needs calling on all owners of the task for whom you are deleting it. Needs fixing in BIS_fnc_deleteTask so put a ticket in for it.
  9. Use magazinesAmmoFull instead, and just look for the mag that is in the units current muzzle that is being used to fire? _unit addEventHandler [ "FiredMan", { params[ "_unit", "_weapon", "_muzzle" ]; magazinesAmmoFull _unit select{ ( _x select 4 ) isEqualTo _muzzle } select 0 params[ "", "_ammoCount" ]; if ( _ammoCount isEqualTo 0 ) then { hintSilent "Unit reloading"; }else{ hintSilent format[ "AC: %1", _ammoCount ]; }; }];
  10. //initServer.sqf //This SEH( Scripted Event Handler ) is exactly the same //as what the expression field in the respawnVehicle module does [ missionNamespace, "respawn", { params[ "_spawnedVeh", "_oldVeh" ]; //parameters passed to the code //This will be called by ALL vehicleRespawn modules //If you have more than one make sure its the one you are monitoring //Name given to helo in editor "MyHelo" if ( vehicleVarName _spawnedVeh isEqualTo "MyHelo" ) then { //Your expression code createVehicleCrew _spawnedVeh; _grp = group driver _spawnedVeh; _wp = _grp addWaypoint[ getMarkerPos "MyHeloWaypoint", 0 ]; _wp setWaypointStatements[ " true ", " vehicle this setDamage 1; " ]; }; }] call BIS_fnc_addScriptedEventHandler; TEST MISSION Helo will spawn and fly to waypoint (via waypoint given for initial crew in editor). Blow up. Repeat (using crew and waypoint spawned by SEH).
  11. Larrow

    Dialog on top

    Works fine for me TEST MISSION
  12. Larrow

    Dialog on top

    Put this... class DisableBackGrnd { idc = -1; x = safeZoneXAbs; y = safeZoneY; w = safeZoneWAbs; h = safeZoneH; type = 0; style = 0; colorText[] = {1,1,1,1}; colorBackground[] = {1,1,1,0.5}; text = ""; font = "RobotoCondensedLight"; sizeEx = "4.32 * (1 / (getResolution select 3)) * pixelGrid * 0.5"; }; As the first thing inside your controlsBackground. Shown above as minimum needed to work, or just inherit from ctrlStaticBackgroundDisable and make the element cover the whole screen.
  13. An optimisation for your code. This... _v = _this select 0; _r = _this select 1; _r0 = _r select 0; _r1 = _r select 1; _r2 = _r select 2; _newVector = [ (_v select 0)*(_r0 select 0) + (_v select 1)*(_r1 select 0) + (_v select 2)*(_r2 select 0), (_v select 0)*(_r0 select 1) + (_v select 1)*(_r1 select 1) + (_v select 2)*(_r2 select 1), (_v select 0)*(_r0 select 2) + (_v select 1)*(_r1 select 2) + (_v select 2)*(_r2 select 2) ]; _newVector 0.008ms. Is the same as the dot product of _v against each row of the transposed matrix _r... _v = _this select 0; _r = _this select 1; _r = matrixTranspose _r; _newVector = [ _v vectorDotProduct _r#0, _v vectorDotProduct _r#1, _v vectorDotProduct _r#2 ]; _newVector 0.005ms. Which is the same as the matrix multiplication... _v = _this select 0; _r = _this select 1; _newVector = [ _v ] matrixMultiply _r; _newVector # 0 0.0034ms Think that math is correct, ran it through several random test...
  14. What do you consider transport? Things that only hold units? What about crates etc? I use them locally for player stash that cannot be accessed by others. Maybe it would be easier to tell us the base class/es that this change effects? from that we can tell for ourselves if we need to make any changes.
×