See site in english Voir le site en francais
Website skin:
home  download  forum  link  contact

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Author Topic: setting breathable area in a dll  (Read 2005 times)

0 Members and 1 Guest are viewing this topic.

Offline dgatsoulis

  • Jr. Member
  • **
  • Posts: 32
  • Karma: 15
09 September 2012, 02:31:49
I've been trying to create UCGO base modules that inflate via animation.  
In order to do that, I use the ucSpawnModule parameter in the config which creates the module(dll vessel) and then the animations begin (box opens and base module inflates).
 
My question is this:

Is there a code snippet I could use, to add a breathable area in the dll?

Thanks in advance
Dimitris


“The trouble with quotes on the internet is that it’s difficult to discern if they are genuine.”
-Winston Churchill

Offline gattico

  • Sr. Member
  • ****
  • Posts: 337
  • Country: United States us
  • Karma: 15
Reply #1 - 11 September 2012, 14:06:52
try this:  

Code: [Select]
if(GetAltitude()<11)
{
UpdateOnly2TimePerSecond+=simdt;
if(UpdateOnly2TimePerSecond<1)
return;
UpdateOnly2TimePerSecond=0;
double longitude=0;
double latitude=0;
double radius=0;
GetEquPos (longitude,latitude,radius); // Get our position
VECTOR3 th={longitude,latitude,650};
if(GetAltitude()>5)
th.z=0;
SetRotDrag (th);


}
   

VECTOR3 th={longitude,latitude,650};  here the 650 is the radius of the breathable area.  The one thing is the breathable area is not saved.  So don't leave your ummu unsuited at the end.  I think this generates air so it takes a minute or so for an atmosphere.

I got this from Dan

It was placed as the last part of the clbkPostStep

in your h.

Code: [Select]
double UpdateOnly2TimePerSecond;


Offline dgatsoulis

  • Jr. Member
  • **
  • Posts: 32
  • Karma: 15
Reply #2 - 11 September 2012, 20:53:21
Thanks, I'll give it a try.


« Last Edit: 11 September 2012, 20:53:21 by dgatsoulis »
“The trouble with quotes on the internet is that it’s difficult to discern if they are genuine.”
-Winston Churchill