• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

How to spawn an AirDrop using an item

Vayben

Refugee
I am looking for a way to spawn an airdrop using an item.  I have been looking into the gameevents.xml but not getting anywhere.

 
Thought there were mods out there that let you call airdrops. Not sure the names right now but you could see if you could find one and see how they did it.

 
Thought there were mods out there that let you call airdrops. Not sure the names right now but you could see if you could find one and see how they did it.


I have not been able to find any that use the stock airdrop code.... only ones that change blocks to loot containers via PlantGrowing. 

Only problem I am having is with setting up the drop. 

If i have it where a block uses PlantGrowing to switch to another block,  the new block can be looted but keeps reappearing after looted.

If I try to use SpawnEntity and spawn an Airdrop crate. It works okay, however the spawn position needs to be set in the sky and yOffset doesn't seem to work.

Can checkout my mod Supply Drop Beacon check out its code for ideas, and if you release anything just throw some credit my way.
Having this problem .... 

Screenshot-20231210-073624.png


 
Yeah its a known issue as the original code and assets where for an older alpha, im currently working on new assets for my mod.

 
Well, got a new problem.... if you activate the radio outside of a land claim it works fine.  If you try inside the borders it fails on the event.

Here is an abbreviated version ....( This replaces the Radio with a POI Chimney Smoker until the airdrop arrives.  Some code omitted for easy reading.)

<configs>
<append xpath="/gameevents">
<action_sequence name="VaybensSupplyDrop">
<property name="action_type" value="Game" />
<property name="target_type" value="Block" />
<property name="allow_while_dead" value="true" />

<action class="BlockReplace">
<property name="target_position" value="0, 0, 0" />
<property name="block_to" value="VaybensSupplyDropChimney" />
<property name="phase" value="0" />
<!--
<property name="safe_allowed" value="true" />
-->
</action>
</action_sequence>
</append>
</configs>




I tried using the following, but it stops the event even when outside a land claim.  The block never gets replaced and the rest of the action sequence doesn't get executed.

<property name="safe_allowed" value="true" />




So if I use safe_allowed it fails always. If I don't use safe_allowed it only fails inside a land claim.

Is there something I am missing about safe_allowed?

 
What about trying to "change" the Var or CVar (I don't know well) of the original Plane days (option when you start a game) or create a new one to "fake" the game as it is day/time to a flyby?

Sorry about my English, long time not using it on technical issues.

 
Apparently if you use safe_allowed = false in ANY action the entire action_sequence fails... I had that line in the action that spawns zombies so they wouldn't spawn in peoples bases.

 
Back
Top