-raffie- wrote:
Would it be possible to get the weapon from a picked up crate into the script so that it works in for example a Highlander?
I've studied the Highlander code and understand how it works (1 huge array for all worms' weapons in the game, a certain register within the array is loaded for each specific worm). So if someone might help me with how to get the crate's weapon - when it is picked, into the code (if at all possible), I think I could go from there and adapt the Highlander script.
Thanks in advance for any help.
easiest way I've found out
Code:
override void CCrate::Free(bool FreeMem)
{
if((desc.type == CT_WEAPON || desc.type == CT_MWEAPON) && desc.weapon > 100)
{
local wep = GS->GetWeaponByIndex(1, desc.weapon-100);
if(wep != NullObj)
{
local wepindex = wep->GetWeaponIndex(); //index of picked up weapon
}
}
super;
}