Jump to content

Woodstock21

Member
  • Content Count

    138
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

1 Follower

About Woodstock21

  • Rank
    Sergeant
  1. Woodstock21

    Bystrica Random spawn script

    Ahhh um sure, honestly you kinda lost me, and i have no idea where to or well how to even start that, Just doesnt make sense to me that it doesn't work cause its just a reorganized cherno map and it works fine on the full cherno.
  2. Woodstock21

    Bystrica Random spawn script

    cacheGetPositions getRandomRelativePositionLand = { private ["_target", "_distance", "_direction", "_position", "_bestPositions"]; _target = _this select 0; _distance = _this select 1; _direction = random 360; _position = [_target, _distance, _direction] call BIS_fnc_relPos; if(surfaceIsWater [_position select 0,_position select 1]) then { // handy! http://forums.bistudio.com/showthread.php?93897-selectBestPlaces-(do-it-yourself-documentation) _bestPositions = selectbestplaces [[_position select 0,_position select 1],200,"(1 + houses)",10,1]; _position = _bestPositions select 0; _position = _position select 0; _position set [count _position, 0]; }; _position }; /* Generate Random Relative Position on Water */ getRandomRelativePositionWater = { private ["_target", "_distance", "_direction", "_position"]; _target = _this select 0; _distance = _this select 1; _direction = random 360; _position = [_target, _distance, _direction] call BIS_fnc_relPos; while {!(surfaceIsWater [_position select 0,_position select 1])} do { _direction = random 360; _position = [_target, _distance, _direction] call BIS_fnc_relPos; }; _position }; /* Get count of building positions */ getCountBuildingPositions = { private ["_building", "_count"]; _building = _this select 0; _count = 0; while {str(_building buildingPos _count) != "[0,0,0]"} do { _count = _count + 1; }; _count }; /* Get random building position */ getRandomBuildingPosition = { private ["_building", "_count", "_position"]; _building = _this select 0; _count = [_building] call getCountBuildingPositions; if(_count == 0) then { _position = getPos _building; } else { _position = random _count; _position = _building buildingPos _position; }; if((_position select 0) == 0) then { _position = getPos _building; }; _position }; /* Get a position on the side of a nearby road */ getSideOfRoadPosition = { private ["_target", "_radius", "_roads", "_road", "_position"]; _target = _this select 0; _radius = if(count _this > 1) then {_this select 1} else {100;}; _roads = _target nearRoads _radius; if(count _roads > 1) then { _road = getPos (_roads select (random((count _roads)-1))); _position = [(_road select 0) + 6, _road select 1, _road select 2]; } else { _position = _target; }; _position }; As far as i can tell being called by this init #include <modules\modules.hpp> #ifndef execNow #define execNow call compile preprocessfilelinenumbers #endif // Add briefing execNow "core\scripts\briefing.sqf"; #ifdef gridMarkers if (isServer || isDedicated) then { null = ["null"] execVM "core\modules\gridMarkers\createMarkers.sqf"; }; #endif #ifdef cacheScript execNow "core\modules\cacheScript\cache.sqf"; #endif #ifdef intelSpawn if (isServer || isDedicated) then { [] execVM "core\modules\cacheScript\Functions\spawnIntel.sqf"; }; #endif
  3. Woodstock21

    Bystrica Random spawn script

    Ok ya my bad on that, i forgot that i had tried to comment out the cities thinking that might be the issue, I removed the comment out and new RPT below 18:26:28 Error in expression < _this select 0; _count = 0; while {str(_building buildingPos _count) != "[0,0,0> 18:26:28 Error position: <_building buildingPos _count) != "[0,0,0> 18:26:28 Error Undefined variable in expression: _building 18:26:28 File C:\UsersDocuments\Arma 3\missions\Insurg_CSE_ALiVE1.Woodland_ACR\core\modules\cacheScript\functions\cacheGetPositions.sqf, line 62 18:26:28 Error in expression <(_count == 0) then { _position = getPos _building; } else { _position = random _> 18:26:28 Error position: <_building; } else { _position = random _> 18:26:28 Error Undefined variable in expression: _building 18:26:29 File C:\Users\Documents\Arma 3\missions\Insurg_CSE_ALiVE1.Woodland_ACR\core\modules\cacheScript\functions\cacheGetPositions.sqf, line 80 18:26:29 Error in expression < _building = _this select 0; _count = [_building] call getCountBuildingPosition> 18:26:29 Error position: <_building] call getCountBuildingPosition> 18:26:29 Error Undefined variable in expression: _building 18:26:29 File C:\Users\\Documents\Arma 3\missions\Insurg_CSE_ALiVE1.Woodland_ACR\core\modules\cacheScript\functions\cacheGetPositions.sqf, line 77 18:26:29 Error in expression <BIS_fnc_selectRandom; _cacheBuildings = _cacheTown call SO_fnc_findHouse; _tar> 18:26:29 Error position: <_cacheTown call SO_fnc_findHouse; _tar> 18:26:29 Error Undefined variable in expression: _cachetown 18:26:29 File C:\Users\\Documents\Arma 3\missions\Insurg_CSE_ALiVE1.Woodland_ACR\core\modules\cacheScript\cache.sqf, line 70 18:26:29 Error in expression <building buildingPos _position; }; if((_position select 0) == 0) then { _positi> 18:26:29 Error position: <_position select 0) == 0) then { _positi> 18:26:29 Error Undefined variable in expression: _position 18:26:29 File C:\Users\Documents\Arma 3\missions\Insurg_CSE_ALiVE1.Woodland_ACR\core\modules\cacheScript\functions\cacheGetPositions.sqf, line 86 18:26:29 Error in expression <createVehicle ["Box_East_WpsSpecial_F", _cachePosition, [], 0, "None"]; clearMag> 18:26:29 Error position: <_cachePosition, [], 0, "None"]; clearMag> 18:26:29 Error Undefined variable in expression: _cacheposition 18:26:29 File C:\Users\Documents\Arma 3\missions\Insurg_CSE_ALiVE1.Woodland_ACR\core\modules\cacheScript\cache.sqf, line 78
  4. So im trying to move a existing insurgency mission over to Bystrica using both ALiVE and CSE with it, for the most part it seems to work, except for the main part of the random spawn of the cache, Now im not a scripter at all, as you see from some of my previous posts but i kinda know a little bit just enough to get myself in trouble, and im thinking that it has something to do with the lack of city names on the map. When i go to preview the mission in the editor there is always error message about Bis_fnc_position not finding anything from what i can tell. Below i will put the script in that spawns the cache and a piece of the RPT Please note that this same scripts works fine on Takistan, Cherno, and United Sharni, my buddy really likes Bystrica so thought i'd move it over for him and ran into this issue. Cache spawn script if (isServer || isDedicated) then { private ["_markers","_x","_randomMarker","_dist","_pos","_m","_decrease","_wait","_cacheBuildings","_targetBuilding","_cachePosition"]; INS_marker_array = []; publicVariable "INS_marker_array"; INS_west_score = 0; publicVariable "INS_west_score"; INS_fncache = { if (typeName _this == "ARRAY") then { cache = _this select 0; cache spawn {sleep 60; deleteVehicle _this}; _killer = _this select 1; // check who killed the box switch (side _killer) do { case WEST: { INS_west_score = INS_west_score + 1; publicVariable "INS_west_score"; _this call cacheKilled; }; case EAST: { INS_west_score = INS_west_score + 1; publicVariable "INS_west_score"; _this call cacheKilled; }; case RESISTANCE: { INS_west_score = INS_west_score + 1; publicVariable "INS_west_score"; _this call cacheKilled; }; default { _this call cacheFake; }; }; }; if (count INS_marker_array > 0) then { {deleteMarker _x} forEach INS_marker_array}; publicVariable "INS_marker_array"; _cities = call SL_fnc_urbanAreas; //_cacheTown = _cities call BIS_fnc_selectRandom; _cacheBuildings = _cacheTown call SO_fnc_findHouse; // Pull the array and select a random building from it. _targetBuilding = _cacheBuildings select (random((count _cacheBuildings)-1)); // Take the random building from the above result and pass it through gRBP function to get a single cache position _cachePosition = [_targetBuilding] call getRandomBuildingPosition; // Create the cache at the random marker position cache = createVehicle ["Box_East_WpsSpecial_F", _cachePosition, [], 0, "None"]; clearMagazineCargoGlobal cache; clearWeaponCargoGlobal cache; // Add event handlers to the cache cache addEventHandler ["handleDamage", { if ((_this select 4) == "SatchelCharge_Remote_Mag") then { cache setDamage 1 } else { if ((_this select 4) == "DemoCharge_Remote_Mag") then { cache setDamage 1 } else { cache setDamage 0 }; }; }]; cache addMPEventHandler ["MPKilled", {_this spawn INS_fncache}]; // Move the Cache to the above select position cache setPos _cachePosition; publicVariable "cache"; if (INS_west_score == (paramsArray select 1)) then { end_title = {titleText["All ammo caches have been destroyed!", "PLAIN"];}; [nil, "end_title", nil, true] spawn BIS_fnc_MP; sleep 20; endMission "END1"; }; if (!isMultiplayer) then { //debug to see where box spawned is if not multiplayer _m = createMarker [format ["box%1",random 1000],getposATL cache]; _m setMarkerShape "ICON"; _m setMarkerType "mil_dot"; _m setMarkerColor "ColorRed"; }; }; true spawn INS_fncache; }; RPT 17:33:19 Error in expression < _this select 0; _count = 0; while {str(_building buildingPos _count) != "[0,0,0> 17:33:19 Error position: <_building buildingPos _count) != "[0,0,0> 17:33:19 Error Undefined variable in expression: _building 17:33:19 File C:\Users\Documents\Arma 3\missions\Insurg_CSE_ALiVE1.Woodland_ACR\core\modules\cacheScript\functions\cacheGetPositions.sqf, line 62 17:33:19 Error in expression <(_count == 0) then { _position = getPos _building; } else { _position = random _> 17:33:19 Error position: <_building; } else { _position = random _> 17:33:19 Error Undefined variable in expression: _building 17:33:19 File C:\Users\Documents\Arma 3\missions\Insurg_CSE_ALiVE1.Woodland_ACR\core\modules\cacheScript\functions\cacheGetPositions.sqf, line 80 17:33:19 Error in expression < _building = _this select 0; _count = [_building] call getCountBuildingPosition> 17:33:19 Error position: <_building] call getCountBuildingPosition> 17:33:19 Error Undefined variable in expression: _building 17:33:19 File C:\Users\Documents\Arma 3\missions\Insurg_CSE_ALiVE1.Woodland_ACR\core\modules\cacheScript\functions\cacheGetPositions.sqf, line 77 17:33:19 Error in expression <l SL_fnc_urbanAreas; _cacheBuildings = _cacheTown call SO_fnc_findHouse; _tar> 17:33:19 Error position: <_cacheTown call SO_fnc_findHouse; _tar> 17:33:19 Error Undefined variable in expression: _cachetown 17:33:19 File C:\Users\Documents\Arma 3\missionsInsurg_CSE_ALiVE1.Woodland_ACR\core\modules\cacheScript\cache.sqf, line 70
  5. Woodstock21

    Delete marker script.

    Ok so ya i went ahead and changed all the markers to their local counterparts and it works the way intended now, Thanks for the help, and thought i'd post that it works correctly in case someone else runs into the same issue.
  6. Woodstock21

    Delete marker script.

    Ok im back again, and things seem to kind work, what i've come across is that the marker is being placed for everyone and the marker says on the map, But my map the maker will disappear. this is what i have for the full scripts and code, any help would be great if not im just going to remove it. initPlayerLocal.sqf if ((getPlayerUID player) in ["myplayerID"]) then { player addAction ["<t color='#FF0000'>Cache Location</t>", "cacheloc.sqf"]; }; player addEventHandler [ "Respawn", { if ((getPlayerUID player) in ["myplayerID"]) then { player addAction ["<t color='#FF0000'>Cache Location</t>", "cacheloc.sqf"]; }; } ;] cacheloc.sqf _m = createMarkerLocal [format ["box%1",random 1000],getposATL cache]; _m setMarkerShape "ICON"; _m setMarkerType "mil_dot"; _m setMarkerColor "ColorGreen"; uiSleep 10; for "_i" from 1 to 0 step -0.1 do { _m setMarkerAlphaLocal _i; uiSleep 1; }; deleteMarkerLocal _m; Im kinda thinking that the cacheloc.sqf should have a" if ((getPlayerUID player) in ["myplayerID"]) then { " thing around it but im not sure. if that would do anything
  7. Woodstock21

    Delete marker script.

    and i should leave the orginal code inthe init like on my frist post ---------- Post added at 05:16 PM ---------- Previous post was at 05:11 PM ---------- ok tested it and it works thanks again man muchly appreciate all the help ---------- Post added at 06:58 PM ---------- Previous post was at 05:16 PM ---------- Well to be correct i tested with just myself and it was working, i finally got some guys on the server to test and what seems to happen, is that the marker will show up for everone and not go away, except for off my map, so it seems like its being done server wide
  8. Woodstock21

    Delete marker script.

    with the initPlayerLocal.sqf just put that code into that save the file and leave it onthe root i don`t need to call it from anywhere
  9. Woodstock21

    Delete marker script.

    Wow i cannot belive i missed that, im a idiot thanks a lot for the help on that one JShock you are the man dude. Much thanks and praise
  10. Woodstock21

    Delete marker script.

    Alright so i was finally able to test out the script and it kinda worked, couple issues i came across was the marker still didn't delete after the 10 seconds and upon respawn the addaction to call the script was no longer in my scroll wheel
  11. Woodstock21

    Delete marker script.

    Awesome thank you very much i guess i missed the setMarkerAlphaLocal.
  12. Woodstock21

    Delete marker script.

    Well the scripts will be part of the mission which is of course hosted on the server, um sure in a couple days i will have it tested
  13. Woodstock21

    Delete marker script.

    Yes i would like it so that only i can see the marker that gets placed on the map, Just so that it doesn't ruin it for everyone. . So just changing createmarker to createMarkerLocal would only create the marker on my map correct Also thanks for the help and quick response. i shall try it out later on
  14. Hello there so just wondering if any expert could help me out, Basically i kinda tossed a script together for a insurgency mission where by my playerID has the ability to see where the cache has spawned, my issue is that it would like to have the marker disappear off my map after a period of time, Init if ((getPlayerUID player) in ["myplayerID"]) then { player addAction ["<t color='#FF0000'>Cache Location</t>", "cacheloc.sqf"]; }; Cacheloc.sqf _m = createMarker [format ["box%1",random 1000],getposATL cache]; _m setMarkerShape "ICON"; _m setMarkerType "mil_dot"; _m setMarkerColor "ColorRed"; I've messed around with the deletevechile function and sleep, but i just don't know enough about the scripting language to get it to work, The above stuff works and shows the red dot for the cache in MP just its always there. Any help would be appreciated. Thanks in advance
  15. Woodstock21

    Task Force Arrowhead Radio

    Yes for some reason the copy and paste is adding in spaces when i posted here i didn't notice them until after i posted this. Now that i have a little bit of time, im going to start excluded mods and see where it breaks. If anyone else has ides in the mean time please let me know, I shall keep you guys posted. and thanks for the help thus far. The main thing that concerns me is at the end of the RPT file about the netserver Destroy lines, i don't really understand what is happening there. at all UPDATE Just finished messing with the command line and the mods and i've gotten it to work mods needed to be loaded in a certain way i guess had to have the RHS and requirements loaded first before leights_opfor to get loaded. Just thought i'd update it incause others run into a similar issue. -mod=@cba_a3;@task_force_radio;@allinarmaterrainpack;@alive;@cse;@rhs_usf3;@rhs_afrf3;@rhs_afrusaf;@hlcmods_ak;@hlc_ar15;@asdg_jm;@hlcmods_m14;@hlcmods_core;@ASDG_JR;@leights_opfor;
×