Jump to content

Squirtman

Member
  • Content Count

    36
  • Joined

  • Last visited

  • Medals

Everything posted by Squirtman

  1. So i have 2 questions for the community First I am working a custom mission and am trying to implement an objective to defend an obj in the world from attacking enemy forces (destroy waypoint) and was wondering if there is a way to make an object actually take damage from small arms fire. as it stands i am using the power generator (land_powergenerator_F) as the object that has to be protected however no firearms short of a 9.5mm sniper rifle will actually do any damage to the object. I have a handledamage event handler on the object that for now shows the amount of damage done each time the event handler is called. I remember reading somewhere in the research i have done working on other parts of this project that it was possible to allow vehicles to take damage from small arms fire however i have been unable to find that source again and don't remember how i stumbled across it in the first place. Second i was wondering if anyone could explain what the armorypoints value in [USERNAME].ArmaXProfile is used for as the wiki doesn't. see https://community.bistudio.com/wiki/armoryPoints if you are confused about what i am talking about. I thank you in advance for any assitance you would willing to provide
  2. Thanks pierre i'll check it out when i get back to work on it @AZCoder it's not an indestructible object or at least not when damage is enabled it just has armor that negates all damage from smaller caliber ammo the same way some of the vehicles do.
  3. should be [] execvm "yourscript.sqf"; in your code you are telling it to set execvm to "recompensa2.sqf" but since execvm isn't a variable this is not possible. That should fix your problem with your script not running
  4. With the code below you are able to create an array with all the magazines that can be used in a weapon. What i would like to know is there some way to do the same thing with attachments/accessories. I've looked at several weapons in the config viewer but i haven't been able to tell what determines what controls what attachments are allowed. Thank you in advance for your time and any assistance you can provide. _weap = selectrandom ["hgun_Pistol_heavy_01_F", "hgun_ACPC2_F","hgun_P07_F"]; _mags = (getArray(configFile >> 'CfgWeapons' >> _weap >> 'magazines'));
  5. It should be possible to replace the model of a pair of sunglasses check out https://community.bistudio.com/wiki/ArmA_3_Replacement_Config_Tutorial it may not be the most clear or complete way to do it but it should at least provide you a starting point on how to do it.
  6. well excuse me for trying to help. As i said in my post before that one i never tested my first solution so i didn't know if it would work. And no I don't know every little intricacy about armas scripting language. As far as my "weird" half a code it was merely meant to be an example of a way i did know for sure would work sorry it wasn't the most efficient method and up to your standards of excellence.
  7. Squirtman

    Need help with Trigger

    Here is another method of accomplishing this without using the "time" command and thereby avoiding any bugs it carries with it. Timer starts on server launch place an object somewhere in the world (doesn't matter what it is) give it a variable name(in this example "timer" without quotes) uncheck enable damage under object:special states to prevent it being destroyed by accident uncheck show model if you don't want it to be visible but that is optional place an empty marker where you want your trigger to be and give it a name (in this example "triggerlocation" without quotes) put whatever code you want the trigger to execute into a script (in this example "script.sqf") place a trigger somewhere in the world. type = none, activation = none, check server only to prevent it possibly executing multiple times in the condition field put "alive timer"(no quotes) in the activation field place the code located below in the trigger timer section select timeout and enter the delay time you want in seconds in the min, mid, max boxes to start the timer when at least one player is present do the same as above starting on step 5 an put "count allplayers > 0"(no quotes) in the condition field of the trigger if (isServer) then { _trig1 = createTrigger["EmptyDetector", getmarkerpos "triggerlocation"]; //creates a trigger at marker triggerlocation _trig1 setTriggerArea [10,10,-1,false]; //[x radius, y radius, z height, is rectangle] _trig1 setTriggerActivation ["WEST", "PRESENT", false]; //[by, type, repeating] check link below for more information _trig1 setTriggerStatements ["this", "execvm 'script.sqf'", "this"]; //[condition, activation, deactivation] all must have something in them }; when the mission has been loaded for the amount of time you set in step 10 it will create a trigger that is activated upon BLUFOR present I would recommend checking command list for the syntax of the commands in the code should you want to change anything about the trigger being created
  8. I'm working on a project that i want to have cup weapons in but i don't want to use the default weapon firing sounds. I would like to replace them with my own sound files however i can not find any good information on how to do this. everything i have found has either been incomplete or so incomprehensible that it is useless. Not to mention every different "tutorial" or "guide" contains conflicting information to the previous one i found. Can anyone that knows how to do this possibly explain it please. Sample code would be appreciated as well. Thanks in advance for your assistance
  9. try enclosing each getmarkerpos in parentheses () or brackets [] _town = [(getMarkerPos "town_1"),(getMarkerPos "town_2"),(getMarkerPos "town_3"),etc. I don't know what i was thinking earlier it should have been like that to begin with. If that doesn't work then you may have to use a random/if statements combination _num = floor(random x); if (_num==0) then { _town = getmarkerpos town_y }; if (_num==1) then { _town = getmarkerpos town_y }; if (_num==2) then { _town = getmarkerpos town_y }; where x = number of markers and y = marker number see getmarkerpos and Random for reference. I know the second method will work as i have used it for similar purposes but with the number of markers you have it's going to mean a good bit of copy paste and change numbers.
  10. I believe your problem is that _town is a variable and not a marker name so getmarkerpos can't actually get a location from it. try using private ["_telep"]; _town = [getMarkerPos "town_1",getMarkerPos "town_2",getMarkerPos "town_3",getMarkerPos "town_4",getMarkerPos "town_5",getMarkerPos "town_6",getMarkerPos "town_7",getMarkerPos "town_8",getMarkerPos "town_9",getMarkerPos "town_10",getMarkerPos "town_11",getMarkerPos "town_12",getMarkerPos "town_13",getMarkerPos "town_14",getMarkerPos "town_15",getMarkerPos "town_16",getMarkerPos "town_17",getMarkerPos "town_18",getMarkerPos "town_19",getMarkerPos "town_20",getMarkerPos "town_21",getMarkerPos "town_22",getMarkerPos "town_23",getMarkerPos "town_24",getMarkerPos "town_25",getMarkerPos "town_26",getMarkerPos "town_27",getMarkerPos "town_28",getMarkerPos "town_29",getMarkerPos "town_30",getMarkerPos "town_31"] call BIS_fnc_selectRandom; _Blu_Base = ["Task",_town,0,0,true,true] call LARs_fnc_spawnComp; I haven't tested this so i don't know if it will work but i believe it will
  11. Squirtman

    Help changing weapon sounds

    I know I have to create a mod to do it i just don't know how to code the config.cpp to get it to replace the sounds short of creating a completely new weapon that uses the existing model.
  12. I'm working on a project that i want to have cup weapons in but i don't want to use the default weapon firing sounds. I would like to replace them with my own sound files however i can not find any good information on how to do this. everything i have found has either been incomplete or so incomprehensible that it is useless. Not to mention every different "tutorial" or "guide" contains conflicting information to the previous one i found. Can anyone that knows how to do this possibly explain it please. Sample code would be appreciated as well. Thanks in advance for your assistance
  13. I'm working on a project and one of the things I want to implement is removing the ability to change the attachments that are on a weapon. For instance if you pick up an MX that has an ACO and a flashlight and then pickup an MX that has a suppressor I don't want players to be able to take the suppressor off the second one and transfer it to the first one. Does anyone know if this is possible and if it is could you provide an example of how it is done or at least point towards the information I need to make this work. If this is not possible is there at least a way to limit what attachments can go on what weapons. I realize this sounds like a step backwards and in all honesty it is but for what i have in mind certain weapon/attachment combinations would break the balance i am trying to achieve. Thank you in advance for any assistance anyone is willing to provide.
  14. thanks i'll play with it and see what i can figure out
  15. _num = floor(random 3); if (_num==0) then { //spawn composition1 }; if (_num==1) then { //spawn composition2 }; if (_num==2) then { //spawn composition3 }; this is the method i use for selecting code blocks at random i would recommend reading the wiki entry on random located at https://community.bistudio.com/wiki/random to understand the different types of output random can have. for instance in this instance floor(random 3) has an equal chance to output a number between 0 and 2. for what you want to do you would use random 5 and then if statements for 0-4
  16. Squirtman

    Paradropping Vehicles

    Cool. Thank you.
  17. Squirtman

    Paradropping Vehicles

    ??? please explain
  18. Squirtman

    Custom Ammo Box

    the only real limit i have encountered to adding items to a player using virtual arsenal is the storage space of your uniform/vest/backpack. Once you have reached the storage limit of the inventory you are trying to add items to the virtual arsenal will no longer allow you to continue adding items. To the best of my knowledge it is not possible to add items to a player that would exceed the storage limit of said players inventories, at least not without a mod that remove storage limits. However i have no idea if a mod such as this even exists. When using scripts to add items to a player the script will add items one at a time to the desired inventory however if the inventory doesn't have enough free space the command to add the item to the inventory will silently fail(the item won't be added but you will also not receive errors or crashes,at least most of the time) and if i completely misunderstood your question i apologize. hope this helps.
  19. Squirtman

    IF STATEMENT HELP

    Empty else statements are actually a good coding practice. I have run into a couple of obscure coding languages(please don't ask what they were, it's been so long since I have worked with them i don't remember) that freak out if you don't have an actual else statement included.
  20. Squirtman

    Paradropping Vehicles

    I don't like using the support module for certain situations because it is dependent on you placing a vehicle in the world from the start and if that vehicle happens to be destroyed you can no longer call for support unless they have changed it recently. But that is also a valid method of doing the same thing
  21. Squirtman

    Paradropping Vehicles

    most likely you will need the files that contain that function as it is not in base game. Another method of doing this is to use create vehicle to create an airdrop parachute and then attach the tank to the parachute. I created a script that drops an equipment case in this manner when an aircraft i created reaches a certain waypoint. this is a simple example of how to create a tank and attach it to a parachute so it actually airdrops in. _chute = createvehicle ["i_parachute_02_f", [3723,4156,150],[],0,"can_collide"]; _tank = createVehicle ["rhs_bmd2", [4863.116,9891.143,150],[],0,"can_collide"]; _tank attachto [_chute,[0,0,2]]; one thing to be aware of when using this method is that the airdrop will continue to fall until the chutes 0,0,0 point reaches ground level causing the item attached to it to sink through the terrain until the chutes 0,0,0 point reaches the ground and is deleted. Once the chute deleted items that have sunk through the terrain will spring back up to ground level. If the item is too far below terrain level it will spring back up with incredible force. This is why the tank is attached at 0,0,2 and not 0,0,0. I have tested this code and it does work although you may want to play with the point at which the tank is attached to the chute to get it to be exactly where you want it. With this method you cannot set the tanks direction however a solution to this would be to spawn the tank somewhere in the world set the tanks direction spawn the chute where you want it setposatl the tank to the chutes location attach the tank to the chute ??????? profit If you would like copies of the scripts I wrote for the full airdrop sequence I created PM me. Hope this helps
  22. set the pilot of the helicopter to captive using setcaptive https://community.bistudio.com/wiki/setCaptive
  23. Squirtman

    Ravage

    I reported this the day of the jets release and recieved a message back that they confirmed the problem. I do not have any information as to when it will be fixed but it has been brought to their attention. @haleks thanks for the info on the horde modules. I didn't try this because you have it listed as disabled in the original post and on armaholic, at least the last time i looked.
  24. Squirtman

    Ravage

    Yeah i'm running CBA. my problem isn't that enemies aren't spawning at all it's that nothing spawns in the hills where there are no buildings which is most of stratis.
×