Jump to content

sarogahtyp

Member
  • Content Count

    2494
  • Joined

  • Last visited

  • Medals

Everything posted by sarogahtyp

  1. sarogahtyp

    Server Browser issue

    No, there is no new port which has to be opened. If your query port is 2302 then u should open/forward. 2302 2303 2304 2305 (actually not neccessary, thought as extra port for VON but because of an issue actually unused)
  2. Hey guys, i hope for ur help. I wanna spawn AI gunners for a vehicle the player has chosen to drive. createVehicleCrew is no option cause i wont spawn inside of the vec. I wanna spawn outside and let em get in. For that I wanna know if the vehicle chosen by player has a gunner and/or a commander seat and how much turrets it has. Also I need to get the correct turretPath to that turrets. Additional it would be nice to spawn some AI which should take their seat at these cargo seats from where they are able to shoot with their own guns. So I need the cargo index of that seats Any help is apreciated. Thanks a lot.
  3. Okay guys, with ur hints it is now a good working script and it works with a dedicated server too. If anyone wish to use it just do it. The only thing what I dont like with it is that the driver the spawned AI and the vehicle must be in the same group. I created a new group and moved all into that. I wish I could let the driver/player in his own group. but i think there is no solution for that problem. But as I said, script is working now and I m happy with it. Thanks a lot.
  4. Thank u. U found the mistakes in the uncommented code but i think i dont need the cargo seats cause they r also turrets and r coverd by the "handle turrets" part of the script. _temp_squad consist of 1 unit only so point 3. isnt a mistake. but my main problem is that the AI gets out of the vecs instantly after embarking it.
  5. replace line 33 with the following code: if (_thread > 0) then { _unit fireAtTarget [_target];};        the reason is that if _thread is 0 or lower, then all targets are friendly and will not handled by the if condition at line 24 where _target is asigned. Please give a feedback if that works.
  6. _unit = _this select 0; if (_unit ammo "autocannon_35mm" < _ammoCountForFlak) then { (_unit) setAmmo ["autocannon_35mm", 680]; _tarPos = []; _target = 0; if (isPlayer (assignedGunner _unit)) then { _target = cursorTarget; if (_unit distance _target < _maxDistance) then { _tarPos = getPos _target; }; } else { _possTar = _unit nearTargets _maxDistance; if ((count _possTar) > 0) then { _threat = 0; { if (_x select 3 > _threat) then { _threat = _x select 3; _target = _x select 4; _tarPos = getPos _target; }; } forEach _possTar; _unit fireAtTarget [_target]; }; }; if ((count _tarPos) > 0) then { _tarX = _tarPos select 0; _tarY = _tarPos select 1; _tarZ = _tarPos select 2; if (_tarZ > _targetMinHeight) then { _flakDis = ((speed _target) * (_speedDispersion / 100)) + ((_unit distance _target) * (_distanceDispersion / 500)); _disX = (random (_flakDis * 2)) - _flakDis; _disY = (random (_flakDis * 2)) - _flakDis; _disZ = (random (_flakDis * 2)) - _flakDis; _flak = "SmallSecondary" createVehicle [_tarX + _disX, _tarY + _disY, _tarZ + _disZ]; }; }; }; i think the problem is located in line 28. the variable _target contains 0 at this point but it should be the target object. in line 10 this is done correct but only if the assigned gunner is _unit. In the else case after line 18 there is no such object assignment for variable target. because of that _target is the number as it was inited. In this case 0. You cant get the position of a number. that where wrong thoughts... just thinking about again.
  7. i think u should learn something about scheduled and non-scheduled environment cause thats the key of ur mistake. there is no need to discuss that for every given example at the wiki. also killzone kid explains the problem on the notes of the wiki page useful links: killzone kids scripting tutorial BI wiki - code optimization
  8. With ur help I got some working peace of code now. Thank u for that. But there r some problems with it. First, would someone tell me how I can do a spoiler in this forum, please? The main problem is that it works perfect in 2D editors preview but if i test it at my dedicated server then the spawned A.I. is directly moved into the vehicle via moveIn command but then it gets out instantly. After that it tries to get in again and again but it will get out instantly every time. Only for copilots of huron and ghosthawk it is working. They dont leave the vehicle. ai_gunners.sqf:
  9. How can I do that by scipt? okay for commander and gunner i think this this could be a solution: if (isNil {commander _vec}) then{hint "no commander seat";}else{hint "commander seat available";}; Edit: I found allTurrets now but I dont know what FFV-turrets are. Could someone explain it? Edit: FFV means Fire From Vehicle
  10. sarogahtyp

    3D->2D

    If u mean how to convert the binariezed mission.sqm to a text format mission.sqm: "Save As:" >> delete the hook from save binariezed.
  11. Every variable has a limit somewhere, represented by the bits or bytes its using. In that case its 8 bits or 1 byte as u calculated above. I think the next possible size would be 2 bytes which means 16 bit and a maximum value of 65536 states represented in that 16 bits which means it could be 65535 players then because 0 is a state too. I ve never seen a server with about 200 players ( maybe i never looked for it). Why should that value be increased?
  12. I m sorry, but i ve never tried that. You could try to find a solution with cameraEffect but i think u have to create a camera first. Here is a tutorial for a bullet cam which u can use to understand how camera creation works. http://killzonekid.com/arma-scripting-tutorials-a-simple-bullet-cam/ with cameraEffect you can force a fixed camera view for external cam. Also u should post ur script to let us look for mistakes.
  13. Is it actually not possible to load the work off to HC as I would do it with a normal player without that virtual game logic thing?
  14. Without ur init.sqf its a kind of guessing instead of knowing about it. First I think it should be done for all clients. The "regular" Namespace ist the MissionNamespace so the following on each client should do the job: RscSpectator_allowFreeCam = false; Alternative as it is a global variable u could execute the following on the server or headless client (or any other client) only: RscSpectator_allowFreeCam = false; publicVariable "RscSpectator_allowFreeCam"; That will set the variable and broadcast it to every client. The last alternative is to broadcast it while using setVariable with the public parameter (last parameter): missionNamespace setVariable ["RscSpectator_allowFreeCam", false, true];
  15. sarogahtyp

    Changing into a bird upon relog?

    After rolling back to 2D version of the mission pbo file i never saw a seagull again.
  16. if (condition) then { [] call first_wp_set; } else { [] call secon_wp_set; };
  17. i would do a script for that which is started by a trigger or waypoint. u should not write all of that stuff in the init line. in a script u could use the name of the tank as a global variable of it. if ur tank is named TANK1 then u could use _tank = TANK1; and the local variable _tank represents ur TANK1. same with _target. name ur target TARGET1 and in the script u can do _target = TARGET1 but u ve to learne some scripting for it as the init line is very limited...
  18. as i said provide the informations i requested in my first post to get help. i strongly recommend again to not use that auto detection script cause its not released for arma3. there are people got it running with arma3 but they changed something in that script as u can read here https://forums.bistudio.com/topic/145948-elecs-headlessclient-auto-detection-switch/ i m interested in helping u but not with that scipt and not without the requested information.
  19. i would suggest onMapSingleClick ""; after your loop is finished. Container:
  20. Only the last group will have that name: You should use an array to spawn and handle multiple groups
  21. sarogahtyp

    headless client issue

    Use command line parameter -cpucount=1 That will extend the time to timout to some hours. (2 1/2h in my case)
  22. Some information about it woul be nice.
  23. sarogahtyp

    Change squad name

    I googled for ur question and the answer I found was that u already know the answer: https://www.reddit.com/r/armadev/comments/2hg6u1/display_group_names_in_mp_lobby/ I think to do it with a script is not possible but read the following yourself to get sure about: https://community.bistudio.com/wiki/Functions_Library_(Arma_3)#Initialization_Order
×