Results 1 to 8 of 8

Thread: Altitude related user action issue

  1. #1
    Gunnery Sergeant NZDF CRASH's Avatar
    Join Date
    May 15 2008
    Location
    Floating between Vietnam-Cambodia-Indonesia-Singapore-Japan
    Posts
    514

    Altitude related user action issue

    Hi once again...
    I have come across yet another issue with a C-27 I am working on where the Lower/Raise Ramp User Action seems to be linked to roughly 20 altitude and once that altitude has been surpassed the user actions vanish. Have tried using proven code from a working ramp on one of the older hercs i have in my possession to no avail and am hoping someone will have a quick solution to this issue.

    CfgSkeleton if its of any use...
    Spoiler:


    CfgModels if of any use...
    Spoiler:


    Oh and before i forget the user action

    Spoiler:


    Thanks in advance for looking this through, hopefully its a simple solution to a somewhat irritating issue. Also this may need to be moved depending what the issue actually is not sure if model or config as of this moment.
    Last edited by NZDF CRASH; Apr 3 2012 at 07:47.

    Free your mind and your ass will follow
    Acies Project Full Conversion
    Anzac Mod MkII
    BWI Addons

  2. #2
    scripts for user actions and such are found in the config.cpp


    My inbox is fill and won't be emptied. If your PM is regarding requests to use my work, unfortunately I choose not to grant such permission. My work is for use with CWR2 only.

  3. #3
    Gunnery Sergeant NZDF CRASH's Avatar
    Join Date
    May 15 2008
    Location
    Floating between Vietnam-Cambodia-Indonesia-Singapore-Japan
    Posts
    514
    Author of the Thread
    Yep just added to the first post, forgot to add the code in the post as its a key component of the question funnily enough lol
    Last edited by NZDF CRASH; Apr 3 2012 at 07:51. Reason: sleep deprivation

  4. #4
    &&(getPos this) select 2 < 10
    This condition is getting the x,y,z position array of the unit, and if the z component (the last out of three positions in the array: 0,1,2) and if it is less than 10, and the other condition is satisfied, you can open the ramp.

    Moving to configs & scripting.
    Last edited by Max Power; Apr 3 2012 at 08:19.

  5. #5
    Gunnery Sergeant NZDF CRASH's Avatar
    Join Date
    May 15 2008
    Location
    Floating between Vietnam-Cambodia-Indonesia-Singapore-Japan
    Posts
    514
    Author of the Thread
    I've tinkered abit with it since yet once i reach 20 + altitude I loose the user option for the Ramp.

    Code:
    			class OpenDoor
    			{
    				displayName="Open Ramp";
    				position="pilotcontrol";
    				radius=10;
    				condition="this animationPhase ""BackDoor_1"" < 0.4&&(getPos this) select 2 < 10;";
    				statement="this animate [""BackDoor_1"", 1];this animate [""BackDoor_2"", 1]";
    				onlyforplayer = true;
    			};
    			class CloseDoor
    			{
    				displayName="Close Ramp";
    				position="pilotcontrol";
    				radius=10;
    				condition="this animationPhase ""BackDoor_1"" >= 0.40";
    				statement="this animate [""BackDoor_1"", 0];this animate [""BackDoor_2"", 0]";
    				onlyforplayer = true;

  6. #6
    What I was getting at is, if you remove &&(getPos this) select 2 < 10; then you won't have the altitude condition anymore.

  7. #7
    Gunnery Sergeant NZDF CRASH's Avatar
    Join Date
    May 15 2008
    Location
    Floating between Vietnam-Cambodia-Indonesia-Singapore-Japan
    Posts
    514
    Author of the Thread
    Thanks Max will blame not getting it first time round on lack of sleep

  8. #8
    If you have Roadway lod on ramp IIRC it can give false altitude reading in aircraft as the roadway is always 0 altitude .

    solution was to use hide animation so roadway Lod ( simply name the whole roadway LOD and add hide animation in model.cfg and hide using your useraction in cpp) is Hidden when Ramp is in up position and un hide when in down position .

    I havent used Amra2 for sometime maybe this is not case anymore but i put here for your reference and hope it help but not confuse .

Similar Threads

  1. Req: Help with basic editor / maybe issue - getin related
    By MPBR in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 3
    Last Post: Jul 9 2009, 06:22
  2. Hosting/Server related issue
    By Rambo-16AAB in forum ARMA - TROUBLESHOOTING
    Replies: 2
    Last Post: Feb 25 2007, 14:06
  3. Detecting unit who activated a User Action
    By Combat-Agent in forum OFP : CONFIGS & SCRIPTING
    Replies: 8
    Last Post: Jan 1 2006, 22:41
  4. User Action Sub Menus
    By RKSL-Rock in forum OFP : CONFIGS & SCRIPTING
    Replies: 2
    Last Post: Sep 6 2005, 15:14
  5. Kls user action utility (script)
    By TakanoFukada in forum ADDONS & MODS: COMPLETE
    Replies: 5
    Last Post: Sep 21 2004, 12:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •