Creating airdrops from script.

  1. 9 years ago
    Edited 9 years ago by thefinn

    Is this possible? I've not seen any examples of it when I was looking at limiting airdrops, altho I will recheck the wiki in a sec.

    I'm wondering if I can add a couple of standard ones to the radio dialogue.

    I'd really like to turn off the player logistics system and call them in via script manually.

    Otherwise I'll just make my own I guess.

    Edit: Nevermind, way more control doing it myself.

  2. Edited 9 years ago by SpyderBlack723

    You could do something like
    (obviously adjust it to be called from a radio call)

    player addAction ["Call in airdrop", "
    	openMap [true, false];
    	onMapSingleClick '
    		_height = 100;
    		_chute = ""B_Parachute_02_F"" createVehicle _pos;
    		_chute setPos [_pos select 0, _pos select 1, _height];
    		_vehicle = ""B_MRAP_01_F"" createVehicle _pos;
    		_vehicle attachto [_chute, [0, 0, 0]];
    		openMap false;
    		';
    "];

    Can't seem to get the chute to delete when the vehicle is close to the ground for some reason (somebody please complete that for me if you have the knowledge). Tried isTouchingGround and height < 5 but it's eluding my unfortunately due to repeated errors. I've given up on trying to make it work 100% but at least it gets the idea flowing.

    Some notes are that it MUST be the vehicle attached to the chute and not the other way it around because otherwise the vehicle seems to just fall without the chute doing anything. Since the vehicle is attachTo'ed to the chute, it falls through the ground and gets damage on landing and that is why you need to delete the chute immediately at low altitude.

  3. Edited 9 years ago by thefinn

    oh ok cool. I may be able to help with chute i'll take a look later on - I know I have some working airdrop scripts laying around.

    That's likely the simplest rendition of an airdrop i've ever seen btw ;) And I had no idea how to use onmapsingleclick until now, thanks!

    Perhaps what we need is a good library to mess with the functions on the tablet itself ;) Then we could just remove all the menu entries and create some airdrops and whatever as needed.

    Just an idea.

  4. Edited 9 years ago by thefinn

    Pretty sure the position of the chute attachment has to be at the top of the box, and the it's box inter-dependant - different boxes position it slightly differently.

    (Seriously how does this forum not have an "underline" code?)

  5. Edited 9 years ago by thefinn

    Just on this, I was actually wondering if I could create ALiVE Airdrops from scripts.

    The reason being is that I want to be able to dictate when/where/if the player can get an airdrop with say a crate of bunkers or H-Barriers in it.

    I just imagined calling an airdrop from ALiVE might be somewhat simple via script - but perhaps not?

    It'd also have to work around the fact that the player won't have access to the player logistics module via the tablet.

 

or Sign Up to reply!