Author Topic: Supply Drop?  (Read 4333 times)

Some nice supply dropping you have there.

Are you making fun of my spelling or something?

Are you making fun of my spelling or something?
No, i just like the idea and how it looks like currently. :3

Not every comment is bad. ;D

No, i just like the idea and how it looks like currently. :3

Not every comment is bad. ;D

Oh, thanks.
:D

EDIT:
I'm working on an event that has two arguments, called AzjAdjSupplyDrop that lets you choose a datablock of an item to drop (item) and how many to drop, other than that it works like the other events, after that's done I might try to send it to RTB add-ons as a first version.

Before I get it out publicly, can anyone tell me if the makers of the radio (what you hold) and plane models mind if I use them too?
« Last Edit: April 02, 2010, 06:22:45 PM by Azjherben »

I imaging it would drop a crate full of supplies like medicine, health kits, etc...
The plane should come in from any random direction if possible.

I imaging it would drop a crate full of supplies like medicine, health kits, etc...
The plane should come in from any random direction if possible.

Did you watch the video?

Can anyone tell me why the (following) output event I made has the appropriate arguments and can trigger it's attached function, but when it does the plane doesn't come. (I know it triggers because it will say "Supply Drop Complete".)

Code: [Select]
function fxDTSBrick::AzjAdjSuppliesDrop(%dblock,%num,%client)
{

%pos = %client.getposition();
%pos = vectoradd(%pos, getRandom(0,0) SPC "-500 50");
%se = new projectile()
{
datablock = spawnprojectile;
initialposition = %pos;
};
missioncleanup.add(%se);
%v = new FlyingVehicle()
{
datablock = AzjairstrikeF14Vehicle;
position = %pos;
};
missionCleanup.add(%v);
%v.setNodeColor(body, "0.2 0.15 0.24 1");
%pilot = new AIPlayer()
{
datablock = PlayerStandardArmor;
};
missionCleanup.add(%pilot);
%pilot.setnodeColor("ALL", "0 0 0 0");
%v.mountobject(%pilot, 0);
%pilot.setMoveY(1);
schedule(18000, 0, removeAirstrikeplane, %v, %pilot);

for(%i=0;%i<%num;%i++)
{
schedule(5600+(%i*40), 0, nopillairstrikeclient, %v,%dblock);
}


schedule(10050,0,messageall,"","Supply drop complete.");
}


function NoPillAirstrikeClient(%obj,%dblock)
{
%cash = new Item()
{
datablock = %dblock;
canPickup = true;

};



%cash.schedule(50,"setTransform", %obj.getTransform());


MissionCleanup.schedule(100, "add", %cash);


}

registerOutputEvent("fxDTSBrick","AzjAdjSuppliesDrop", "string 250 250" TAB "int 1 15 6",1);

Any console errors?
I guess it has to do with:
client.getposition();

I don't think that you can get the position of the brick by using the client.

Though, i never work with bricks and stuff, just a random guess.

Any console errors?
I guess it has to do with:
client.getposition();

I don't think that you can get the position of the brick by using the client.

Though, i never work with bricks and stuff, just a random guess.
It works fine like that in the scripts for the gun and pill drops, just not this one with it's extra arguments.

Did you watch the video?
Yes.
It drops individual pills out of a plane always going in the same direction.

Seems odd, I still think it should drop a crate that when you click it gives you health supplies.

NINJAEDITED BETTER IDEA:
RTB prefs to chose up to 5 items which can be in it, and it randomly gives you one.

Like weapons, grenades, health.
And you can chose how many of those items you get.

NINJAEDITED BETTER IDEA:
RTB prefs to chose up to 5 items which can be in it, and it randomly gives you one.

Like weapons, grenades, health.
And you can chose how many of those items you get.
So a copy of my idea. :S


How about you set items via RTB pref, but the items don't always appear, randomization. So that way there won't always be the same item over and over again in the crates. Make the admins able to choose 5 items, but there is a max of like 3 in a crate.

So a copy of my idea. :S
Well sorry for not reading earlier posts then :I

I can make a simple crate model but I'm not the guy to texture it. I think you can colorshift it in the script though.

Unless you want me to animate it, I'll start.

I can make a simple crate model but I'm not the guy to texture it. I think you can colorshift it in the script though.

Unless you want me to animate it, I'll start.

Do it!
I can always just color it brown till I get someone to really texture it, however I will need help with that script to get much further.

Do it!
I can always just color it brown till I get someone to really texture it, however I will need help with that script to get much further.
What exactly in the script do you need help with?

Also, find the code where you can have a dropdown menu with all the items in the items list.
I am sure that could be implented into the preferences and you could use it to determine which items to drop from the plane.
« Last Edit: April 03, 2010, 04:53:31 AM by lordician »

What exactly in the script do you need help with?

Uh, it doesn't work.
(But the other events that come with this mod do)