Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Starman01 on June 25, 2006, 05:49:52 am

Title: Afterburner lock
Post by: Starman01 on June 25, 2006, 05:49:52 am
Hello,

just a short question. Is it possible to lock the afterburner on the players ship, and give it free a few minutes later (maybe by changing the key or removing the fuel or something like that ? ). I'm using a 3.6.7 build, so I hope there is already a way of doing that.
Title: Re: Afterburner lock
Post by: karajorma on June 25, 2006, 09:47:48 am
I don't think it's possible at the moment. It might be possible to add one just like the lock primary and secondary weapon SEXPs though.
Title: Re: Afterburner lock
Post by: Starman01 on June 25, 2006, 11:48:08 am
That's too bad :( If the player will afterburn at this stage, it might brake the mission/story flow.

Anyway, thanks :)
Title: Re: Afterburner lock
Post by: Warnstaff on June 25, 2006, 11:51:01 am
Does the mission allow AB at any point? If not, you could edit the tbl files to add an exact duplicate of the fighters (with a hidden name...... I think # can do it) that don't have AB.
Title: Re: Afterburner lock
Post by: Shade on June 25, 2006, 11:55:21 am
Might be possible with a little roundabout hacking.

1) Get yourself an extra ship class that's identical to what the player will be flying, but without afterburner capability.
2) Use change-ship-class to switch it in when you want to prevent afterburners.
3) And switch it back again when you want to allow them.

I have no clue if this would actually work, but in theory... it might :p
Title: Re: Afterburner lock
Post by: karajorma on June 25, 2006, 12:01:04 pm
That would work fine. I should have remembered that not only is it possible but that I've actually done it before in a test mission :rolleyes:

I'm still interested in adding a SEXP to do it though.
Title: Re: Afterburner lock
Post by: Starman01 on June 25, 2006, 12:02:46 pm
Does the mission allow AB at any point? If not, you could edit the tbl files to add an exact duplicate of the fighters (with a hidden name...... I think # can do it) that don't have AB.

Yes, I just want to block it because at this time in the mission is a very long dialogue, and it will only work correctly when the players flies to the distant point with full speed, but without AB. Otherwise it could happen that the fight starts, and the "attack target" order comes much later.


Might be possible with a little roundabout hacking.

1) Get yourself an extra ship class that's identical to what the player will be flying, but without afterburner capability.
2) Use change-ship-class to switch it in when you want to prevent afterburners.
3) And switch it back again when you want to allow them.

I have no clue if this would actually work, but in theory... it might :p

Nice Idea, I will try that one (if it will work for the player ship, that is).  :)
Title: Re: Afterburner lock
Post by: Shade on June 25, 2006, 12:11:02 pm
Nice to know it would work :) I agree a SEXP would definitely be better though, should be no need to jump through so many hoops for something this simple.
Title: Re: Afterburner lock
Post by: Starman01 on June 25, 2006, 12:42:12 pm
Hm, works pretty good :)

Changing to a ship with no afterburner however let the HUD-Gauge disappear (of course), but when you use a setting like that :

Code: [Select]
$Afterburner:           YES
+Aburn Max Vel: 0.0, 0.0, 218.0
+Aburn For accel:       0.7
+Aburn Fuel:            0.01
+Aburn Burn Rate:       1.0
+Aburn Rec Rate:        0.0

you have a full Fuel-Gauge, which isn't dropping at all, and the afterburner can't be activated (and brings the empty-sound) :)
Title: Re: Afterburner lock
Post by: Starman01 on June 25, 2006, 01:16:13 pm
Hm, on second thought, not so good :(  Changing ship-class resets the weapon loadout, and that to even a wrong amount (10 times more than the table should allow  :confused: )
Title: Re: Afterburner lock
Post by: Shade on June 25, 2006, 01:19:13 pm
No worries. There are set-primary-weapon/ammo and set-secondary-weapon/ammo SEXPs to fix that :)
Title: Re: Afterburner lock
Post by: Starman01 on June 25, 2006, 01:24:24 pm
Yes, but not in the old build we are using :D  I suppose, I will have to trust the player that he will not afterburn at that time
Title: Re: Afterburner lock
Post by: Shade on June 25, 2006, 01:28:59 pm
Ah. Just make up some silly excuse like "Uhh... we're getting some strange energy fluctuations from your engine - Best not use afterburners until they subside or there could be... trouble", and then center a huge nuke-like special explosion on him if he doesn't play ball ;)

Sooner or later you really ought to start using newer builds though. Miss out on a lot by sticking with obsolete ones.
Title: Re: Afterburner lock
Post by: Bob-san on August 11, 2006, 02:43:35 pm
maybe you make that effect actually do something bad... like if the player hits the afterburner the shields buckle and you lose communications, engines, and weapons... and remove support ships

That should make the player have to replay the mission...
Title: Re: Afterburner lock
Post by: Starman01 on August 11, 2006, 02:47:29 pm
Not nessesary, I used the change-ship-class method an created a fighter with no afterburner. At this part of the mission it's possible since you weren't able to use the secondaries before. It works fine that way. Only small problem, if the player has used the afterburner before (and there is actually no need to) he will suddenly have the afterburner refuelled. But this is a minor issue, all big games have such minor inconsistences :)