Hello!
When i trying to create fuel consimption through ServiceProvider.Instance.PlayerAircraft.Fuel, this value set the value of fuel of all aircraft in map. Not only fuel level of player aircraft. And it is no possible to fix that.
The enemy "airplane" set the max throttle and fuel are desrease in my airplane too, And if i set the max throttle, the fuel in enemy airplane will desrease too.
Gif:
Devs, please fix the ServiceProvider.Fuel.
75.1k MOPCKOEDNISHE
5.8 years ago
@NathanMikeska I was tested this again and discover that:
"So setting ServiceProvider.Instance.PlayerAircraft.Fuel affects AI spawned aircraft?"
No, if this AI aircraft no have my mod. Like "Hellseka". And yes, if this AI aircraft use this mod engines. And this work for ServiceProvider.Instance.PlayerAircraft.Controls too. But the AI aircraft must have the mod part.
The problem is that game don't distinguish the script on my aircraft and script on AI aircraft.
If i create a some engine part and write code in it:
{
Nozzleflap.transform.localeEulerAngles = new Vector3(Input.GetAxis("Vertical"),0,0)
}
and attach this engine to airplane, save this, run game and spawn the same AI airplane with this engine mod, then nozzle flap will be move on AI airplane and on my airplane in one time.
This problem was solved when i started using Input controller. So, then i write:
{
Nozzleflap.transform.localeEulerAngles = new Vector3(InputController.Value,0,0)
}
After this action nozzle flap work correct.
But it not work for fuel. If i want to write fuel consumption code, i compelled to use ServiceProviderScript. In this case i have no ways to do that fuel will not decrease on AI aircraft with mod engines and decrease on my aircraft with this mod engines.
@NathanMikeska "So setting ServiceProvider.Instance.PlayerAircraft.Fuel affects AI spawned aircraft?" Yes, it is. And ServiceProvider.Instance.PlayerAircraft.Controls.Pitch,Yaw... and other axis too. If i use input controller or array of input controllers, its ok. But if i use ServiceProvider.Instance.PlayerAircraft.Controls, its affect to AI aircraft.
I have tag you in another unlisted post with unity file.
So setting ServiceProvider.Instance.PlayerAircraft.Fuel affects AI spawned aircraft? If that is the case, I'm not sure how it is possible... If you have a mod project you could send me that makes it easy to reproduce, that may be helpful (you can tag me on an unlisted plane with a download link).
@BlackhattAircraft Me.
@MOPCKOEDNISHE whos the mod creator?
@PhilipTarpley
@AndrewGarrison @NathanMikeska