Ok. Now I has finished testing my second plugin-behavior. WEAPON! (about my first plugin-behavior you can read a funny message)
It make from your object a "real" weapon. You can add some same behaviors with different params for imitation more then one weapons on the object!
The object with this behavior have a clip for bullets and bullets in stock.
You must set the bullet name from your project by setting it from Events sheet by the "Set bullet instance" action.
*** Properties ([Name] = [default_value] ([comment])):
* Clip size = -1 (unlimited)
* Bullets in clip = -1 (unlimited)
* Bullets in stock = -1 (unlimited)
* Stock size = -1 (unlimited)
* Shoot interval = 100 (ms)
* Reload time = 1000 (ms)
* Auto-reload = "Yes" ("No")
* User control = "Burst" ("Single", "None")
* Enabled = "Yes" ("No")
* Shoot key = "" (for example: "32" or "spacebar")
* Reload key = "" (for example: "r" or "R")
* Weapon image-point = "0" (image-point index of sprite)
Actions, Conditions and Expressions you can see in C2 or in source of plugin :)
Installing: unpack folder from jj_weapon.zip to the behaviors directory of your C2 html5 exporters.
I'm new to C2, so please report bugs and write their suggestions on improving the capacity plug-in or upgrade code.
Maybe it would be better to insert a dropdown for keycode, instead of a text? But then it will be long ...