2015-03-08 00:52:54 (edited by Genroa 2015-03-08 13:42:26)

First, I have to say something : I didn't post this in the "new releases" section because it is aimed to developers, this is only a technical demo.

This demo will let you trying some weapons I just added in the HeatEngine (two in fact, a gun and an assault rifle). Please also note that excepted for loading/saving mechanism, all the weapon behaviour can totally works as a "standart" class, ready to play the role of any kind of weapon from knife to bazooka.
If you want to take a look at them, look at HeatEngine\Actors\Weapon.bgt for the general behaviour, and HeatEngine\Actors\Gun.bgt and HeatEngine\Actors\AssaultRifle.bgt for subclasses weapons. smile

Use ZQSD/WASD to move, Y to shoot, T to reload. 1 and 2 keys to switch between the two weapons.

Included mechanics:
- ammunitions management : no use for melee weapons, 1 per shot for ranged weapons
- reloading type : default to just refill used ammos in clip, realistic to discard all remaining ammo in clip and take a new one
- preparation time (for gatlings for example, preparation time should be zero for anything else)
- usingTime (equals to rate of fire for ranged weapons)
- you can chose the number of uses, how much points a use of the weapon takes (1 for ranged weapons, 0 for melee usually) and the size of the "uses clip". "Uses" are basically the number of ammunitions for ranged weapons.
- easy to override methods like "reload", "triggerWeapon", etc.


Download link (4Mo with sounds) : https://www.dropbox.com/s/yopt0yxpohwq0 … o.rar?dl=0

Any questions and comments are welcome smile

NOTE : theses weapons DOESN'T shoot any bullet or anything, they are just made to show weapon behaviour! To have weapons really shoot in your games, you have to override the method createEffect called when the weapon consume a [useCost] of uses!

NOTE 2 : all given sounds are only for demo purposes (moving sounds are just a mess)

2015-03-12 20:19:53

Cool.

“Can we be casual in the work of God — casual when the house is on fire, and people are in danger of being burned?” — Duncan Campbell
“There are four things that we ought to do with the Word of God – admit it as the Word of God, commit it to our hearts and minds, submit to it, and transmit it to the world.” — William Wilberforce

2015-03-12 21:43:03

As you can see, the program file is around 15 lines long. smile