Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by Ed!

  1. I've been having trouble getting this to work due to the inability to build classes with their own members etc. It is hard (not impossible) to accomplish certain things. I've managed to do some A* algorithms in the past which involved nested arrays within nested arrays within nested arrays. The reason I want to use Voronoi diagrams, is because it uses site points (positions - example: trees, players, rocks etc.) and renders nodes and edges which are like central positions between the site points. This will be a non-random approach to replace BIS_fnc_findSafePos with guaranteed success (if there exists a solution given the environment). Every result that is not favorable can just be added as a site point to the algorithm which will lead to an intelligent algorithm which can evenly distribute objects over an area within any environment. I can do this with object orientated programming, but that would require me to build addons which I don't prefer.
  2. @mrcurry You made my year. I got a bit carried away with real life. I will add this to my mission and give you credit in all CAPS.
  3. Is there a way to simultaneously control multiple units at the same time? Example: Controlling both the turret and driver units in a vehicle. (there is a post already on this, but too much flaming to revive). remoteControl seemed like the answer, but I failed. The closest I got was by switching control to the driver and gunner on each frame, but it was cancer for my eyes.
  4. A very good idea. I changed it a bit so you don't need the target. The next stumbling block is using the camera of the agent in the gunner seat. Aiming via the vehicle optics would be epic. Here is what I did: testcar addEventHandler ["GetIn", {_this execVM "carin.sqf";}]; /////////////////////////// //carin.sqf params ["_vehicle", "_position", "_unit", "_turret"]; handleClick = { _handled = false; if(_this select 1 == 0) then { vehicle player action ["UseWeapon", vehicle player, gunner vehicle player, 0]; _handled = true; }; _handled; }; if (driver _vehicle == player) then { (findDisplay 46) displayAddEventHandler ["MouseButtonDown", "_this call handleClick;"]; (findDisplay 46) displayAddEventHandler ["MouseButtonDown", ""]; DummyGunner = createAgent [typeof player, [0,0,0], [], 0, "FORM"]; DummyGunner moveingunner _vehicle; [_vehicle] spawn { params ["_vehicle"]; while {driver _vehicle == player} do { DummyGunner doWatch (positioncameratoworld [0,0,100]); sleep 0.1; }; deleteVehicle DummyGunner; (findDisplay 46) displayAddEventHandler ["MouseButtonDown", ""]; }; };
  5. Or perhaps is there a scripting command to force a unit to turn left or right, accelerate, brake etc? Maybe a magic switchMove or animate that can be called on the vehicle just like with doors etc?
  6. Ed!

    Tracer Line script

    A quick search suggests that you described exactly this. Edit: You should consider rather posting on the already existing thread.
  7. Changing the screen resolution without restarting the game causes issues with UI controls. Have you tried restarting your game after applying the new resolution?
  8. Ed!

    How to store a code.

    spawn makes it run in a different thread. call makes it run in the same thread.
  9. I will give you a C# project that I used to play around with performance counters and wmi. It is not a best practise, but you might be able to learn something from it. The output is as follows: The result comes from launching arma and then loading altis. You can paste the results in excel and graph them if you wish. The time intervals aren't constant either, but this will give you the information you need. Just take into mind that the first time you load a mission will take longer than the second time you load it because the resources are still stored in your memory. https://dl(dot)dropboxusercontent(dot)com/u/56725922/Resource%20Monitor%20-%20Copy(dot)rar I stripped some content from the project because it was actually used to monitor server performance during running queries on MSSQL and MySQL servers. So, there might be strange references. (Project from an old school assignment)
  10. Use performance counters externally or even integrate them with an extension
  11. Perhaps you can use the HandleDamage EH because it records the projectile that caused the damage. So you can refer to the last HandleDamage upon death. But I think that will only lead you to getting a list of weapons compatible with those projectiles, although you can use the currentWeapon if you get to ammo used by a primary weapon, secondary weapon or a pistol.
  12. I have seen some threads touching the topic, but I did not find an answer/opinion I was looking for. Since scripting for Arma has allowed us to do many glorious things with our missions (example: integrating with databases), I thought it would be great if we could start dynamically creating dialogs using HTML and Javascript. Some other game engines already utilize this technology (although ARMA does too, but is very limited). Imagine creating dialogs like this: And then you can call it like this
  13. https://forums.bistudio.com/topic/157999-dialogs-using-html/#entry2484180 Look at that. Maybe it could help. AFAIK html documents are static and cannot perform any actions
  14. Wouldn't it be great to create a complete functioning dialog based only on HTML documents?
  15. I've created a script that finds the shortest route between points via roads. But I've found that not all roads are connected properly. Is there a workaround to know which roads are connected without using roadsConnectedTo? I montirored the search by adding a marker to jump to the active node being searched and it stopped at the following spot (marked with red arrow):
  16. I haven't tested this, although I think the result might be very similar. I also thought the (count roadsConnectedTo _road) == 1, but the problem was that it was 2. There is a junction in the road. The result should have been 3 roadsConnectedTo. Finding the shortest route would have taken about 10 seconds instead of a minute if those roads were connected.
  17. I am currently thinking of using a combination of setVariable and getVariable on objects to get the same behavior as you would get from classes in OOP. I am thinking of doing the following: _x = someObject; _x setVariable ["foo", "bar"]; which would be similar to: Object x = new Object(); x.foo = "bar"; If there is a better practise, please stop reading and just direct me towards it. If the above is sufficient, what object would be the best to use the setVariable/getVariable on? I am looking at creating an array which might contain more than a thousand of these objects.
  18. I guess creating units with the least resource usage will be the best then.
  19. How would I then go about doing the following?: _obj1 = someobject; _obj1 setVariable["foo", "bar"]; _obj2 = someobject; _obj2 setVariable["parent", _obj1]; _obj2 setVariable["foo", "baz"]; _quz = (_obj2 getVariable "parent") getVariable "foo"; I want to know what the best "someobject" would be to attach the variables to. Edit: My question should rather be: How do I create a namespace? I do not want to use missionNameSpace or units etc. I just want a namespace which does not belong to anything.
  20. https://community.bistudio.com/wiki/BIS_fnc_MP If you go look at the comments on that page, Killzone_Kid posted an example of exactly what you are trying to do here.
  21. I've noticed that when playing short missions, most players disconnect because of excessive lobby wait times. I now made an array which stores all my handles and when the mission is over, I terminate all these handles and just rerun my init.sqf. Im just a bit concerned about the memory usage of the server after this action occured more than 10 times. Will there be memory issues caused by this practice?
  22. This is exactly the answer I was looking for. My whole mission is based on scripts - Nothing is staticly placed except the respawn location. So what I did is terminate all the handles, then delete all the mission objects, set some important variables to nil and then execute the init.sqf again. Thank you for all the replies. I am spamming the "like this" for all of you. :P
  23. Could you please also give me insight on why it would be a waste of time?
  24. You should concider adding the flow chart for a client as well as a listen server too. ;) I guess that is what you mean by