Jump to content

UNN

Member
  • Content Count

    1767
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by UNN

  1. Let's read through this post again.
  2. UNN

    Artillery In Arma 2

    Lol..Yeah, VBS2 is childs play compared to Arma and OFP. Although saying that, as I don't have a copy I can only assume AimPos and FiringSolution will do the job? I think it's more of a reality rather than an excuse. I would be happy with it being included into the engine, if not the mission editor. Lets face it, community made addons just don't get the same amount of stick. Despite the fact it's far easier to write an addon than it is to write a game.
  3. It works for me in Single Player, just tested it: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgPatches     {     class MyHouse         {         units[] = {"MyHouse"};         weapons[] = {""};         requiredVersion = 1.08;         requiredAddons[] = {};         };     }; class Extended_Init_EventHandlers    {    class MyHouse        {        MyHouse="MYVAR=999";        };    class MyHouse1        {        MyHouse="MYVAR1=999";        };    }; class cfgVehicles     {     class House;     class MyHouse : House         {         scope=2;         displayName="My House";         model = "\ca\buildings\Misc\KBud";         animated = 1;         class EventHandlers             {             init = "[_This Select 0,""Extended_Init_EventHandlers""] call compile preprocessFile ""\Extended_EventHandlers\Init.sqf""";             };         };     class MyHouse1 : MyHouse         {         displayName="My House 1";         class EventHandlers             {             init = "[_This Select 0,""Extended_Init_EventHandlers""] call compile preprocessFile ""\Extended_EventHandlers\Init.sqf""";             };         };     }; I do remember hitting some problems with init events, JIP and static objects. But that was over a year ago so I don't know if it's still a problem?
  4. UNN

    Artillery In Arma 2

    Well the commands are already in VBS2 to calculate the trajectory, but that's not even half the problem. As soon as BIS include it in the game, everyone expects it to be easy to use for both the player and the AI, along with all the other extra features listed here. AI FO's being a good example, if anyone has every sat down and tried to work out the logic involved, they will know what I mean. If they manage to include a system that doesn't generate more complaints than compliments from the community, it will be a minor miracle.
  5. That example was for the standard init event. For the Extended Init EventHandlers you would need both: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class Extended_Init_EventHandlers     {     class AAWallObjectLamp         {         AAWallObjectLamp_Init="[(_this select 0),""Auto""] exec ""EditorUpdate_v102\scripts\switchlight.sqs""";         };     }; class cfgVehicles     {     class Static;     class AAStreetObject: Static         {                 scope=protected;         access=ReadAndCreate;         vehicleClass="StreetObjects";         cost=0;         mapSize=1;         destrType=destructno;         model="\ca\rocks\clutter_stone_small";         icon="\ca\data\data\Unknown_object.paa";         accuracy=0.3;     // accuracy needed to recognize type of this target         ladders[]={};         };     class AAWallObjectLamp : AAStreetObject         {                simulation="fire";         effects="AALampLigth";         icon="\EditorUpdate_v102\icons\lightpole.paa";         class EventHandlers             {             init = "[_This Select 0,""Extended_Init_EventHandlers""] call compile preprocessFile ""\Extended_EventHandlers\Init.sqf""";             };         };     };
  6. The init event has to be declared within the EventHandler class in the config: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class AAWallObjectLamp : AAStreetObject     {     simulation="fire";     effects="AALampLigth";     icon="\EditorUpdate_v102\icons\lightpole.paa";     class EventHandlers         {         init = "[(_this select 0),""Auto""] exec ""EditorUpdate_v102\scripts\switchlight.sqs""";         };     };
  7. UNN

    Laser guided bombing changes in 1.14?

    It may have gone unoticed because you don't need to have the Aircraft pointing at the target and you don't need the HUD. How did the green square handle distance from target? If it's was also available for non laser guided bombs then it would be usefull.
  8. That usualy means you don't have enough elements in your array, when using the select command. Add this line to your script to check the passed parameters: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Player SideChat Format ["_This %1",_This]; #Loop You should see an array via the sidechat, containing at least five elements, if all is working well.
  9. I can't remember off hand, I may well have. It's because there is a slight delay when you load and launch a script with ExecVM. With a high muzzle velocity or increased lag, it can sometimes miss the round being fired. I wasn't sure how you wanted to add the event, so I added those for the config.cpp to. Glad to hear you have it working ok now.
  10. Sorry I didn't make myself very clear. You should be ok from either the config event or script event. As long as you call NearestObject as quickly as possible. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">fired="[_This Select 0,NearestObject [_This Select 0,_This Select 4]] ExecVM ""belowScript.sqf"""; Or <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">fired="_This Call UNN_GetRound"; UNN_GetRound.sqf: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">private ["_Vehicle","_Ammo","_Round"]; _vehicle=_This Select 0; _Ammo=_This Select 4; _Round=nearestObject [_Vehicle,_Ammo]; If !(IsNull _Round) Then     {     [_Vehicle,_Round] ExecVM "belowScript.sqf";     };
  11. There is probably too long a delay when called from a script. Either call the nearest object straight from the init field like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">This AddEventHandler ["fired",{Hint Format ["Ammo %1",NearestObject [_This Select 0,_This Select 4]]}] Or call it from a function. If the above works ok for you, you can pass the vehicle and ammo as parameters to your cam script: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">This AddEventHandler ["fired",{[_This Select 0,NearestObject [_This Select 0,_This Select 4]] ExecVM "belowScript.sqf"}] belowScript.sqf: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Vehicle=_This Select 0; _Round=_This Select 1; ...
  12. Yes I think you can. But you would need a script to apply the correct amount of recoil to the gun via an animation source. That’s why I mentioned short bursts, the longer you hold the trigger down, the further the barrel is animated upwards. The only way you can do that, is by using a combination of animations and a looping script.
  13. I'm no expert, but I thought people were trained to fire MG's in short bursts for a number of reasons? One being, the incremental offsetting from the target, caused by recoil is kept to a minimum? I'm sure there are other considerations like temperature e.t.c But I'm just offering a possible solution to the problem being discussed. Not trying to show off my knowledge of WW2 weapons.
  14. All that can be done with Arma's animation system, so it favours short bursts instead of sustained fire. @Rip31st Your PM store is full sent you an email instead.
  15. Yeah, sorry. For some reason I assumed you were talking about reading the animation sources via scripts. Probably because I had tested the rpm sources before without any problems, until I tried to do it through scripts. The BIA RHIB has selections and animations defined for two rpm indicators. But these don't appear to work in game. So there might be a problem with boats?
  16. Hi, You use the animation class name not it's source. Most class Animations names defined under Model.cfg have the same name as the animation sources they use. So it appears as though you can use the list on animation sources mentioned on the wiki. To get the revs, speed, oil temp e.t.c you need to use: IndicatorRPM IndicatorSpeed IndicatorOilTemp Double check your model.cfg to make sure it's using the same names.
  17. UNN

    HMD helicopter HUD

    Hi, I ran into a problem with one of your scripts. The following line of code in actionHUD.sqf: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">nil = [ICE_HeliHUD_Stage] execVM "\ICE_HeliHUD\HeliHUD\HUD.sqf"; The Nil operator is being overwritten with a script pointer. Causing ARMA to throw up an error.
  18. Can you post a link to his thread? Or even better, ask him to PM us if he wants to use our scripts. I for one, do not want to ram my own approach to modding, down someone else’s throat. Putting quality aside for one minute. There has been more than one occasion when we thought our initial plans would be thwarted by an idiosyncrasy of the Arma engine. This was still cropping up 10 months into developing the Cargo system. It's difficult to explain the trepidation when such things happen, after such an amount of personnel and to a certain degree, public investment So it's not always a question of, is it the best it can be. But more, will it do what we originally said it would. Not sure what you mean by this. But again, if you have a genuine application for anything we are working on, then just PM us? For the record, what I don't class as genuine is, someone who cares more about their own forum image, being the first to do XYZ or just being curious.
  19. @Panda[PL] As fascinating as your dictates are, regarding Addon making. I thought this thread was about proxy turrets rather than your personnel vendettas?
  20. Creating proxy turrets has been around since OFP, as a second best work around for certain vehicle classes. MCar was more about adding additional weapon classes to wheeled vehicles, that already have working turrets. The method we adopted for the UAV is based on the proxy turrets I did for CSJ's Armoured Troop Carriers in OFP. It does require multiple objects and scripting, but nothing so demanding that you can't use it to a reasonable extent. MP is the only really issue, if the server starts to desynch then your going to hit problems. But that can be said about any MP mission that starts to desynch, with or without scripted addons. Is it that important? Rip31st is the first person I've seen who appears to be serious about pursuing the concept, rather than just making a casual wish for it. But anyway, the results from the MP tests (they were just scripts to test the concept) we did with the UAV, were better than expected. But there are a few things to take into consideration: - There was no real load on the server. Just two of us testing the addon. - The UAV flies at relatively slow speeds. - It's just a two man vehicle, one pilot and one gunner. - The UAV turret does not fire visible\physical projectiles. The possibility is there, but the limitations are so far unknown. We along with lots of other addon makers, no doubt, have a long list of ideas and projects waiting to be started. Rock already suggest Rip31st PM us regarding these scripts. While it's nice to be able to release addons that are 100% ours, and take whatever credit we deserve. It's not the be all and end all. If someone is genuinely interested in making addons and can benefit from the stuff we are working on. They only have to ask.
  21. What about the selectionPosition command. If the proxies themselves don't return a position. You could add a simple vertex? After that, you just need to adjust for the height of each different proxy object.
  22. Hi, I want to be able to autodetect the Extended Event Handler, rather than adding it as a required addon. So I came up with this: Test_Addon.pbo: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgPatches     {     class Test_Addon         {         units[] = {Test};         weapons[] = {};         requiredVersion = 1.08;         requiredAddons[] = {};         };     }; class Extended_Init_EventHandlers     {     class Test         {         Test_init="[_This Select 0,True] Call Compile PreProcessFile ""\Test_Addon\s\TestInit.sqf""";         };     }; class cfgVehicles     {     class SoldierWB;     class Test : SoldierWB         {         class EventHandlers             {             init="[_This Select 0] Call Compile PreProcessFile ""\Test_Addon\s\TestInit.sqf""";             };         };     }; TestInit.sqf has the following at the start: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">private ["_unit","_sp"]; _Unit=_This Select 0; //If the Extended init event handler addon is installed then use it else continue If ((isClass (configFile >> "Extended_EventHandlers")) And ((Count _This)==1)) ExitWith     {     _sP=[_Unit,"Extended_Init_EventHandlers"] call compile preprocessFile "\Extended_EventHandlers\Init.sqf";     }; I think the only real difference is that class EventHandlers does not inherit from Extended_EventHandlers. Which is fine for me as the rest of the events are assigned using scripts. It seems to work ok, I just wondered if it had the potential to mess up other addons using the handler? Cheers
  23. If you know the display ID, then you can use some simple loops and the FindDisplay commad. Off hand I don't know what the gear display id is, but if we assume it's say 42. Your code might look like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">While {Alive Player} Do     {     WaitUntil {!IsNull (FindDisplay 42)};     Hint "Gear Dialog is open";     WaitUntil {IsNull (FindDisplay 42)};     Hint "Gear Dialog is closed";     }; Look in the configs to get the correct display ID.
  24. @Killswitch Thanks for the quick update. A bit to quick I was going to suggest adding a stringtable entry, with something like this in it: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">STR_XEH_VERSION,"1.8",,,,,,, Just so we can detect the correct version via a script, using Localize. Not a big deal, but if your are happy to inclue it, if and when you do another update. That would be great. Cheers
  25. Lol <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">// If it's a vehicle then start event handlers for the crew. _sim=getText(configFile/"CfgVehicles"/_unitClass/"simulation"); if ({_sim==_x}count["soldier","invisible"]==0) then That looks like a water tight solution. I don't think you can have any other simulations in a vehicles cargo position? Cheers
×