Author Topic: How do I give a player unlimited weapons?  (Read 1204 times)

Nobody here has a clue. The simplest and by far the best way to do this is by editing the snowball script itself. I'm not saying that I'm a scripter, but I've been poking around some item scripts lately and found out that this piece of code appears to create the unlimited item effect. Like the spear.

Code: [Select]
function YourWeaponNamel_Image::onCharge(%this, %obj, %slot)
{
%obj.playthread(2, spearReady);
}

function YourWeaponName_Image::onAbortCharge(%this, %obj, %slot)
{
%obj.playthread(2, root);
}

function YourWeaponName_Image::onFire(%this, %obj, %slot)
{
%obj.playthread(2, spearThrow);
Parent::onFire(%this, %obj, %slot);
}

forget you beat me to it, Demian. Anywho, THIS ^

Nobody here has a clue. The simplest and by far the best way to do this is by editing the snowball script itself. I'm not saying that I'm a scripter, but I've been poking around some item scripts lately and found out that this piece of code appears to create the unlimited item effect. Like the spear.

Code: [Select]
function YourWeaponNamel_Image::onCharge(%this, %obj, %slot)
{
%obj.playthread(2, spearReady);
}

function YourWeaponName_Image::onAbortCharge(%this, %obj, %slot)
{
%obj.playthread(2, root);
}

function YourWeaponName_Image::onFire(%this, %obj, %slot)
{
%obj.playthread(2, spearThrow);
Parent::onFire(%this, %obj, %slot);
}
So where would I put this in the snowball script? And would I have to change anything else?

So where would I put this in the snowball script? And would I have to change anything else?
At the very end of the script. Just change the "YourWeaponName".