How to detect whether character's vehicle fired single shot?
Posted: Wed Aug 26, 2020 10:03 am
I'm trying to make custom artillery vehicle.
My objective :
- Make vehicle not to react to global artillery-targeting-remote.
- No automatic fire.
- Only react to custom remote used inside of vehicle. Remote cannot invoke other same types of vehicle.
- Can fire directly with fire button, like normal tank.
- Yes, it is self propelled gun. SPG.
Because there is only prototypes of car, artillery-wagon, artillery-turret, and they cannot be mixed, it's quite hard.
I've already met an error car prototype's turret animation doesn't accept ".slice", so I couldn't apply 256 direction images of existing artillery turret head.
And I had to remove cannon barrel animation.
But I found that it is possible to make it fire even in mapview via .shooting_state of character entity.
I think I can partly setup custom targeting flare with custom remote. Passing target position is easy.
But how to detect whether SPG fired only single shot?
I want it to stop shooting just after it fired single shot.
It's type is "car", so it can have its own gun inventory slot and ammo inventory slot.
on_player_ammo_inventory_changed event not fires when shooting in vehicle.
One more thing I have wondered, .ammo_stack_limit is only defined in artillery-wagon and turret.
How can I make similar thing in car prototype? Should I have to create stackable artillery shells? But I want to use existing shells if possible, and don't want to make it modified.
Is there any way to limit item type of full of car trunk to only shells?
My objective :
- Make vehicle not to react to global artillery-targeting-remote.
- No automatic fire.
- Only react to custom remote used inside of vehicle. Remote cannot invoke other same types of vehicle.
- Can fire directly with fire button, like normal tank.
- Yes, it is self propelled gun. SPG.
Because there is only prototypes of car, artillery-wagon, artillery-turret, and they cannot be mixed, it's quite hard.
I've already met an error car prototype's turret animation doesn't accept ".slice", so I couldn't apply 256 direction images of existing artillery turret head.
And I had to remove cannon barrel animation.
But I found that it is possible to make it fire even in mapview via .shooting_state of character entity.
I think I can partly setup custom targeting flare with custom remote. Passing target position is easy.
But how to detect whether SPG fired only single shot?
I want it to stop shooting just after it fired single shot.
It's type is "car", so it can have its own gun inventory slot and ammo inventory slot.
on_player_ammo_inventory_changed event not fires when shooting in vehicle.
One more thing I have wondered, .ammo_stack_limit is only defined in artillery-wagon and turret.
How can I make similar thing in car prototype? Should I have to create stackable artillery shells? But I want to use existing shells if possible, and don't want to make it modified.
Is there any way to limit item type of full of car trunk to only shells?