3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: airfoil and scripting  (Read 1466 times)

« on: December 13, 2011, 09:01:59 PM »
ive started making a parachuting game but i want to make the airfoil to start when i press C.

ive tried scripting but it doesnt work help
« Reply #1 on: December 13, 2011, 09:22:23 PM »
Event on Input :)
« Reply #2 on: December 14, 2011, 08:54:06 AM »
I started my maths homework.

My answers were wrong. Help.

Sorry, but you need to give us a little more. Can you give us a project? A more detailed explanation? Can you post the script?
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #3 on: December 14, 2011, 11:50:27 AM »
I think the problem is: You can't Start/Stop Show/Hide the airfoil. (actually Start/Stop will hide the displayed geometry but the airfoil continues working)

The workaround or procedure for "turning on" the airfoil can only be done by script I think. You have to set the Airfoil's Surface Area OUT_parameter to zero for "off" (or a packed chute)
and set a positive value for the Surface Area for "on" (or a deployed chute)
3D Rad: The best abandonware ever!
« Reply #4 on: December 14, 2011, 01:00:57 PM »
it would help others help you if you could post your script...

Flish is most likely on the right track, but it's impossible to tell if your script is at fault if we can't see it...

--Mike

jestermon

« Reply #5 on: December 14, 2011, 03:27:27 PM »
Airfoils always mess around with people's brains. They are really made for airplane and sail type simulations. More often than not they just don't seem to work for anything else - specifically because there is a 'lift" factor involved.

In 3D Rad, the angle of the airfoil can be changed with script, but the surface area does not seem to be effected at all, no matter what value you make it. So even setting it to 0 at run time does not "turn it off" as one would expect. I also found no mention of a "fix" for this problem in any of the release notes.

So switching airfoils on and off, for parachutes are - for now at least - not a possibility.


The other alternative is of course to use an upward force, which if set a little lower than the default Gforce, will allow the object to descend at a relatively slow velocity.

I played around with the idea, and although not the perfect solution, does allow Andro to join the paratrooper squad for the next invasion game.
Walk Andro off the platform, and help the demented biker to practice for the invasion.

Controls:
Forwards, Left, Right keys - Walk and Turn
Left Mouse button  - Toggle parachute On and Off
« Last Edit: December 14, 2011, 08:14:10 PM by jestermon »
« Reply #6 on: December 14, 2011, 05:34:01 PM »
Small alternative suggestion: Change the Linear Damping Property of the rigidbody with a script

Currently using 7.22
« Reply #7 on: December 14, 2011, 07:08:56 PM »
Oh sorry... you can do the chute thing like I said above but you have to link the Airfoil to the Wind object. -then the OUT works.

*EDIT the wind needs to point ^up towards the parachute to make this work... on the other hand you could just Start/stop the Wind Object.

*added a demo
« Last Edit: December 14, 2011, 07:45:43 PM by Flish »
3D Rad: The best abandonware ever!

jestermon

« Reply #8 on: December 14, 2011, 08:12:27 PM »
That's what I love about game making. There are always more than one way to do the same thing.

The airfoil solution from Flish works really great, but one has to move the airfoil way out of view since it can't be hidden. (_paratrooper_Andro2.3dr)

The linear damping solution from Dart also works really great, except that Andro suddenly got super powers, and runs faster that the "Flash" (_paratrooper_Andro3.3dr)

I did these for fun, since I actually do paragliding, and the topic interests me.
So Flish had the answer all along.. :D
« Last Edit: December 14, 2011, 08:18:51 PM by jestermon »
« Reply #9 on: December 14, 2011, 09:51:03 PM »
Just kind of figured this out by observation:
The character object apparently applies it's own damping to the rigidbody when it moves and is in contact with the ground
the character kept bobbing after a short burst of moving, so i was guessing that the rigidbody wasnt able to keep up or something.  turning the "parachute" on actually reduced this a little.
simple fix, just add an eventoncontact object, check the monitoring force bounds box (something like that), and link to the script. then just add a little if in front of your damping setting system that turns it on when not in contact with the ground.  when it's not active, the character object takes over and sets its own damping. this still allows for the player to remove the parachute after landing (and even if the parachute is out, it's damping has no effect any more after landing)
Code: [Select]

bool PARACHUTE = false;

void Main()
{
   Vector3 v;
   iObjectLocation(OBJ_0,v);
   v.y += 5;
   iObjectLocationSet(OBJ_66,v);

   if (iMouseButtonClick(0)){
      PARACHUTE = !PARACHUTE;
   }

   if(IN_22==0)//if no collision is detected, then change normal damping settings
   {
   if(!PARACHUTE){
      OUT_44 = 0.999;
      iObjectHide(OBJ_66);
   }else{
      OUT_44 = 0.985;
      iObjectShow(OBJ_66);
   } 
   }
   
}

Currently using 7.22

jestermon

« Reply #10 on: December 14, 2011, 10:05:25 PM »
Clever.
Now poor Andro has lost his new super power. I guess there can only be one "Flash".
« Reply #11 on: January 17, 2012, 07:27:29 AM »
...but the surface area does not seem to be effected at all, no matter what value you make it. So even setting it to 0 at run time does not "turn it off" as one would expect...

If the Wing loading is less than 2   kg/m2
http://en.wikipedia.org/wiki/Wing_loading
the group object mass and airfoil are unstable.
A solution, put more than 5kg/m2 in each airfoil, and put more airfoils. (4)
(with more Wing loading each).

if you use damping and you add wind, there will be no wind influence
http://www.3drad.com/forum/index.php?topic=7058.msg72873#msg72873
but you can change the value progressiveness
« Last Edit: January 17, 2012, 07:34:04 AM by a_mattano »
Using: 3d rad v7.22 | IntelPentM 2Ghz, 1GB ram, 160 hdd | ATI Mobility Radeon 9600 128Mb 446Mhz (1920x1200 60 Hertz) | Ati Catalyst 09.3 Control Center 2009.0225.1546.28221 | AGP4x Performace profile| Dx9c D3D6.14.10.0647 OpenGL6.14.10.8543 |
« Reply #12 on: April 23, 2012, 05:36:34 PM »
thanks
Pages: [1]