Author Topic: Jetting Depletion Code  (Read 589 times)

/Title

Currently in the midst of fine tuning first player type, but there's a slight, if not annoying bug. The code is directly ripped off the Sport's player, but decided to give it a slight speed boost.
Since it is a fuel-jet esque playertype, it is supposed not be able to jet the moment the fuel gauge depletes.
But the bug exploits the ability to keep jetting even after the jet gauge completes.
What line code is used that forces the player not to be able to jet until the charge is completely full?


Do you mean the player should not be able to jet when the energy is depleted?
Because then you can use the code of one of the default playertypes.

Just add this:
Code: [Select]
minJetEnergy = 10; //minimum amount to be able to jet
jetEnergyDrain = 10; //amount jetting drains the energy bar
canJet = 1; //able to jet
rechargeRate = 3.0; //energy recharge rate

Im fairly sure he means like a recharging Powerup that you cannot Jet until the meter is COMPLETELY full so you cant jet if its at 99% it has to be 100%

Maybe if you set the minJetEnergy to 100 it might work.
Either you get what you want, or you will only be able to jet for a split second.
I am guessing it will be the latter though.

You could change the playertype after they released the jet button.
And then change it back after the energy bar is filled to max.

what he said is prob the best way

Best way would be to package the onTrigger: if they are your player type and hit the jet button, they can only jet if they have full energy

Im fairly sure he means like a recharging Powerup that you cannot Jet until the meter is COMPLETELY full so you cant jet if its at 99% it has to be 100%

This. As said in the OP the bug allows players to keep jetting after the charge depletes.