Blockland Forums > Modification Help

Infinite items

Pages: (1/3) > >>

Demian:

What's the difference between these two scripts that apparently both work just fine in making an item with infinite usage. As in the item not being removed from your inventory after use.


--- Code: ---function Snowball_Image::onCharge(%this, %obj, %slot)
{
%obj.playthread(2, spearReady);
}

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

function Snowball_Image::onFire(%this, %obj, %slot)
{
%obj.playthread(2, spearThrow);
Parent::onFire(%this, %obj, %slot);
}
--- End code ---


--- Code: ---function whiteCardImage::onPreFire(%this, %obj, %slot)
{
%obj.playthread(2, armattack);
}

function whiteCardImage::onStopFire(%this, %obj, %slot)
{
%obj.playthread(2, root);
}
--- End code ---


rkynick:

Neither of them do anything that would remove it from your inventory, duh.

Demian:

Oh. What do they do then? What makes the items infinite then? =O

Chrono:

The fact that they aren't removed from the inventory after use.

Demian:

Oh clever. What does that piece o code do then?

Pages: (1/3) > >>

Go to full version