Jump to content

Lorenz94

Member
  • Content Count

    168
  • Joined

  • Last visited

  • Medals

Everything posted by Lorenz94

  1. Lorenz94

    Solid Marker by Script

    This would work for sure, but the thing is that each user at runtime can decide when and where to put an ellipse marker from a dialog, selecting radius, kind of brush and color. Creating a marker from the beginning and hiding it is not a suitable solution, in this case! I created this thread because I wanted help in understanding why the remote execution is not working as "it should", so what I am writing wrong in my code about it! Thank you 🙂
  2. Lorenz94

    Solid Marker by Script

    Hi, can you please be more specific? I am already casting the function to all the target machine to then create the marker locally (this because if a marker is needed just for a particular group I can't use the command createMarker). Thank you for your reply!
  3. Lorenz94

    HC Tweak + Other Questions

    Really thank you @Larrow! I have waited to reply because I wanted to experiment a bit and come back with questions if needed, but I got something working with full understanding of the code. You're always very kind!
  4. Hello and good evening! I'm doing some tweaking on a couple of scripts I wrote recently and I'm having issues that I can't solve by myself, so any help would be appreciated! As usual, I've already done some research here and on google, but I need some questions to be aswered in order to proceed. 1. How to count the amount of local units to a Headless Client, starting from a serverside script? I simply can't. I tried to retrive the ID of a HC to later exec a function local on it, but I can't manage how to do it! Here's what I have: that doesn't work, but maybe you can have a clearer vision on what I would like to achieve. 2. enableSimulationGlobal: is it true that not all terrain objects can have their simulation disabled? I would like to make all the NW island on Malden indestructible, but nothing happens using: Thank you for your time!
  5. Thank you, will have a look this evening!
  6. Hello, I have completed a dialog on the map that allows player to create round markers. The dialog itself is finished and I'm happy with it, but when I open it, it breaks all the Draw EH already present, such as the light effect that happens on the map with ACE, or other EH I put myself for guidance to the OBJ from the player's position (a line). The dialog works as follows: alt+click on the map opens it, then players can adjust a preview size (using ctrlMapEH draw). If it is night and so the map is dark, when I open the dialog the map turns lighter, then if I confirm or if I press ESC on the keyboard to exit the dialog, the map doesn't turn back to dark. If I open up again the dialog, things got reversed: dark map on dialog open, light again without dialog. To better understand the issue here's a GIF of exactly what I described above: Thanks!
  7. Thank you, I'm waiting for you!
  8. Hi mrcurry, thank you for your reply. Actually, I'm using ctrlAddEventHandler to the Map Control (findDisplay 12 displayCtrl 51), but I don't know if this is the best practice. Can you please tell me how you do add EH on the map? What control do you hook to?
  9. Lorenz94

    HC Tweak + Other Questions

    Thank you gc8, but still no luck. I will replace a couple of buildings and force their attributes from the editor.
  10. Lorenz94

    HC Tweak + Other Questions

    Hello, thank you for your reply Larrow. Can you please help me better understand how this actually works? I've spent the entire afternoon doing tests, but I can't get it to work. The first function should be placed in init.sqf and the second in initServer.sqf, and then should I call the latter? I'm having difficulties in understanding how the process would take place! This is what I can understand so far, would you please correct me where wrong? - You set the "HCCountRequestor" as the person who called the function, otherwise (if the fnc get executed "automatically", I think) to all players. - You collect the owner's ID of each connected HC - You execute the count function on each connected HC, using the found ID And then? This is the part I can't understand. What the !isServer condition does in this case? I've read all the comments, but still unclear to me! The remoteExecutedOwner command is clear and I understand that we need to send back to the caller's machine the information collected, but I can't understand what's the logic behind your script! I'm sure this will be revealing to me Thank you
  11. Lorenz94

    HC Tweak + Other Questions

    Thank you, I will take a deeper look to that page. About the allowDamage / enableSimulationGlobal problem, no one seems to work, both tried calling them from init.sqf / initServer.sqf! Maybe it is as I read some times ago on reddit: not all terrain objects can be manipulated
  12. Lorenz94

    HC Tweak + Other Questions

    Hi, thank you. How am I supposed to do it on a headless? From player init local checking if !hasinterface?
  13. Hello guys, I'm having problems in finding a vehicle's height. I've done some research, and I found out that bounding boxes can be oversized, so what I imagined is a little function that takes the bounding box height and from there starts lower, searching for interceptions. The problem consist in no intersections at all, so can you please help me with the command "lineIntersectsSurfaces"? Here's the function! Thank you and have a great day :D
  14. Lorenz94

    problem with ctrlShow

    SOLUTION: use a switch.
  15. Lorenz94

    problem with ctrlShow

    Up, also tried to execVM an external file from the event inside of the dialog's hpp and then to add a ctrlEH from there, but doesn't work!
  16. Lorenz94

    problem with ctrlShow

    Hello, i'm having the same issue trying to change control's text and text's color. ctrlSetText and ctrlSetTextColor do work inside events (such as "action" or "onButtonClick"), but trying to change those settings outside my dialog's hpp has no effect at all. What I'm doing is calling an sqf from the action event, and then from there I need to change some ctrl' stuff. The control is returned successfully, I also tried command's alternative syntaxes, but still no luck. The button class is RscButton and the dialog is set as follows:
  17. Thank you Larrow! Did you feel guilty in the last few days? hahah :P
  18. Hello guys, I'm back with a question a can't answer on my own: how can I collect all waypoints placed in the editor to later spawn them with the rest of the stuff? I managed to grab all objects, but when I spawn the "composition" all the units are still and do absolutely nothing, even with an enemy in front (enableSimulation is not involved in the script), so I need to add waypoints. I'm not asking for a complete script, but for some information to start with! My idea was to grab waypoint type, owner, position, settings etc by running a forEach loop, but how do I detect waypoints? Do they belong to the "Logic" entities? Thank you!!
  19. Lorenz94

    Grabbing Waypoints

    Just tried, at a first look, positions are not relative! Positions are exactly the same in the editor!
  20. Lorenz94

    Grabbing Waypoints

    @lexx I see! Well, that's exactly what I need.. and I think a really big ton of other guys buuuuut............................. no documentationnnnnn
  21. Lorenz94

    Grabbing Waypoints

    @Larrow I tried as you suggested, all fine except for "get3DENAttribute 'type'" that always returns "[<null>]". What am I doing wrong? @lexx Hi Lexx, thank you for the hint, anyway, I can't find information googling about that function! My idea is to have a bunch of assets and to spawn dynamically them whenever I want and wherever I want, so if the new BIS fnc works like the mod Achilles (that grabs all the stuff, but position is not relative to something), I don't find it useful. Thank you all!
  22. Lorenz94

    Grabbing Waypoints

    Thanks for your replies! @Harzach I use a custom script I'm currently developing that catches all missionObjects in a particular way, so my output is an array of objects to be created (I get classname, position and direction, and then I use the alternative syntax of createVehicle to spawn objects, example: "B_soldier_F" createVehicle _position;). Simulation is absolutely NOT involved in the process (by means that I don't use enableSimulation command). @Larrow I tried your code a while ago, but since the problems it has, I thought it would be best for me to write something by myself other than trying to fix someone' else work (mostly because you are a lot more experienced than me and I'm not sure of having understood what exactly your script does; anyway, I find this kind of scripts challenging and I really would like to put together something starting from nothing!) @pierremgi You're right, but I haven't explained well the situation, so: The aim is to "grab" a list of objects in a particular area, then I would like to spawn back this list of objects in a new position (and I already can do this, in a really basic way at the moment, but it works). What I don't know, is how to include in this list all the waypoints, so that all the units can have their WP once spawned back. @Larrow I read about the commands you posted, and here's another question: when I grab a list of objects in the editor I should use those command, right? And then when I need to spawn the list of object I would use "normal" wp commands such as setWPPos? Thank you for the partecipation!
  23. Hello, I'm finally back on Arma with some work done, and at the moment I'm stuck on a script because of performance issues. What I am trying to achieve is a Polygon drawn from a vehicle in the direction of sight of its driver, updated eachframe and broadcasted to all the players of the same faction. I can get the polygon on map, but the EachFrame EH drops my FPS really fast when the map is opened and things get worse letting the mission run. Spawing a while loop is not an alternative, since it is not as high in priority and the drawing process is kinda laggish. Have you any idea on how to fix this (and some advice on broadcasting this particular event)? Really thank you, as usual, for your big support on this incredible Forum!
  24. This is perfect and works the way I intended to do. I didn't remember about setVariable broadcast ability at all! Thank you!
  25. Please have a look at the code snippet in the post you reacted at. I know what's the id of the turret I need, and what I would like to know is if this particular turret is being used or not (in the case of the helicopter I'm using, the copilot has the ability to use, with right mouse click, the laser pointer camera). This can be achieved locally with cameraView, that returns a string indicating if the local player is in 1st, 3rd or down sight with its camera. Now, it would be great to have my cone drawed to the map only when the turret is being used (so if the copilot of the helicopter has clicked right mouse button and it is currently looking through the laser pointer camera). For this reason, I thought that remote executing the "cameraView" command to the machine where the copilot/laserpointer-camera-guy is and then have all the needed calculations (orientation and thus cone coordinates) only on the copilot machine was a good idea, then remote executing "back to other" Blufor clients the resulting cone to be drawn. Maybe now my aim is more clear, so please don't get "angry", I'm not ignoring your or else' posts, simply I'm trying to think using what I have/know :) Is there any other way to get this information, since the cameraView command works only locally? getCameraView direction returns a player's head direction (that faces forward of the aircraft when using the laser pointer turret). Thank you for your time.
×