Blockland Forums > Modification Help
Infinite items
Kiwi:
--- Quote from: Demian on December 23, 2010, 09:59:02 AM ---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); «- This plays the animation of spearready
}
function Snowball_Image::onAbortCharge(%this, %obj, %slot)
{
%obj.playthread(2, root); «- This plays the animation of some root thingy
}
function Snowball_Image::onFire(%this, %obj, %slot)
{
%obj.playthread(2, spearThrow); «- This plays the animation of throwing a spear
Parent::onFire(%this, %obj, %slot);
}
--- End code ---
--- Code: ---function whiteCardImage::onPreFire(%this, %obj, %slot)
{
%obj.playthread(2, armattack); «- This plays the animation of armattack
}
function whiteCardImage::onStopFire(%this, %obj, %slot)
{
%obj.playthread(2, root); «- This plays the animation of another root thingy
}
--- End code ---
--- End quote ---
As you see all what this code does is play some animations but nothing else.
Chrono:
--- Quote from: Kiwi on December 25, 2010, 07:26:07 PM ---As you see all what this code does is play some animations but nothing else.
--- End quote ---
I'm sure a detailed explanation of this answer has already been posted.
Kiwi:
Yeah I know, when I reread this thread after I posted, I realised that you can't delete your post.