Jump to content

How to spawn an AirDrop using an item


Vayben

Recommended Posts

  • 2 weeks later...
On 11/29/2023 at 7:03 AM, Gamida said:

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.

 

On 11/29/2023 at 8:39 AM, AaronG85 said:

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 .... 

spacer.png

Link to comment
Share on other sites

  • 3 weeks later...

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...