Jump to content

sarogahtyp

Member
  • Content Count

    2494
  • Joined

  • Last visited

  • Medals

Everything posted by sarogahtyp

  1. Okay, as I said I ll use that libráry in future but I ve some thoughts I d like to throw. that library has surly advantages but I see some disadvantages. If I d like to release a script then I want to release it as easy as possible for the mission designer who will use it. I dont like that the functions must be defined in description.ext. A mission designer who wants to use the functions has to merge my description.ext with its own. As some guys r only modifying existing missions to implement some more features and then run it on their server they dont have much knowledge about description.ext. They just want to have a command to init the script and then use the features of it via functions. The necessity of those description.ext entry forces me as the creator of a script to provide two ways for implementation of my scripts in missions now. The easy way with the classic initing and precompiling and for the mission designers who r familiar with description.ext the way with that function library. It would be easier if there were a way to implement the functions in the library by just including a custom file in discription.ext by doing somethinge like #include "custom.ext"...
  2. okay, I read that wiki entry about the function library and yes of course i ll use it. maybe i didnt get all of that wiki entry because some questions remain. If I understood that correct then I ve to write every function in its own sqf file if I use that library or is it possible to do one file with a few functions with it? Next question. Is there a way to force server sided functions to be compiled at server only?
  3. sarogahtyp

    Changing gear script (multiplayer)

    man, LOOK AT post #7 ! I gave u all u need... if u dont understand things just ask
  4. Link is not working this one is :-): https://community.bistudio.com/wiki/Functions_Library_(Arma_3)
  5. you have this: while {_counter < 8} do { . . if (_foundSafePos dista ... { . . _counter = _counter + 1; _missionPosArray pushBack _foundSafePos; }; }; I think u dont need to count because pushback provides arrays index number. this should be the same: while {_counter < 7} do { . . if (_foundSafePos dista ... { . . _counter = _missionPosArray pushBack _foundSafePos; }; };
  6. sarogahtyp

    Arsenal with prices ?

    i never tried it but hoverguy released some shop systems: Simple Weapon Shop System Simple Vehicle Shop System Simple Clothing Shop System
  7. great. m0re things tomorrow if i ve the time...
  8. Okay Im at ur first script from post #5 again and I ve some tiny suggestions: _unit = _this select 0;is same as params ["_unit"];but now _unit is private, too. _size = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");is same as _size = worldSize;this needs 3 calculations _mapCenter = [_size/2,_size/2]; _mapHalf = _size/2;but this needs 1 calc only _mapHalf = _size/2; _mapCenter = [_mapHalf,_mapHalf]; and here is something from greenfists post in another topic. this: [(_foundSafePos select 0)+(random _radius)-(random _radius),(_foundSafePos select 1)+(random _radius)-(random _radius)]can be this one: ((_foundSafePos getPos [random _radius, random 360])resize 2)
  9. sarogahtyp

    Changing gear script (multiplayer)

    the solution in post #3 will work client side. that means every connected player will execute the script as its own thread. so its not executed once only. u can modify the script with some if then constructs to give a specific unit its specific gear. if(player==A1)then { //gear script for A1 }; EDIT switch do solution: initPlayerLocal.sqf waitUntil {sleep 1; getposATL player select 2 < 2}; switch (player) do { case A1: {[] execvm "scripts\backpack\A1.sqf";}; case A2: {[] execvm "scripts\backpack\A2.sqf";}; case A3: {[] execvm "scripts\backpack\A3.sqf";}; case A4: {[] execvm "scripts\backpack\A4.sqf";}; case A5: {[] execvm "scripts\backpack\A5.sqf";}; case A6: {[] execvm "scripts\backpack\A6.sqf";}; case A7: {[] execvm "scripts\backpack\A7.sqf";}; case A8: {[] execvm "scripts\backpack\A8.sqf";}; };
  10. upload it and throw a link of it. then we can try to figure it out.
  11. sarogahtyp

    Teleport AI into vehicle with trigger?

    u have to assign the ai first and then use https://community.bistudio.com/wiki/moveInCargo
  12. maybe this helps https://community.bistudio.com/wiki/addVehicle
  13. I m the last person one should ask for remoteExec cuz I was always wrong with it upto now. But try this: _unit addEventHandler ["killed", { [[_this select 0, _this select 1], "scripts\killed.sqf"] remoteExec ["execVM", (owner (_this select 1)) ]; }];
  14. correct me if Im wrong but this EOS script which u use is executed on server only, isnt it? If i ve understood ur rewarding system correct then ur rewarding works client side. that means u will have the EHs for detect the killing at server but the reward system does not know about the kills because it is at client. If u go that fired EH way (I think to follow jshocks would be better) then u ve to use remoteExec to call ur killed.sqf client side... But idk much about EOS so I could be wrong.
  15. What about that mission EH jshock posted? For me it looks like the best solution. And again, what u posted as a solution in ur first post is NOT a solution for the topic. it detects only if a player was killed and NOT if player killed anyone but himself...
  16. assuming from ur other post where u now use hoverguys script I think that this topic is solved. Why not sharing the solution. If u ask for help then its the minimum u could payback to share the solution. We help to learn from it...
  17. Sorry but I think nothing is solved here. the fired EH fires if the unit it is added to is killed. u added the EH to players only. it will fire if player is killed and if it was a suicide it will count a team kill and a suicide and then substract the related money for both. but it should never count a kill... Correct me if I m wrong but I guess u should rename the topic as its not solved. @jshock what is the advantage of that mission EH u posted?
  18. thats it for today cuz i m goin home now. but now u can substitute each + with pushback and each for loop with forEach by urself in that code and ur other scripts. if u did that then update post #5 with ur modified code and throw the next script in a new post. i ll look at it tomorrow... cheers
  19. sorry, the mistake should be that line: _distanceArray pushBack [_x distance (_foundSafePos)]; substitute it with this one: _distanceArray pushBack (_x distance (_foundSafePos)); I added arrays with pushBack instead of numbers...
  20. could u throw the complete error message for that part of the script from ur rpt file please?
  21. No, because pushBack provides the index number, not the number of elements...
  22. One thing I see is that u should use pushBack instead of + if u add an element to an array because its much faster and its return value is the index number of those last element. This means u dont need to count the array afterwards. for example this part: for "_t" from 0 to ((count _missionPosArray) - 1) do { _distanceArray = _distanceArray +[(_missionPosArray select _t) distance (_foundSafePos)]; }; for "_t" from 0 to ((count _distanceArray) - 1) do { _check = (_distanceArray select _t); if (_check < _minDistance) then { _found_dist_away = false; }; }; could look that way: private ["_array_count"]; for "_t" from 0 to ((count _missionPosArray) - 1) do { _array_count = _distanceArray pushBack [(_missionPosArray select _t) distance (_foundSafePos)]; }; for "_t" from 0 to _array_count do { _check = (_distanceArray select _t); if (_check < _minDistance) then { _found_dist_away = false; }; }; EDIT: next thing u could do is using count or forEach instead of for do and then i will look this way: { _distanceArray pushBack [_x distance (_foundSafePos)]; } forEach _missionPosArray; private _count = 0; _count = {_x < _minDistance} count _distanceArray; if (_count > 0) then { _found_dist_away = false; };
×