| Blockland Forums > Modification Help |
| Most Up-to-date Ammo System Script? |
| << < (2/7) > >> |
| otto-san:
--- Quote from: BULLsEYE091 on October 06, 2010, 06:05:19 PM ---Ok... I've previously looked through that but It confuses the heck outa me with references to the ammo everywhere :/ Could it be possible to just have it in one solid bit of code that i just need to insert somewere? --- End quote --- if you want to insert that code into every single gun then sure |
| Uristqwerty:
I don't know if it is already done this way, but has anyone considered defining a few generic ammo functions and then simply using those? .hasAmmo(%type) .useAmmo(%type) .addAmmo(%type) .depleteAmmo(%type), each with an optional number, defaulting to 1 if ommited, and returning the ammount of ammo actually used/added/removed? Then, adding the condition of "must have ammo to fire" without a clip system, would be, in pseudocode, ammoitem::onpickup %player.addAmmo(%type, %contents) gunimage::onfire if(%player.useAmmo("gunshells")) parent::onfire else tellPlayer("Not enough ammo") |
| BULLsEYE091:
--- Quote from: Uristqwerty on October 08, 2010, 02:00:41 PM ---I don't know if it is already done this way, but has anyone considered defining a few generic ammo functions and then simply using those? .hasAmmo(%type) .useAmmo(%type) .addAmmo(%type) .depleteAmmo(%type), each with an optional number, defaulting to 1 if ommited, and returning the ammount of ammo actually used/added/removed? Then, adding the condition of "must have ammo to fire" without a clip system, would be, in pseudocode, ammoitem::onpickup %player.addAmmo(%type, %contents) gunimage::onfire if(%player.useAmmo("gunshells")) parent::onfire else tellPlayer("Not enough ammo") --- End quote --- ok... sounds good, but im no scripter, ill need a confirmed and finished up-to-date ammo system |
| Munkey:
--- Quote from: BULLsEYE091 on October 08, 2010, 05:23:00 PM ---ok... sounds good, but im no scripter, ill need a confirmed and finished up-to-date ammo system --- End quote --- Space Guy's Is... |
| The Corporation:
what about the CnS firearms reloading system? |
| Navigation |
| Message Index |
| Next page |
| Previous page |