| Blockland Forums > Modification Help |
| Would it be possible to script... |
| << < (4/5) > >> |
| Uxie:
--- Quote from: Midway Sentinel on August 15, 2011, 08:38:24 PM ---lol, might you care to point them out? --- End quote --- nah im too lazy fine. --- Quote from: Midway Sentinel on August 15, 2011, 08:27:19 PM ---redo of the script: --- Code: ---function MA5C_ICWSImage::onLoadCheck(%this,%obj,%slot) { if(%obj.toolAmmo[%obj.currTool] <= 0) %obj.setImageAmmo(%slot,0); } else { %obj.setImageAmmo(%slot,1); if(%obj.toolAmmo[%obj.currTool] > 16) { %obj.mountImage(MA5C_ICWSImage,0); %obj.unMountImage(MA5C_ICWSmedImage,0); %obj.unMountImage(MA5C_ICWSlowImage,1); } if(%obj.toolAmmo[%obj.currTool] <= 16) { %obj.mountImage(MA5C_ICWSmedImage,0); %obj.unMountImage(MA5C_ICWSImage,0); } if(%obj.toolAmmo[%obj.currTool] <= 7) { %obj.mountImage(MA5C_ICWSlowImage,0); %obj.unMountImage(MA5C_ICWSmedImage,1); } } function MA5C_ICWSImage::onReloadStart(%this,%obj,%slot) { %obj.toolAmmo[%obj.currTool] = 0; %obj.unMountImage(MA5C_ICWSImage,0); %obj.unMountImage(MA5C_ICWSmedImage,1); %obj.mountImage(MA5C_ICWSlowImage,0); } function MA5C_ICWSImage::onReloaded(%this,%obj,%slot) { %obj.toolAmmo[%obj.currTool] = 32; %obj.setImageAmmo(%slot,1); } --- End code --- sorry for tri-post --- End quote --- You forgot alot of brackets. Also, oh wow what happened to all the spaces |
| Midway Sentinel:
lol, thanks man edit: it made the weapon not show up on the list! edit-II: --- Quote from: Uxie on August 15, 2011, 08:29:17 PM ---hurray for syntax errors ^^^ --- End quote --- i removed 2 of the brackets and it works ingame again, but it still doesnt do what i wanted. in the BG console it says "Wrong number of arguements" and a thing says <int slot> if that helps at all |
| Uxie:
what brackets did you remove |
| Midway Sentinel:
the ones right before and after else i think |
| Uxie:
Oh, then i think its } else { |
| Navigation |
| Message Index |
| Next page |
| Previous page |