Jump to content

beako

Member
  • Content Count

    67
  • Joined

  • Last visited

  • Medals

Everything posted by beako

  1. Darn, OK thanks ceeeb, I guess I cheat and setPos the unit to the roof top and have them walk from one BuildingPos to the other.
  2. The _newUnit moves to the x,y postions but not to buildingPos _index and remains partially underneath and inside the building. _building = nearestObjects [ASLToAGL (_intersections select 0 select 0), ["Building"], 10] select 0 ; _newUnit Move (_building buildingPos _index); How do I get him to move upstairs to the designated buildingPos?
  3. Thanks folks, But the issues is the unit does not go to the position at the building. I did try nearestBuilding but that does not work and if I setPos to the buildingPos the soldier leaves and goes back down under/inside the building. As per below, perhaps I have to specify the building model from CfgVehicles? Any thoughts?
  4. Thanks above for the tips, I tried using remoteExecCall with target "_veh" as it is local, but is does not execute. If I replace "_veh" with player [_holder,_veh, _vehCost,_vehType] remoteExecCall ["BEAKS_fnc_ObjectPosDirBankPitch", player]; it works but when I test fn_ObjectPosDirBankPitch.sqf with if if (!isServer) then {...}; it won't execute so player is not local. fn_ObjectPositionAndDirectionD // init Ghost vehicle _pos = screenToWorld [0.5,0.5];// land position _center = createCenter sideLogic; _group = createGroup _center; _holder = _group createUnit ["LOGIC",[(_pos select 0), (_pos select 1), 0.5], [],0, "CAN_COLLIDE"]; _veh = _vehType createVehicleLocal [(_pos select 0), (_pos select 1), 0.5]; _veh allowDamage false; _veh attachTo [_holder]; // to avoid collisions use attachTo [_holder,_veh, _vehCost,_vehType] remoteExecCall ["BEAKS_fnc_ObjectPosDirBankPitch", _veh]; fn_ObjectPosDirBankPitch.sqf
  5. Hi All, I'm spawning objects on top of buildings while trying to orient "temp_veh" using setVectorUp to the buildings slanted surface, but with no luck. As per setVectorUp, "Set object's up vector. Direction vector will remain unchanged. Default object's vectorUp is [0,0,1]. In Multiplayer, setVectorUp must be executed on the machine where the object it applied to is local." I've tried to run this script from [[_stuff], "BEAKS_fnc_ObjectPositionAndDirectionD", player] call BIS_fnc_MP; thinking this would execute it locally on the player's machine but it is still executed on the server? fn_ObjectPositionAndDirectionD ["move_ghost", "onEachFrame", { ...more code _pos = screenToWorld [0.5,0.5];// land position _topPos = [_pos select 0, _pos select 1, 100]; _intersections = lineIntersectsSurfaces [_topPos,_pos, temp_veh, player, true, 1]; _intersectPosASL = (_intersections select 0) select 0; _surfaceNormal = (_intersections select 0) select 1; _building = (_intersections select 0) select 3; _posDrop = _intersectPosASL; temp_veh setPosASL [_intersectPosASL select 0, _intersectPosASL select 1, _intersectPosASL select 2]; // this part works temp_veh setVectorUp _surfaceNormal; // this line DOES NOT work hint format ["ObjectPositionAndRotation \n\n _intersections: %1 \n\n _intersectPosASL: %2 \n\n _surfaceNormal: %3 \n\n _building: %4", _intersections, _intersectPosASL, _surfaceNormal, _building]; ... more code }] call BIS_fnc_addStackedEventHandler; Any tips you can provide would be appreciated. Thanks
  6. Thanks for the reply but, still no joy.
  7. Hi All, I'm trying to customize the respawn menu with my own music but it's not playing anything, I don't get any errors in the debug console either. added to description.ext class CfgMusic { tracks[]={}; class OutfitMenuMusic { name = "OutfitMenuMusic"; sound[] = {"\Music\OutfitMenuMusic.ogg", db+0, 1.0}; }; }; added to initPlayerLocal.sqf //BI RESPAWN MENU - IDD 58 PLAY OutfitMenuMusic if (!isDedicated) then { waitUntil {!(isNull (findDisplay 58))}; //58 if (isNil "BEAK_MUSIC_INIT") then { BEAK_MUSIC_INIT = 1; playMusic "OutfitMenuMusic"; _music = addMusicEventHandler ["MusicStop",{playMusic (_this select 0)}]; waitUntil {isNull (findDisplay 58)}; //58 removeMusicEventHandler ["MusicStop",_music]; playMusic ""; }; }; added folder "Music" in my mission file with the OutfitMenuMusic.ogg that works.
  8. Hi Everyone, I am using the sectors module from the good ol' 2D Editor, but would like the respawn at the sectors to indicate the text I choose and not the coordinates of the VR (see linked picture below). Does anyone know how to do this? http://steamcommunity.com/sharedfiles/filedetails/?id=732217516 I've tried changing the names and description on the sector module, trigger, area with not joy.
  9. Hi Folks, I followed the sticky on Stached event handlers - OnEachFrame, OnPlayerConnected, etc but still couldn't sort this out. Firstly, I'm trying to create a function that will run whenever a unit or vehicle is spawned in the game and, secondly, pass the arguments [_randomSectorDestination, _AIintel, _grp] to the function when calling BIS_fnc_addStackedEventHandler. I've tried the including the following in my scripts whenever I have a unit or vehicle spawn: _addNew = [_key, "onEachFrame", {[_this] spawn BEAKS_fnc_Draw3DNEW}, [_randomSectorDestination, _AIintel, _grp] ] call BIS_fnc_addStackedEventHandler thinking that _this would include the array [_randomSectorDestination, _AIintel, _grp], but it doesn't pass the arguments? I created fn__Draw3DNEW.sqf and added to my descrition.ext class CfgFunctions. Instead, wherever I create a unit or vehicle spawn I have copied and pasted the following, but this seems needlessly repetitive?
  10. Thanks for your help, I had to declare the variables outside the scope for the EH. Got it working!
  11. Thanks again jshock, I tested it using based on your comment above, by initiating the variables before calling the stackedEH like so: _randomSectorDestination = sector1; _AIintel = 1; _grp = group _soldier; _addNew = [_key, "onEachFrame", {_this spawn BEAKS_fnc_Draw3DNEW}, [_randomSectorDestination, _AIintel, _grp] ] call BIS_fnc_addStackedEventHandler; and fn_Draw3DNEW.sqf BUT unfortunately, it still is not working?
  12. OK thanks, so then there is no way to pass these variables to addStackedEventHandler ? What are the arguments then in? [key, event, code, arguments] call BIS_fnc_addStackedEventHandler; I thought they were arguments for the code ... such as [_this] spawn BEAKS_fnc_Draw3DNEW?
  13. HI All, I have a killcam script being called in onPlayerKilled but it is being overrun by the respawn menu I have set-up from the description. description.ext respawn = "BASE"; respawnDelay = 10; // TIME DELAY BEFORE RESPAWN respawnButton = 0; // 0 - to disable respawn button in pause menu DOES NOT WORK USING SCRIPT INSTEAD TO RESOLVE respawnTemplates[] = {"MenuInventory","MenuPosition"}; How can I delay the respawnTemplate menu so the killcam script in onPlayerKilled can be completed first?
  14. Hi Folks, I wanted to see it was feasible to create a bullet cam script in multiplayer to play back a slow motion cut scene of the player's death from within the respawn menu? I assume it cannot be done since setAccTime cannot be used in MP as per the description? Set time acceleration coefficient. May be also used to slow time in cutscenes. This command does NOT work in multiplayer. accFactor is clamped to [1/128; 4] https://community.bistudio.com/wiki/setAccTime .
  15. Hi all, Does anyone know of a command or short script that check if a unit has line of sight to another unit? I'm trying to get my UAV to target a unit but had to cheat by attaching a laser to the unit instead. I've tried a bunch of things like assignTarget, knowsAbout, forceaFireWeapon of mounter laser and doFire...etc, but had no luck. As a workaround, Now i will remove the attached laser whenever the unit goes out of sight from the UAV.
  16. I'm thinking it might be best if you would play test it against me online...whenever you're available? This way you can see the problem and I can explain it while in game? Not sure if you're familiar with the XBOX 360 game from 2006 "The Outfit", but basically Forgive the annoying kids playing...
  17. beako

    The new Sector Module

    Instructions for respawning player at captured sector modules? Has anyone successfully completed instructions with init.sqf (and scripts), sector modules and Respawn Templates or BIS_fbc_Respawn at captured sector modules for MP? If so please send me the link? Thanks
×