Page 1 of 1

Lose control on energy run out

Posted: Mon Jun 08, 2009 1:37 pm
by theultimat
Hello.
I was wondering if there was a way to lose all forms of control (in a starfighter) when your energy runs out. I have set up the odf so that your energy slowly drains, but I was wondering if there was a way to make it do something when you run out - in this case, lose player control. Is this possible?
Thanks in advance.

Re: Loose control on energy run out

Posted: Mon Jun 08, 2009 2:17 pm
by woner11
What does lose character control mean? You blow up? There is no way that I know of to lose character control for anything. I guess what you could do is write some script (I don't know too much about these) so ifenergy=0,then whatever the script is for the low control on the fakeconsole.

Re: Loose control on energy run out

Posted: Mon Jun 08, 2009 2:31 pm
by theultimat
When I say loose player control, I mean that the player has little or no control over the starfighter, so...I guess a bit like reducing the mouse sensitivity. But your idea sounds good...

Re: Loose control on energy run out

Posted: Mon Jun 08, 2009 3:00 pm
by Teancum
Yeah, the problem is when you use SetProperty it would do that for every ship with the same odf, not just a particular players. There is an odf call that will make a ship spiral out of control for a few seconds just before it explodes (at least there was in SWBF1). Don't remember what it is off hand.

Re: Loose control on energy run out

Posted: Mon Jun 08, 2009 5:09 pm
by [RDH]Zerted
The FakeConsole messes with the ODF property ControlSpeed. This works on the unit class level, so it won't work for you.

You could try giving the ship almost no normal speed, but a good sprint speed and expect everyone to be sprinting around. You can't sprint with no energy.

Re: Loose control on energy run out

Posted: Mon Jun 08, 2009 5:14 pm
by bobfinkl
Since I know exactly what Theultimat means that wouldn't work for what he wants. He wants to simulate what happens in a real airplane when you run out of fuel, you fall down to the ground.

Re: Loose control on energy run out

Posted: Mon Jun 08, 2009 6:28 pm
by [RDH]Zerted
Oh, ok. Remember, there is no down in space.

Re: Loose control on energy run out

Posted: Mon Jun 08, 2009 6:44 pm
by woner11
you could always create some kind of animation, or use the one right before you explode. And because AI, at least from my experience, don't sprint, you wouldn't have to worry about it happening to the other ships.

Re: Loose control on energy run out

Posted: Mon Jun 08, 2009 9:42 pm
by bobfinkl
[RDH]Zerted wrote:Oh, ok. Remember, there is no down in space.
I know, but there is over the Pacific :wink: . I'm not quite sure what you mean woner, do you mean a fighter death anim? Because that isn't exactly what we need we need to make the plane fall after it runs out of "fuel" (energy).

Re: Lose control on energy run out

Posted: Tue Jun 09, 2009 9:55 am
by woner11
Is it a recoverable fall, or not?
Basically, do you die from it?

Re: Lose control on energy run out

Posted: Tue Jun 09, 2009 12:23 pm
by theultimat
Ya, bobfinkl has the idea... :wink:

@woner11: You don't die from it, you just loose a lot of control. Your controls would be a lot slower to react, and your aircraft will be less maneuverable on general, and all the time, you will slowly loose height...

Re: Lose control on energy run out

Posted: Tue Jun 09, 2009 1:18 pm
by MetalcoreRancor
ScriptCB_SetControlScale
ScriptCB_GetControlScale
ScriptCB_SetMouseTurnAssist
ScriptCB_GetMouseTurnAssist
ScriptCB_SetYAxisFlip
ScriptCB_GetYAxisFlip

Try those.

Re: Lose control on energy run out

Posted: Tue Jun 09, 2009 2:54 pm
by theultimat
MetalcoreRancor wrote:ScriptCB_SetControlScale
ScriptCB_GetControlScale
ScriptCB_SetMouseTurnAssist
ScriptCB_GetMouseTurnAssist
ScriptCB_SetYAxisFlip
ScriptCB_GetYAxisFlip

Try those.
Would those go in the ODF or LUA?

Re: Lose control on energy run out

Posted: Tue Jun 09, 2009 3:02 pm
by Maveritchell
theultimat wrote:
MetalcoreRancor wrote:ScriptCB_SetControlScale
ScriptCB_GetControlScale
ScriptCB_SetMouseTurnAssist
ScriptCB_GetMouseTurnAssist
ScriptCB_SetYAxisFlip
ScriptCB_GetYAxisFlip

Try those.
Would those go in the ODF or LUA?
They are script callbacks. Those only go in LUA.

Re: Lose control on energy run out

Posted: Tue Jun 09, 2009 3:38 pm
by [RDH]Zerted
Those mess with a player's profile settings. I never tested those exact functions to see if their changes get saved or not, but I'd assume that they are saved. If you change their values, make sure to change them back.

Re: Lose control on energy run out

Posted: Wed Jun 10, 2009 9:56 am
by Teancum
Personally I really feel like this falls under the If it CAN be done it would take too much time and effort, and may never work right anyways (so it ain't worth it) category, but that's just me.

Re: Lose control on energy run out

Posted: Wed Jun 10, 2009 12:30 pm
by theultimat
Ah, ok. Well thanks anyway. I guess this can be locked...