Page 1 of 1
Drop Item.
Posted: Sun Dec 09, 2007 11:49 am
by Caleb1117
Ok, I made this wicked cool power up item the heals, give you energy, and buffs defense, and offense, and gave it to one Mandalorian unit, so he could be a medic type class for the Mando's.
It works fine, then I decided to have it so that whenever you kill a Mando, as a reward, you have about a 50% chance of them dropping this uber stimulant.
After a bit of ODF searching, I found the lines I needed.
Code: Select all
DropItemClass = "com_item_powerup_mand"
DropItemProbability = 0.50
I put the line in each Mando ODF.
The powerup ODF, msh, tga, etc are all in the mandalorian side, and in the common/munged/odf, of my map.
Like I said before, dispensing the stim works.
But ingame if I kill the one of the Duros, it will drop the stim, no problem, but if I kill eather the sniper mando, or the one with the beam tube, I crash.
Que Error.
Message Severity: 3
.\Source\EntitySoldier.cpp(11111)
Soldier "man_inf_mand1" drop item "com_item_powerup_mand" not found
Message Severity: 3
.\Source\EntitySoldier.cpp(11111)
Soldier "man_inf_mand2" drop item "com_item_powerup_mand" not found
Heres the Duros ODF:
The sniper Mando
Beam tube Mando:
Re: Drop Item.
Posted: Sun Dec 09, 2007 11:52 am
by Maveritchell
Huh. I'm surprised you got any of them to drop it at all on death - I haven't been able to get a custom "death drop" to work at all, and I've had the same problem as you - as soon as someone tries to drop it, I get a crash. If I had to guess, the only reason your Duros unit can drop it is because he has the powerup dispenser himself. Why that makes a difference baffles me, but it's the likeliest explanation.
Btw, let me know if you do get a custom death drop to work, I'd like to implement them.
Re: Drop Item.
Posted: Sun Dec 09, 2007 11:55 am
by Caleb1117
Hmm, ever try giving the line to a class parent?
Re: Drop Item.
Posted: Sun Dec 09, 2007 11:57 am
by Maveritchell
Can't remember. Regardless, whatever I did, it wouldn't read the updated .odf for the item whether I had it in my sides folder or my world folder. (I don't think it'll munge if it's in the common folder either - I'm pretty sure I've tried munging from there before with no effect.)
Re: Drop Item.
Posted: Sun Dec 09, 2007 12:00 pm
by Caleb1117
Ok, so it seems it will work, if the powerup is loaded via a dispenser weapon.
Is there a way to add a weapon into a units ODF, and keep it from being used? As in, not even able to switch to it?
Re: Drop Item.
Posted: Sun Dec 09, 2007 12:03 pm
by Maveritchell
Don't think so. You could try adjusting the weaponchannel to one that doesn't exist (WeaponChannel = 2).
Re: Drop Item.
Posted: Sun Dec 09, 2007 1:59 pm
by FragMe!
Just for something fun to do and hey why not
Try adding com_item_powerup_mand to the sides xxxshell.req under the model heading. If the side doesn't have one copy one from any shipped side and edit and rename to suit your purposes.
Re: Drop Item.
Posted: Sun Dec 09, 2007 10:52 pm
by Caleb1117
FragMe! wrote:Just for something fun to do and hey why not
Try adding com_item_powerup_mand to the sides xxxshell.req under the model heading. If the side doesn't have one copy one from any shipped side and edit and rename to suit your purposes.
Tried that, no luck unfortunately.
Re: Drop Item.
Posted: Mon Dec 10, 2007 12:34 am
by Syth
I tried the same thing and got that problem too... did you try makeing reqs for the item and manually loading it into the map? Might be hard coded.
Re: Drop Item.
Posted: Mon Dec 10, 2007 10:24 am
by Caleb1117
You mean, make it a req, and then add it to the side req.
and then loading it in the lua?
Re: Drop Item.
Posted: Mon Dec 10, 2007 11:29 am
by Syth
yah, just like a unit
Re: Drop Item.
Posted: Mon Dec 10, 2007 1:12 pm
by [RDH]Zerted
Yes, your error says that the game does not know what com_item_powerup_mand is, meaning it isn't loaded. It should be included in a req somewhere and read into the game.
Re: Drop Item.
Posted: Mon Dec 10, 2007 2:08 pm
by Caleb1117
Well, I just tried that, and it crashed.
I could have done it wrong, but I don't think so.
Re: Drop Item.
Posted: Tue Dec 11, 2007 2:26 pm
by [RDH]Zerted
Maveritchell wrote:I don't think it'll munge if it's in the common folder either - I'm pretty sure I've tried munging from there before with no effect.
I've added things to a map's common.lvl before. You need to make sure it's in the correct folder and that it's in common's req. Try putting your droppable item in common.lvl.