-
Content Count
2494 -
Joined
-
Last visited
-
Medals
Everything posted by sarogahtyp
-
[SOLVED] Howto compile and preprocess a bunch of functions in one file?
sarogahtyp replied to sarogahtyp's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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"...- 21 replies
-
- compile
- compileFinal
- (and 6 more)
-
[SOLVED] Howto compile and preprocess a bunch of functions in one file?
sarogahtyp replied to sarogahtyp's topic in ARMA 3 - MISSION EDITING & SCRIPTING
thx for that info. seems to be the time to learn how to create addons...- 21 replies
-
- compile
- compileFinal
- (and 6 more)
-
[SOLVED] Howto compile and preprocess a bunch of functions in one file?
sarogahtyp replied to sarogahtyp's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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?- 21 replies
-
- compile
- compileFinal
- (and 6 more)
-
Changing gear script (multiplayer)
sarogahtyp replied to fernandolvferreira's topic in ARMA 3 - MISSION EDITING & SCRIPTING
man, LOOK AT post #7 ! I gave u all u need... if u dont understand things just ask -
[SOLVED] Howto compile and preprocess a bunch of functions in one file?
sarogahtyp replied to sarogahtyp's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Link is not working this one is :-): https://community.bistudio.com/wiki/Functions_Library_(Arma_3)- 21 replies
-
- compile
- compileFinal
- (and 6 more)
-
[SOLVED] Howto compile and preprocess a bunch of functions in one file?
sarogahtyp replied to sarogahtyp's topic in ARMA 3 - MISSION EDITING & SCRIPTING
hmm ... idk. could u explain that a bit more pls? I ll try that. thx alot- 21 replies
-
- 1
-
- compile
- compileFinal
- (and 6 more)
-
[SOLVED] Howto compile and preprocess a bunch of functions in one file?
sarogahtyp replied to sarogahtyp's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I knew that this should be easy but I didnt get howto do it. thx alot guys...- 21 replies
-
- compile
- compileFinal
- (and 6 more)
-
Second set of eyes needed for optimization.
sarogahtyp replied to Fiddi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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; }; }; -
i never tried it but hoverguy released some shop systems: Simple Weapon Shop System Simple Vehicle Shop System Simple Clothing Shop System
-
Second set of eyes needed for optimization.
sarogahtyp replied to Fiddi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
great. m0re things tomorrow if i ve the time... -
Second set of eyes needed for optimization.
sarogahtyp replied to Fiddi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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) -
Changing gear script (multiplayer)
sarogahtyp replied to fernandolvferreira's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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";}; }; -
How to import Mission in 2d editor to editor Eden 3d Help
sarogahtyp replied to exevankeko's topic in ARMA 3 - MISSION EDITING & SCRIPTING
upload it and throw a link of it. then we can try to figure it out. -
Teleport AI into vehicle with trigger?
sarogahtyp replied to HeroesandvillainsOS's topic in ARMA 3 - MISSION EDITING & SCRIPTING
u have to assign the ai first and then use https://community.bistudio.com/wiki/moveInCargo -
Empty vehicles showing up as enemy.
sarogahtyp replied to curtcooll's topic in ARMA 3 - MISSION EDITING & SCRIPTING
maybe this helps https://community.bistudio.com/wiki/addVehicle -
[SOLVED] How to detect if player has killed enemy
sarogahtyp replied to revv's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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)) ]; }]; -
[SOLVED] How to detect if player has killed enemy
sarogahtyp replied to revv's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
[SOLVED] How to detect if player has killed enemy
sarogahtyp replied to revv's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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... -
Need help, saving/loading to profileNamespace
sarogahtyp replied to revv's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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... -
[SOLVED] How to detect if player has killed enemy
sarogahtyp replied to revv's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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? -
Second set of eyes needed for optimization.
sarogahtyp replied to Fiddi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 -
Second set of eyes needed for optimization.
sarogahtyp replied to Fiddi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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... -
Second set of eyes needed for optimization.
sarogahtyp replied to Fiddi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
could u throw the complete error message for that part of the script from ur rpt file please? -
Second set of eyes needed for optimization.
sarogahtyp replied to Fiddi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
No, because pushBack provides the index number, not the number of elements... -
Second set of eyes needed for optimization.
sarogahtyp replied to Fiddi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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; };