Help from experienced modders to create a hidden lightning rod
Help from experienced modders to create a hidden lightning rod
Hi! Help me create a hidden lightning rod for a medium electric pole, I can't do it. I looked at examples of different loaders, but nothing worked. I have almost no modding experience, maybe someone can help? That is, a pillar that absorbs lightning is needed.
Re: Help from experienced modders to create a hidden lightning rod
What you are trying to make is commonly called a "compound entity". You want your modded entity to have the functionality of both a power pole and a lightning attractor, which the game can only handle as separate prototypes. You have to create two entities, only one of which is craftable, (for example the power pole) and have your mod script detect when the player builds it and create the lightning attractor entity at the same position.
The mod script also has to detect when the pole is destroyed so it can destroy the hidden lightning attractor. There are nuances to the prototype flags so the hidden entity is handled correctly when taking damage, in blueprints, pipetting, and surface cloning.
The mod script also has to detect when the pole is destroyed so it can destroy the hidden lightning attractor. There are nuances to the prototype flags so the hidden entity is handled correctly when taking damage, in blueprints, pipetting, and surface cloning.
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk