Jump to content

UNN

Member
  • Content Count

    1767
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by UNN

  1. UNN

    Xam 1.4 video

    I'm ashamed to say...So called British culture has helped to perpetuate such lies since 1914: Entente Powers     Population Millions     Military Deaths    Civilian Deaths     Total Deaths     Military Wounded France           39.6               1,397,800       300,000         1,697,800       4,266,000 United Kingdom     45.4               885,138        109,000         994,138        1,663,435 It really annoys me to think the price France paid during WWI has been igonored ever since
  2. Hi, You will have to excuse my ignorance, but what sort of a weapon is involved with a Minimi Para addon. Is it an infantry weapon or a vehicle mounted weapon? If it's vehicle mounted, then the thread you linked to should cover what you need. If it's an infantry weapon, then things are a different. Which was why I got a little confused, in that previous thread. For infantry weapons I used this model.cfg with the BI M16 sample model. In this case I call the weapons class name, BIM16: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgSkeletons     {     class BIM16_Bones         {         isDiscrete = 0;         skeletonInherit = "";         skeletonBones[]=             {             "revolve_sel",""             };         };     }; class CfgModels     {     class BIM16         {         skeletonName="BIM16_Bones";         sectionsInherit="";         sections[]={""};         class Animations             {             class MyRevolving                 {                 type="rotationx";                 source="revolving";                 selection="revolve_sel";                 axis="bolt_axis";                 memory="true";                 animPeriod=0;                 angle0=0;                 angle1="rad -360";                 };             };         };     }; This was only a quick test I knocked up a while back. You will have to configure angle0 and angle1 to correspond with the ammo count, to get the correct rotations. But thats covered in the previous thread.
  3. UNN

    Preload a scene

    If either of you can confirm it, one way or another. Then please let us know.
  4. UNN

    Antonov-An124

    Well could you kindly post his response? AFAIK [MAKO]Hybrid made the original post. But I can't see his reply in this thread since my last post on the 02 2007,20:35. Again this is not about satisfying your own curiosity, it's about posting news for the community.
  5. Actually it's the opposite. You two rotten apples only make us appreciate the genuine people here, all the more.
  6. UNN

    Antonov-An124

    I'm not sure where you get the idea I was complaining. If you could directly quote the English that made you come to that decision, it might help your complaint. As far as I was concerned, I made what I thought was reasonable suggestion? I would have thought the forum was here for everyone, not just your curiosity? Personal question should be sent via personal messages. Despite the fact you have appointed yourself the spokesman for an addon maker, you have yet to post any useful news, relating to this addon. Or should I assume he is ignoring you’re request, so you feel the need to take it out on him in public?
  7. UNN

    Preload a scene

    I haven't tested this, so shoot me if I'm wrong Looking at your original code. I thought it might be better if you called the preload command after you commited the camera changes rather than before. Have you tried? <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_camera camCommitPrepared 0 @camCommitted _camera _camera camPreload 1 @camPreloaded _camera Worth a try I suppose.
  8. UNN

    Still no SLi Support 4 ArmA?

    Well I'm running: Asus A8N32-SLI Deluxe AMD Athlon 64 X2 4600 2 x Asus Nvidia 7600GT 256MB DDR3 PCI-E 2 x Seagate ST3250620AS 250GB SATAII/300 7200RPM 16MB Cache Corsair Memory TWINX2048 - 3200C2PT XMS3200 2x1GB 2x184DIMM CAS2 Win XP 64bit Sorry, I did not make my original point very clear at all. What I was thinking when I posted was. I don't think there is a problem with SLI across the board. Looking at all the people who are having problems with their GPU's. It could be a combination of Arma, the 8000 series and or the operating system? Apparently my motherboard will not support the 8800 under SLI. For me SLI either worked or it didn't. When it works I get around a 30% increase in FPS and the SLI load graph can be displayed. When it doesn't work, there are no crashes or glitches. Just slower FPS and the SLI load graph won't show up. It was just a case of using Alternate Rendering Mode 1 and deselecting VSynch, to get SLI working. I get those sort of messages be default in my Arma.rpt. I don't think it's related to your problems. I think it's just the game log. I can't comment on Crossfire, so I'm not exactly sure what you mean? Red Orchestra is the only other game I run and that worked ok with SLI. But I'm sure that’s down to the SLI drivers being included with the Nvidia drivers. AFAIK games don't have to add support for SLI? But I guess they could some how prevent SLI from working, if they do something that’s non-standard. For example OFP will not see any benefit at all from SLI, even though it looks like it's working.
  9. UNN

    Ship turret

    I got the same sort of error when I removed just the animations from model.cfg. That’s why I posted just the animations, as an example and not the bone definitions. I noticed in the example of cfgModels Mondkalb posted, there is no section for cfgSkeletons? To be honest, I found inheriting bones from the existing classes to be a bit fickle, it may not even work at all? When I wrote some configs to get the BI sample models into the game, as individual pbo's. I decided to define them all myself from scratch.
  10. UNN

    Antonov-An124

    In that case you can post his responce on the forum. I take it your suggesting it's ok to drag up every dead thread on the forums then? I wonder how many there are?
  11. One thing I noticed, is this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">skeletonBones[]= Â Â Â { Â Â Â "doorL,doorR","", Â Â Â Â Â }; It should be: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">skeletonBones[]= Â Â Â { Â Â Â "doorL","", Â Â Â Â "doorR","" Â Â Â }; Each bone is defined in pairs. The current bone and the bone it's attached to. In this case, neither bone is attached to another, so the are both left empty.
  12. UNN

    Still no SLi Support 4 ArmA?

    I've been running Arma in SLI mode from day one (well almost) without any problems. Although I'm using two 7600's.
  13. UNN

    Antonov-An124

    It might be better to PM whoever is resposible for the Addon, rather than bumping someone elses active thread, off the front page? Yeah, also the way Arma draws objects and transparent textures, when viewing them inside a walkable cargo space.
  14. UNN

    Ship turret

    In your p3d make sure you have selections named "MainTurret" and "MainGun" and the selection names assigned for your axis. In this case, for the axis I used "MainTurret axis" and "MainGun axis". In your model.cfg, make sure you have animations defined and named as "mainTurret" and "mainGun": <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class mainTurret     {     type = "rotationY";     source = "mainTurret";     selection = "mainTurret";     axis = "mainTurret axis";     animPeriod = 0;     memory = 1;     minValue = "rad -360";     maxValue = "rad +360";     angle0 = "rad -360";     angle1 = "rad +360";     }; class mainGun     {     type = "rotationX";     source = "mainGun";     selection = "mainGun";     axis = "mainGun axis";     animPeriod = 0;     memory = 1;     minValue = "rad -360";     maxValue = "rad +360";     angle0 = "rad -360";     angle1 = "rad +360";     }; In your config, for the turret, make sure you have "MainTurret" and "MainGun" assigned to: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">body="mainTurret"; gun="mainGun"; animationSourceBody="mainTurret"; animationSOurceGun="mainGun"; If you have all of these in place, you should not get any error messages in Arma.rpt.
  15. UNN

    MCAR Engine released...

    Actualy Mandalobe just uses stuff that was demonstrated on the OFPEC forums, in OFP, a long time ago. So nothing new there.
  16. Yeah, it would be better if we could do all this within the configs. Plus the light source you get with that command, does not work well over large areas. But something is better than nothing. Glad it came in handy for you, bk.
  17. UNN

    Lets Hear Your Thoughts

    That’s a tough question, which might explain why you've only had one real reply. Each script can vary depending on the situation. Whats efficient practice for one script, may not be the same for another script. Then take the way Arma works in general. One of the traditional concerns in programming was removing duplicate code. If you use the same chunk of code, multiple times, you should really move the code into a global function. That way your scripts become smaller and are easier to maintain. But because of the save game limitations, having to many global functions (i.e variables) can cause problems later on. The same applies to the spawn command, you can pre-compile scripts at the start of the mission to avoid loading them in game. But again this will eat up the space allocated in save game files. Arma's scripts run pretty fast considering. In many cases there is just no need to worry about such things. A lot of stuff I do is done purely out of habit or preference. Take commands like Sin & Cos, in the old days they could eat up a big chunk of the processing cycle, for example: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">WaitUntil     {     _Pos=GetPos _ParentObj;     _X=_Pos Select 0;     _Y=_Pos Select 1;     _Dir=GetDir _ParentObj;     _SinX=Sin _Dir;     _CosY=Cos _Dir;     _PosX=_X+(_SinX*100);     _PosY=_Y+(_CosY*100);     _Obj01 SetPos [_PosX,_POsY];     _PosX=_X+(_SinX*120);     _PosY=_Y+(_CosY*120);     _Obj02 SetPos [_PosX,_POsY];     False     }; You could write the same code like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">WaitUntil     {     _Obj01 SetPos [((GetPos _ParentObj) Select 0)+(Sin (GetDir _ParentObj)*100),((GetPos _ParentObj) Select 1)+(Cos (GetDir _ParentObj)*100)];                 _Obj02 SetPos [((GetPos _ParentObj) Select 0)+(Sin (GetDir _ParentObj)*120),((GetPos _ParentObj) Select 1)+(Cos (GetDir _ParentObj)*120)];                 False     }; I personally prefer the first example, as your not making multiple calls to GetPos and GetDir, when you don't need to. Also it appears to reduce the amount of calls to the select command to. But I would be hard pressed to see the difference in performance in game, between both these scripts. But on the other hand, the first example creates eight local variables. For all I know about the internal workings of the Arma script engine, managing those eight extra variables in the first script, could be more processor intensive then the second script? So you can see how difficult it is to give advice based on something other than personnel preference. Another thing I noticed in OFP (not got round to testing it in Arma) was the way multiple conditions are handled. For example: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">WaitUntil     {     If ((Alive _MyCar) And ((_MyCar Distance _MyWaypoint)<10) And !(IsNull (NearestObject [_MyCar,"SoldierWB"]))) Then         {         .......         };     False     }; In OFP, if the vehicle was destroyed, so the test to see if it was alive returned false. It would still check the conditions that follow after, even though the first condition failed. Because one of the conditions uses the NearestObject command, that could be quite bad. So in the above example, it should be better to do it this way: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">WaitUntil     {     If (Alive _MyCar) Then         {         If ((_MyCar Distance _MyWaypoint)<10) Then             {             If !(IsNull (NearestObject [_MyCar,"SoldierWB"])) Then                 {                 ......                 };             };         };     False     }; Now the script will ignore the rest of the conditions, if the first If condition fails. So considering all of the above, the only general advice I can think of would be: Identify the commands that can visible slow the game down, and take care where and how you use them. Think twice about any command you place within a loop, that has little or no delay. Consider if it really needs to be contained within that loop. There are other issues regarding the inner workings of the Arma script engine, for example variable name length. Long or short, does it matter as far as processing time goes? But we could speculate over these forever, so go with personnel preference. If in doubt, post an example. There will always be plenty of people up for debating the pros and cons, so you probably won't be short of opinions
  18. UNN

    Lets Hear Your Thoughts

    Hmm..something went a bit wrong in this post.
  19. If you can imagine morphing from a high jumping stick insect into an arm wrestling octopus, then you might come close to what you want As compelling as it is, to recreate some naff 80's tv series, you have to cut BIS some slack?
  20. It's defined in Bin.pbo under class AllVehicles. But I've only seen it used in buildings.pbo, so you might be right about it only applying to a certain class? It is possible to do the same thing with a script, using the lightAttachObject command. <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; _light = "#lightpoint" createVehicleLocal [0,0,0]; _light lightAttachObject [_Vehicle,_Vehicle selectionPosition "L svetlo"]; _light setLightAmbient[0.0, 1.0, 0.0]; _light setLightColor[0.0, 1.0, 0.0]; WaitUntil     {     _light setLightBrightness 1.0;     Sleep 1;     _light setLightBrightness 0;     Sleep 1;     !(Alive _Vehicle)     }; lightDetachObject _light; DeleteVehicle _Light;
  21. You can't execute scripts from a weapon that way. Normally you would use a fired event handler, but that won't work either, with the default car horn. You might be able to re-configure your own car horn to work with the event handler, but I've never tried it. So unless someone else can help, you may be out of luck? Have you defined the variable true, in your config? <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#define true 1; If not, try this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> blinking = 1;
  22. UNN

    Animations

    Thanks Rastavovich, I think I used the wrong Min and Max values when I tested it.
  23. Animations Turret Direction: Hi, This is actually a response to a question posted on the wiki, but I thought I would post the reply here because it might be of interest to others, plus the forum is better suited for discussions. Any animation thats defined in a model.cfg file, is now available in game using the command animationPhase. For example to get the direction of the commanders turret for the M1A1 you could run this script: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[MYM1A1] ExecVM "TurretDir.sqf" <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Tank=_This Select 0; WaitUntil     {     _CommandT=Deg (_Tank AnimationPhase "obsturret");     Hint Format ["Local Command Turret Dir %1",_CommandT];     False     }; However, unlike the weaponDirection command, the direction is returned relative to any parent turrets and the vehicles main body. So to get the direction in world space, you would have to modify the above script: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Tank=_This Select 0; WaitUntil     {     _Body=GetDir _Tank;     _MainT=Deg (_Tank AnimationPhase "mainturret");     _CommandT=Deg (_Tank AnimationPhase "obsturret");     Hint Format ["World Command Turret Dir %1",_Body+_MainT+_CommandT];     False     }; The principle should work for any number of turrets you define in model.cfg, and is just one example of how useful the new animation system is in Arma. Many of the defined animations for vehicles can be found in the Models BI made public, but there are still plenty that are not documented. Fortunately the naming convention appears to use the same names as the animation sources, so it didn't take longer to figure out the animations for the M1A1. There are some limits to Arma's animations. One is, you cant seem to define user animations that operate at the same speed as the games animations. Others are not so obvious, like the animations for dampers, only working when the vehicle is moving. Magazine Ammo Count: Here's an example mission showing how you can use an animation phase to calculate the amount of rounds left to fire in a magazine of a Hummers M2 machine gun. It will also work for the grenade launcher. It will work with TOW launcher to, but you need to modify the config. Ammo Count Example The script for the Hummer with an M2 machine gun, looks like this: <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; _MaxRounds=100; WaitUntil     {     _Count=_Vehicle AnimationPhase "ammo_belt_rotation";     If (_Count>=(1/_MaxRounds)) Then         {         _Count=Ceil (_Count*_MaxRounds);         }         Else         {         _Count=0;         };     Hint Format ["Ammo Count is %1",_Count];     False     }; So far I've only tested it with the BI Hummer. If anyone has any other useful tricks with animations, please post them here. Cheers
  24. UNN

    Animations

    Thanks, I will give it a try ASAP. I did notice on some occasions in MP, the anim phase matched ok, after a complete cycle of a WaitUntil loop. But direct sounds like it might result in cleaner code. If you also get the chance, I'm sure some more insight into how; <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">sourceAddress="mirror"; works. Would also be appreciated. Either way, cheers
×