HelicopterRevival


Adds a fully animated attack helicopter to the game. Ideal for getting from A to B quickly, exploring the map, building islands and nuking biters from the sky. Originally forked from Kumpu with fixes for Factorio 0.18.2+, but adding some enhancements of my own as well.

Content
25 days ago
0.18 - 2.0
78.7K
Transportation

i Create custom events

5 months ago

Hei
I wish to add some features on your mod, but for that, I need you to generate events, especially when the helicopter goes down.
To be accurate, I wish to allow circuit to connect to helipad, and the circuit would provide the content of the helicopter. The final purpose is to automatically refill the helicopter with what is needed (Fuel and weapons) without filling the logistic slots, only the matching one.
Thanks!
Really Awesome Mod by the way. Code and graphics are very impressive!!!

3 months ago

Hei
I wish to add some features on your mod, but for that, I need you to generate events, especially when the helicopter goes down.
When the helicopter is going down or is down?

To be accurate, I wish to allow circuit to connect to helipad, and the circuit would provide the content of the helicopter. The final purpose is to automatically refill the helicopter with what is needed (Fuel and weapons) without filling the logistic slots, only the matching one.

Ooo, that would be cool!

Really Awesome Mod by the way. Code and graphics are very impressive!!!

the mod really isn't mine, I just took it over from Kumpuu since he stopped maintaining it. So, quite some stuff is still a mistery to me.

3 months ago

Hei,
Well, not sure to understand, does it mean you cannot do the improvement? If you feel you cannot do it alone, I may check in the code and bring you to the right direction. Would it help?

3 months ago

I have no idea where the rest of the answer got lost; I swear I wrote them somewhere... Maybe I refreshed it and it got lost.. Hrumph...

Anyways -- The events I was curious about, was which events... Because there's an already exposed event OnHelicopterDown, but it's just an event that is triggered when the helicopter is shutting down. These.

script.on_event("heli-up", OnHeliUp)
script.on_event("heli-down", OnHeliDown)

But those are probably not what you're looking for... I assume you want me to read the fuel / ammo content through the helipad?

3 months ago

oh no, it could be perfect! I somehow probably missed it! Ok. So, don't bother, I will check what I can do with that! Thanks!

3 months ago

All the exposed events are here:
https://github.com/wolfhowlmedia/factorio-helicopters/blob/master/control.lua

IF you can find something here, otherwise will just add things c:

3 months ago

Ok, I checked, unfortunately, it is not an event that the developer exposed on purpose, it is the event generated by Factorio when you move up the helicopter with keys. So, I could do some development by capturing myself the same event, but it would work only when the character is inside the helicopter and we use the keys. If, for example, I call my helicopter to pick up the character somewhere, this won't trigger the event, then the pad will remain connected to the helicopter.
On the other side, if the user is not in the helicopter to tell it to land, then the helicopter won't connect to the pad.
I don't feel to look into the code to find how to expose some event trigger for what I want to do, if you feel you can do it, this would be great, then I am happy to do the rest.
There is a chance that the function OnHeliUp is called each time a helicopter goes up. Then, if you can add a custom event, AND, as properties for this event, the helicopter, that would be awesome!
Thanks
Niko

3 months ago

I just made a release that was long long loooooong overdue (IndustrialRevolution3 support), and I'm making a bump in the devel branch. Will start to play with API changes shortly in there.

New response