Jump to content

JCataclisma

Member
  • Content Count

    136
  • Joined

  • Last visited

  • Medals

Everything posted by JCataclisma

  1. JCataclisma

    Create Task To Move Object

    Oh, indeed! I´ve gotten so used to createVehicle [0,0,0] and attach after that then I had completely forgotten about the idea of that. Nice!
  2. JCataclisma

    Create Task To Move Object

    But it won't be "possible" to make it work straight that way because the object will be created/spawned midgame, not at the editor. So it will probably be necessary to add a variable name to such object and then make it public...?
  3. JCataclisma

    Spawn only modded units

    I think the first step would be to specify exactly which units you DO want to spawn, or the opposite, the specific units you DO NOT want to spawn. For that, you will need to know their class names: put one in editor, then right click and select "Log -> copy class to clipboard". One by one, you can paste them in an external txt editor to save your starting list. There are lists of vehicles here as well, but those do not include DLCs, as far as I know: https://community.bistudio.com/wiki/Arma_3:_CfgVehicles_EAST Also, are you planing to do that for a mission you are building from start, right? Or you are downloading it from Steam Workshop and want to change an existing mission? Because I don't think you can easily perform such changes in case you are playing one of the missions which come inside the game - regardless DLCs. Besides, a similar thing will be required whether you decide to authorize/block hand weapons for human units as well. You can have a list for weapons here: https://community.bistudio.com/wiki/Arma_3:_CfgWeapons_Weapons
  4. Hello! Are you trying that only in editor and/or single player? Or it works fine in SP but not in MP/dedicated? If multiplayer, the "problem" regarding addAction is related to that "Local vs. Global" stuff - so hardly anything related to addAction will do anything in multiplayer, even if it works in single player. Guys here have already helped me A LOT with it, and it will always need an extra work to try and get it working as we usually desire. I will bring some workarounds that have worked for me - all of them after some nice tips I got here in forums, but some better approaches will arise from other users as well. But I think the most effective way would be to create an eventHandler 'GetInMan' inside your init.sqs/init Player that would execute your addAction once players get inside that specific police truck of yours. For instance, this is part of what we have in a getInMan EH in a init, that will allow pilots to have permanent options to lock/unlock access to their copilot's seats. I know it's far from what you want, but at least for now it could give you some ideas. Please also note that, for this case, we used getInMan, which has to deal with the "_unit" as a 'human" (regardless player or IA), and then checked for the type of vehicle to add the action to THE PLAYERS, and NOT to the vehicle. In your case, it might be more interesting to use EH 'getIn' and maybe add the action to the vehicles themselves.
  5. You could basically use the same simple code of this video, but instead of teleporting them when pressing an action, the code would be in your trigger's activation field 😉
  6. JCataclisma

    Write to DS window?

    Providing the upper right corner messages come (by default) with "hint"/"hintSilent", I think what you want is to use "systemChat" instead. But that inGame, of course, so I don't know if I understood you correctly. 😕 Try and take a look if that's what you need: https://community.bistudio.com/wiki/systemChat
  7. I have tested and so MODIFIED my previous post. Now the script acts upon entering as driver ONLY - I had used "||" which works as "or", instead of the "and" which is there now. And I have also removed the "sleep", which is not allowed in such cases. But it still does NOT avoid players entering in other seats and then changing to driver, whether the vehicle allowed to do so - that requires another kind of "switchSeat" eventHandler. Whether you want it avoid access for every seat in the vehicle, just change the "if" line into this: if (_unit isKindOf 'SoldierWB') You also have the probably more simple option to just lock the driver seat at some point by using _this lockDriver true; So you can add all this into your "forbidden" vehicle's init field. The very first time the player enters the driver seat, they'll be ejected and driver locked permanently. And the lock will also work when vehicle's original driver exits - but I think it wonk work whether drivers got k1ll3d. For that case, there is a third part of code, that will permanently lock the driver seat once vehicle receives a specific amount of damage (providing "0" is full health, "0.5" is half damaged and "1" is completely destroyed). _this addEventHandler ["getIn", { params ["_vehicle", "_role", "_unit", "_turret"]; _vehicle = _this # 0; if (_unit isKindOf 'SoldierWB') then { _unit action ["eject", _vehicle]; hint "You should not use enemy vehicles"; } }]; /*/======================/*/ _this addEventHandler ["getOut", { params ["_vehicle", "_role", "_unit", "_turret"]; _vehicle = _this # 0; if (_role == "driver") then { _vehicle lockDriver true; } }]; /*/======================/*/ _this addEventHandler ["Dammaged", { params ["_unit", "_selection", "_damage", "_hitIndex", "_hitPoint", "_shooter", "_projectile"]; if (_damage > 0.7) then { _unit lockDriver true;} }]; Remember to change both starting "_this" into "this" if you wan to test it on editor.
  8. As far as I have learnt, you need to follow the original params for handlers, so you cannot change "_dAmage" into "_dOMmage" - even if you have set "_dommage = _this # 2" a few lines later. https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleDamage It's most likely you will need to create a global "count" for the boss' full life, and use eventHandler to remove "points" from that life. For instance, this is what I use for a "knock-out" script, which works as oppose-counting from what you might need: You have already done that 😳
  9. I believe the syntax used for public variable is correct, as the suggested steps for that were followed: GlobalVariable = _myLocalVariable; publicVariable "GlobalVariable"; https://community.bistudio.com/wiki/Variables#Global_Scope So the private was called for Global, prior to use the new Global as public, and it ended up like: dommageext = _dommage; // exporting the _private as Global; publicVariable "dommageext" // exporting the Global as finally public; 😉
  10. JCataclisma

    Craters

    I HAVE to test it ASAP 😁 Thank you!
  11. Reckless instant Arma leads to unpredictable instant Karma 😬
  12. THIS MESSAGE HAS BEEN EDITED, and its more complete version can be found in next ones. Probably the most efficient idea would be adding an eventHandler - GetIn to every vehicle you don't want to be used by players. Please note that the code below will probably NOT WORK as it is. I haven't tested it, just somehow adapted from another one I use. But my bet is that this would be a nice approach: _this addEventHandler ["getIn", { params ["_vehicle", "_role", "_unit", "_turret"]; _vehicle = _this # 0; if ((_role == "driver") and (_unit isKindOf 'SoldierWB')) then { _unit action ["eject", _vehicle]; hint "You should not use enemy vehicles"; } }]; But there would be an even more efficient solution, which could be to add an array of forbidden vehicles AND an eventHandler to the init.sqs file as well, so it would act the same forced eject code upon every vehicle you chose, during the whole mission. And this syntax might NOT prevent a player to enter as passenger or whatever and change seats for driver. So to avoid that there is another eventHandler, or you could just remove the "_role == "driver" parameter, so it would act upon everyone entering vehicle.
  13. JCataclisma

    Dead trigger on radio activation

    But I feel compelled to make an observation: it would be MUCH more fun whether you spend a little more time to create something like in this Gunther's video 😁 :
  14. JCataclisma

    Dead trigger on radio activation

    Unfortunately I cannot run the game to test it this weekend, but I think you can put something like the code bellow in an object or trigger where you want the action. So it will search for all "men" in a 25 meter radius and instantly set their damage to the maximum = 1. The only way I could test - and it worked in editor, at least: Name your trigger - in my case, "trap". Then place this on its activation: _nearbyTargets = nearestObjects [trap, ["Man"], 25]; { _x setDamage 1; } forEach _nearbyTargets; So it will search for all "man" units in a 25 meter radius and instantly set their damage to the maximum = 1. Providing one of the tips from wiki, it will not affect mounted men, only the units on foot. Cannot test right now how would a dedicated server deal with the "trap" name, but it would probably be better to create such trigger using scripts, and giving it a name like "_trap" instead. That the main reason for I have used all those lines, which are probably beyond the necessary for a simple trigger placed in editor. https://community.bistudio.com/wiki/nearestObjects
  15. Would it be too much work if you create a new mission from scratch, but trying to replicate the same steps/objectives in a much smaller scale - best if using the same types of units -, while copying ALL the external files EXCEPT the mission.sqm itself? That at least could help you rule out whether the issue inhabits some of the scripts or the mission objects themselves. 🧐
  16. Try and take a look at this little collection. I believe it might help you achieve the changes you want. https://steamcommunity.com/workshop/filedetails/?id=643080051
  17. By the way, maybe if your let aside (for now) the visual effect as your main goal here, you could also have an effective destruction by creating the real exploding bombs already in a predefined position (based on caller's position). If that helps you with more crazy ideas to pollute your mind 😁, here are some topics: 1.) In this one, PierreMGI gives the recipe for a destructive thunderbolt: And I have add a turbo on it with things like this: 2.) In this video, Gunther's shown how to create a triggered hidden bomb/explosion: 3.) and a nice concept of a detonating "cord" 😎
  18. Oh, I wasn't aware of that. Such a pity. Well, at least you have a somehow working option for now. But there must be a way to make it perform just like you want: I have recently read a post which the guy was able to to some kind of bullet-cam - so technically it would be the same effect that you need, but as he attached a camera upon a very fast bullet, you will attach a bomb into other very fast projectile. 🤔
  19. Maybe give it another try? _sphere = "AT_Mine_155mm_AMOS_range" createVehicle [0, 0, 0]; _sphere attachTo [_projectile, [0,40,30], "usti", true]; // usti means muzzle [_sphere, [0,90,0]] call BIS_fnc_setObjectRotation; //yaw, pitch, roll; _sphere enableSimulation true;
  20. Now that I have noticed: instead of creating objects in a specific position, create them at [0,0,0] and then in the following command line, use "attachTo" upon them to the position you want - this was one of the best tips I found here in forums and always works great for me.. I´m quite sure it will make things work better for your 😉 Also, as you are trying to attache them to a memory point, try also enable "bone rotation", so that they will be forced to follow the projectile movements - although I have never done that with projectiles, but works great when attached to tank's turrets, muzzles and even when I attached portable lamps at player's hands 😄
  21. I cannot think of why the fnc_rotations doesn't work for you. Did you get any error messages, or it just didn't do anything at all? Because it's working fine in both editor and dedicated MP for us. If you take a look at the videos, the red-and-white towbars are created by script (createVehicle at position 0,0,0), attached and rotated with such BIS function. Towbars attached under the Huron: And here, towbars attached to the red container
  22. Also, maybe this one helps you to improve (or not!) the positioning AND speed of released bombs. This is what I use for a "Launch flares" action from my helicopters: flareN = "F_20mm_Green" createvehicle ((player) ModelToWorld [0,50,150]); flareN setVelocity [0,25,-5]; flareNE = "F_20mm_Yellow" createvehicle ((player) ModelToWorld [15,25,150]); flareNE setVelocity [5,15,-15]; flareE = "F_20mm_Red" createvehicle ((player) ModelToWorld [15,0,150]); flareE setVelocity [10,25,-5]; flareSE = "F_20mm_Yellow" createvehicle ((player) ModelToWorld [15,-25,150]); flareSE setVelocity [-5,-15,-15]; flareS = "F_20mm_Green" createvehicle ((player) ModelToWorld [0,-50,150]); flareS setVelocity [0,-25,-5]; flareSW = "F_20mm_Yellow" createvehicle ((player) ModelToWorld [-15,-25,150]); flareSW setVelocity [-5,-15,-15]; flareW = "F_20mm_Red" createvehicle ((player) ModelToWorld [-15,0,150]); flareW setVelocity [-10,25,-5]; flareNW = "F_20mm_Yellow" createvehicle ((player) ModelToWorld [-15,25,150]); flareNW setVelocity [-5,15,-15];
  23. Regarding "rotation" and stuff related with createVehicle + attachTo, I have been pretty happy lately by using BIS_fnc_setObjectRotation . It has been the most effective way to mix pitch, yaw and roll for attached objects for me. https://community.bistudio.com/wiki/BIS_fnc_setObjectRotation Let's say, for creating an inner night-light for a helicopter: _objLowLight1 = createVehicle ["reflector_cone_01_narrow_red_f",[0,0,0], [], 0, "NONE"]; _objLowLight1 attachTo [_currentVehicle, [0, -1.2, 1.1]]; [_objLowLight1, [0,-65,180]] call BIS_fnc_setObjectRotation; Maybe you could try: [_sphere, [0,-90,0]] call BIS_fnc_setObjectRotation;
  24. Other way to get available animations for most objects, is to add it on editor, then right-click and select "View in Config File". In the new full-screen window that will open, at the left you can double-click on the highlighted name of the current object, and then double-click again on the "Animations" sub-menu. Usually it will also show the statement/required command to work, as sometimes it's going to need a different approach then "animate" - vehicles doors for instance, sometimes they use "animateSource", other times need "animateDoor". Still regarding vehicle doors, usually the ones which use "animateDoor" will allow you to specify how much open/close you want. Let's say you try it on the Taru Medical Pod, it uses different commands for the ramp and the door, like: _x animateDoor ["Door_6_source", 1]; // the rear ramp can only be full open or closed; _x animateSource ["Door_4_source", 0.85]; // the side door can be open as much as you want (0 is closed, 1 is open); Also, as you might have seen on Wiki, it's recommended to use a newer version called "animateSource", instead of "animate". So if your commands don't work, that might be the reason why. https://community.bistudio.com/wiki/animate
  25. JCataclisma

    Alleged"s/Bailing_outs finds and stuff

    "this" for testing in editor, but change for "_this" in MP. If you're going to test with eventHandlers, you can even use other stuff, regarding the params, like eventually "_this # 0" for the caller, "_this # 2" for the target unite, and so on - it will change providing the chosen EH, of course.
×