Jump to content

Jonssonsson

Member
  • Content Count

    10
  • Joined

  • Last visited

  • Medals

Everything posted by Jonssonsson

  1. Let us suppose that someone (I am totally asking this for a friend) is stupid enough to create an MP mission with ACE enabled in the mission editor so that you can't open the mission in the editor without having ACE mod enabled nor can you play the mission without ACE mod. The mission contains some ACE equipment such as medical equipment, but not other stuff (I think). Is there a way to remove the ACE content from the mission so that the mission could be edited (and played) without ACE mod?
  2. Hi, I'm trying to create a laser beam that is visible without NV/thermal between two objects. The first object (object_1) is stationary and also the source of the laser beam. My second object (object_2) is a moving object (a unit). I was able to create a laser beam facing north from object_1 with the script below, but I do not know how to set the direction of the laser beam to my object_2. Anybody know how to do this? addMissionEventHandler ["Draw3D", { drawLaser [ [getPosASL object_1 select 0, (getPosASL block_1 select 1), (getPosASL block_1 select 2) + 1], [0,1,0], [1000, 0, 0], [], 10, 10, -1, false ]; }];
  3. Jonssonsson

    drawLaser between two objects

    Thanks guys! I got it working to my requirements with this: addMissionEventHandler ["Draw3D", { drawLaser [ getPosASL object_1, getPosASLVisual object_1 vectorFromTo [getPosASLVisual object_2 select 0, (getPosASLVisual object_2 select 1), (getPosASLVisual object_2 select 2) + 1], // This only to get the laser beam to hit the object in the middle, not on ground level [1000, 0, 0], [], 10, 10, -1, false ]; }];
  4. Thanks for the tips _foley and POLPOX. I dabbled with ace_explosives_place and Fired EH and I think i got it working according to my expectations. Fired EH did it for vanilla, but it did not work with ACE. At first, ace_explosives_place did not seem to work with ACE at all, but then I realized that the script does not fire when placing an explosive but rather when you are setting the trigger to the explosive (only if you set a detonator as the trigger, does not work for timer for some reason). So I placed this to unit's init for which I want my script to fire each time the unit plants an explosive (in vanilla) or sets a trigger to an explosive (with ACE): this addeventhandler ["fired", {if((_this select 1) in ["Put"]) then { this say3D "mysound"; }; }]; [ "ace_explosives_place", { params ["_explosive", "_dir", "_pitch", "_unit"]; this say3D "mysound"; } ] call CBA_fnc_addEventHandler; This at least seem to work according to my fairly limited testing.
  5. I have been trying to think of a way to execute a script (playSound or say3d so nothing fancy) each time a player controlled unit plants an explosive in a MP scenario. Could this be done with the event handler? I was thinking that maybe doing this with AnimChanged, but the animation for planting an explosive might be used for other actions... Also, this should be ACE compatible and I know ACE has it own system for planting explosives so it might make a difference. Any ideas?
  6. A stupid question perhaps, but how would I use that script in practice? Also, that would only work when using ACE and I want this feature to work with and without ACE.
  7. Hi! I've been making missions for Arma 3 for a couple of years now and I can usually find answers to my scripting questions by searching this forum or googling. However, I have not yet found a solution to my current problem yet. I'm trying to create an area which would make any infantry unit take 0.1 damage every 5 seconds if the unit stays inside the area. If the unit leaves the area they should stop taking damage. This should apply to ALL infantry units (including but not limited to players) in my MP mission. I think I managed to make mrcurry's script posted in this old thread work for player controlled units using a trigger with my specified area size and "Any Player" activation, and setting the trigger as repeatable. However, I cannot seem to be able to make this work for AI units. I'm just not good enough at scripting. Any idea how I might do that? And to make it even more complex, how can I make the trigger activate for only units that are on foot (i.e., not in any vehicle)?
  8. Thanks again! I think this works just fine for the intended purpose, at least what I was able to test just by myself. I have a poisonous area in my mission which is to be avoided and if you go in on foot, you start taking damage and the units make a small coughing sound. If there are multiple units inside the area the coughing sounds are all played at the same time, which might not be ideal, but the the volume of the sound is quite low and I set the maxDistance to 20m, so it works well enough in my opinion.
  9. Thanks pierremgi! You are a godsend! The script seems to work like I wanted. I realized that I would also like to add a sound effect coming from the object each time it takes damage while in the area. I tried the following: thisTrigger spawn { params ["_trig","_allUnits"]; while {true} do { _allUnits = (entities [["caManbase"],[],true,true] select {_x inArea _trig && local _x}); {_x setDamage (damage _x + 0.1)} count _allUnits; {_x say3D "Sound8"} count _allUnits; sleep 5; }; }; The script seems to work despite giving a script error in game: ...{_x |#|say3D "Sound8"} count _allunits; sle.... Error tybe object, expected Bool Any idea what is the problem?
  10. Hello, I found this topic while searching for a script that would work for my mission. I'm trying to create an area which would make any infantry unit take 0.1 damage every second if the unit stays inside the area. If the unit leaves the area they should stop taking damage. This should apply to ALL infantry units (including but not limited to players) in my MP mission. I think I managed to make mrcurry's script posted above work for player controlled units using a trigger with my specified area size and "Any Player" activation, and setting the trigger as repeatable. However, I cannot seem to be able to make this work for AI units. I'm just not good enough at scripting. Any idea how I might do that? And to make it even more complex, how can I make the trigger activate for only units that are on foot (i.e., not in any vehicle)? p.s. Sorry for the necro.
×