Lose control on energy run out

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
theultimat
Lieutenant General
Lieutenant General
Posts: 679
Joined: Sun Apr 13, 2008 1:39 pm
Location: UK

Lose control on energy run out

Post 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.
woner11
Sith
Sith
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The lost world of pickels
Contact:

Re: Loose control on energy run out

Post 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.
theultimat
Lieutenant General
Lieutenant General
Posts: 679
Joined: Sun Apr 13, 2008 1:39 pm
Location: UK

Re: Loose control on energy run out

Post 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...
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Loose control on energy run out

Post 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.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Loose control on energy run out

Post 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.
User avatar
bobfinkl
Rebel Colonel
Rebel Colonel
Posts: 593
Joined: Sun Jul 13, 2008 9:01 am
Projects :: Lots of unreleased stuff
Games I'm Playing :: Life
xbox live or psn: No gamertag set
Location: The quaint little city gametoast.

Re: Loose control on energy run out

Post 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.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Loose control on energy run out

Post by [RDH]Zerted »

Oh, ok. Remember, there is no down in space.
woner11
Sith
Sith
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The lost world of pickels
Contact:

Re: Loose control on energy run out

Post 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.
User avatar
bobfinkl
Rebel Colonel
Rebel Colonel
Posts: 593
Joined: Sun Jul 13, 2008 9:01 am
Projects :: Lots of unreleased stuff
Games I'm Playing :: Life
xbox live or psn: No gamertag set
Location: The quaint little city gametoast.

Re: Loose control on energy run out

Post 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).
woner11
Sith
Sith
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The lost world of pickels
Contact:

Re: Lose control on energy run out

Post by woner11 »

Is it a recoverable fall, or not?
Basically, do you die from it?
theultimat
Lieutenant General
Lieutenant General
Posts: 679
Joined: Sun Apr 13, 2008 1:39 pm
Location: UK

Re: Lose control on energy run out

Post 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...
MetalcoreRancor
Brigadier General
Brigadier General
Posts: 628
Joined: Thu Jun 07, 2007 11:13 am
Projects :: No Mod project currently.
Games I'm Playing :: swbf origin
xbox live or psn: No gamertag set

Re: Lose control on energy run out

Post by MetalcoreRancor »

ScriptCB_SetControlScale
ScriptCB_GetControlScale
ScriptCB_SetMouseTurnAssist
ScriptCB_GetMouseTurnAssist
ScriptCB_SetYAxisFlip
ScriptCB_GetYAxisFlip

Try those.
theultimat
Lieutenant General
Lieutenant General
Posts: 679
Joined: Sun Apr 13, 2008 1:39 pm
Location: UK

Re: Lose control on energy run out

Post 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?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Lose control on energy run out

Post 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.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Lose control on energy run out

Post 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.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Lose control on energy run out

Post 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.
theultimat
Lieutenant General
Lieutenant General
Posts: 679
Joined: Sun Apr 13, 2008 1:39 pm
Location: UK

Re: Lose control on energy run out

Post by theultimat »

Ah, ok. Well thanks anyway. I guess this can be locked...
Post Reply