Jump to content

Scrocco88

Member
  • Content Count

    13
  • Joined

  • Last visited

  • Medals

Everything posted by Scrocco88

  1. How can i get (in a script) the Object reference to an object created in the editor, having his name stored in a variable? Something like: _variable = "my_object_name"; _obj = getObjectByName _variable;
  2. How can i get the location pointed by a player? Something like the ( ) cursor when using support modules. Tried with cursorTarget but it works only if targeting some object, not working if pointing at ground. Thanks
  3. Scrocco88

    Get pointed location

    The point returned is always the same point, in the upper-left part of the screen. And it's exactly the (0,0) point of the GUI EDITOR grid.
  4. Scrocco88

    Get pointed location

    im using this to get the pointer position: (findDisplay 46) displayAddEventHandler ["MouseMoving","cursorPos=screenToWorld [_this select 1, _this select 2];hint format ['%1',cursorPos];"]; but it seems working only after a first Restart of my mission. What am i doing wrong? Do i need to waitUntil some library before using it? Edit: Actually it works only with a very short distance... if i try to look at something distant a get coordinates much more far away then the real point :(
  5. I need help with vehicles and GET IN/GET OUT waypoints. I need an AI group to reach an extraction point using a car, dismount the car, board an extraction heli that will fly away. Following tutorials i made these waypoints chains. TEAM: Get in -> move -> get out -> move -> get in HELI: Move -> load -> move (underlined waypoints are syncronized) The problem is that the group re enter the car instead of the heli. I think it's because of this: How can i solve it? How can i remove the car from the group "hownership"?
  6. Scrocco88

    Get pointed location

    Thank you, it worked. PS. I've been playing on your wasteland servers these days.... i really love your work! :D
  7. Scrocco88

    Access by object name

    mmm... i think it's not what i asked for. vehicleVarName: setVehicleVarName In both cases you already have an Object variable, and you manipulate it's name. I need to GET the object already HAVING his name, stored in a String variable. vehicleVarName Syntax: String = vehicleVarName objectName [b]Parameters: [/b]objectName: Object [b]Return Value:[/b] String I'm looking for something like object = <something> objectName [b]Parameters:[/b] objectName: String [b]Return Value: [/b]object
  8. How can i add some marker or some texture on the ground? Something like the helipad texture. I tried using Object (Helpers) => User Texture and changing texture with this setObjectTexture [0,'...']. It works but it's a vertical texture. Is there any horizontal equivalent or some way to rotate it?
  9. Ok... non that easy indeed... and i dont know how to find any multi-thread or concurrency documentation about game engine. Thank you very much. :)
  10. Imagine i have 2 scripts that can be executed at the same time, using the same variable (on different unit event handler for example). Someting like that: var = var +1; publicVariable "var"; Can i be sure data will be updated correctly and will always be consistent?
  11. Hi, maybe this is a stupid question but i couldn't figure it out. I need to perform an action when any player dies (MP only, PvP map). So i tried to add an EventHandler to anyone. I tried this in init.sqf if (isServer) then { { _x addEventHandler ["killed", "kc = _this execVM ""killcount.sqf"""]; }foreach allUnits; } In the editor preview (with AI players) anything goes right, but in MP missions it works only with some players. I think the problem is that players joining the server after it started were not in the allUnits loop, so i edited in this way... but it still doesn't work. Init.sqf if (isServer) then { ... { if (!isPlayer _x) then { // To test it with AI units _x addEventHandler ["killed", "kc = _this execVM ""killcount.sqf"""]; }; }foreach allUnits; }; ... waitUntil {alive player}; player addEventHandler ["killed", "kc = _this execVM ""killcount.sqf"""]; ... Any suggestion? How can i consider unit not spawned yet using a loop? (Player hasn't joined the server yet) I assumed that init.sqf runs on every client when he joins the server. Is it right? It works if i set the handler in the "init" field of the unit. Can i do it automatically using a script loop?
  12. ok... but if i have something like: First event: if(isServer) then { .... end_of_first_block } Second event: if(isServer) then { start_of_second_block .... } and the 2 events fires "at the same time", is it SURE they are execute sequentially? (or they can overlap?) end_of_first_block is executed before start_of_second_block?
  13. Is there any website or portal where people can share maps they created?
×