Jump to content

Photo
- - - - -

Altitude related user action issue


  • Please log in to reply
7 replies to this topic

#1 NZDF CRASH

NZDF CRASH

    Gunnery Sergeant

  • Members
  • 543 posts

Posted 03 April 2012 - 07:39 AM

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.

Edited by NZDF CRASH, 03 April 2012 - 07:47 AM.

Posted Image
Free your mind and your ass will follow
Acies Project Full Conversion
BWI Addons

#2 Max Power

Max Power

    Mr. Angry Face

  • Members
  • 12828 posts

Posted 03 April 2012 - 07:45 AM

scripts for user actions and such are found in the config.cpp
Posted Image
Posted Image
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 NZDF CRASH

NZDF CRASH

    Gunnery Sergeant

  • Members
  • 543 posts

Posted 03 April 2012 - 07:48 AM

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 FPDR

Edited by NZDF CRASH, 03 April 2012 - 07:51 AM.
sleep deprivation

Posted Image
Free your mind and your ass will follow
Acies Project Full Conversion
BWI Addons

#4 Max Power

Max Power

    Mr. Angry Face

  • Members
  • 12828 posts

Posted 03 April 2012 - 07:54 AM

&&(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.

Edited by Max Power, 03 April 2012 - 08:19 AM.

Posted Image
Posted Image
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.

#5 NZDF CRASH

NZDF CRASH

    Gunnery Sergeant

  • Members
  • 543 posts

Posted 03 April 2012 - 09:57 AM

I've tinkered abit with it since yet once i reach 20 + altitude I loose the user option for the Ramp.

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;

Posted Image
Free your mind and your ass will follow
Acies Project Full Conversion
BWI Addons

#6 Max Power

Max Power

    Mr. Angry Face

  • Members
  • 12828 posts

Posted 03 April 2012 - 07:57 PM

What I was getting at is, if you remove &&(getPos this) select 2 < 10; then you won't have the altitude condition anymore. :P
Posted Image
Posted Image
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.

#7 NZDF CRASH

NZDF CRASH

    Gunnery Sergeant

  • Members
  • 543 posts

Posted 03 April 2012 - 09:10 PM

Thanks Max will blame not getting it first time round on lack of sleep :)
Posted Image
Free your mind and your ass will follow
Acies Project Full Conversion
BWI Addons

#8 Sealife

Sealife

    Banned

  • Banned
  • 1362 posts

Posted 04 April 2012 - 11:29 AM

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 :).