| Blockland Forums > Suggestions & Requests |
| [Request] Infinite items |
| << < (2/7) > >> |
| lordician:
--- Quote from: Demian on February 26, 2010, 10:43:09 AM ---Well, the script executes and the item works. But I still can use it only once. I want infinite HE Grenades. =( --- End quote --- Yes i noticed sadly. And the 'fun' part is, i even removed everything that unmounts images or something similiar to that... Odd. Oh dear, i seem to have found something. I will post when i have found the RIGHT answer. |
| heedicalking:
Remove this line and replace is with lord's --- Code: ---function hegrenadeImage::onFire(%this, %obj, %slot) { %obj.playthread(2, spearThrow); Parent::OnFire(%this, %obj, %slot); %currSlot = %obj.lastHESlot; %obj.tool[%currSlot] = 0; %obj.weaponCount--; messageClient(%obj.client,'MsgItemPickup','',%currSlot,0); serverCmdUnUseTool(%obj.client); } --- End code --- Lord, yours is still calling back the Parent::OnFire(%this, %obj, %slot); causing it to still use the other stuff. |
| lordician:
--- Quote from: heedicalking on February 26, 2010, 12:43:21 PM ---Remove this line and replace is with lord's --- Code: ---function hegrenadeImage::onFire(%this, %obj, %slot) { %obj.playthread(2, spearThrow); Parent::OnFire(%this, %obj, %slot); %currSlot = %obj.lastHESlot; %obj.tool[%currSlot] = 0; %obj.weaponCount--; messageClient(%obj.client,'MsgItemPickup','',%currSlot,0); serverCmdUnUseTool(%obj.client); } --- End code --- Lord, yours is still calling back the Parent::OnFire(%this, %obj, %slot); causing it to still use the other stuff. --- End quote --- That's what i found last. :P Silly me... |
| Deathwishez:
Can't you just remove the function that causes it to be used once? |
| Space Guy:
--- Code: ---package HEGrenadeOverwritePackage { function hegrenadeImage::onFire(%this, %obj, %slot) { %obj.playthread(2, spearThrow); WeaponImage::OnFire(%this, %obj, %slot); } }; activatePackage(HEGrenadeOverwritePackage); --- End code --- |
| Navigation |
| Message Index |
| Next page |
| Previous page |