[Behavior] jj_Weapon

Post your completed addons to share with the community

Post » Mon Dec 25, 2017 6:08 pm

Hi all,

I just made the Set bullet instance optional.

Download | Source code
Image
B
38
S
9
G
1
Posts: 18
Reputation: 2,490

Post » Wed Dec 27, 2017 2:35 pm

@JeyDotC
Awesome. Really useful change.

Another thought I had, it is not something I need but I think the ability to set the number of bullets that would be shot on the 'on shoot' action would be a neat addition. As in, 'on shoot' > shoot X bullets. As it is you can't do a shotgun type weapon that shoots a set number of rounds at once.
This might be a bigger task to implement I think.
B
18
S
5
Posts: 149
Reputation: 1,626

Post » Wed Dec 27, 2017 3:03 pm

There's a simple solution for that.

Instead of making the shotgun shoot the shells at once:

1. Create an invisible sprite, let's name it ShellSpread.
2. Set several image points around that sprite.
3. Listen to the on created event of the ShellSpread and create the needed shell instances at different image points.

I use that trick on my template.

BTW: One of the next things I will possibly do is to add a 'cancel reload' action, because switching weapons while reloading is causing me problems.
Image
B
38
S
9
G
1
Posts: 18
Reputation: 2,490

Post » Thu Dec 28, 2017 3:47 pm

@JeyDotC

Thanks, will use that. Looking forward to the changes.
B
18
S
5
Posts: 149
Reputation: 1,626

Post » Sat Feb 03, 2018 11:48 am

@JeyDotC

I have a small request. Is it possible to have an action that sets the 'shoot key' by keycode during gameplay? At the moment you can only set the shoot key via key keycode in the C2 editor. I need an option to set the shoot key during gameplay via keycode which can't be done at the moment.
B
18
S
5
Posts: 149
Reputation: 1,626

Post » Thu Feb 22, 2018 4:18 pm

Long time no posting things here. Just wanted to let you know, I added two new features to the behavior:

  1. Added 'Set bullet instance by name' action which allows to set the bullet instance by passing the object type name.
  2. Added the getLastShootTime expression that tells the last time the weapon was shot. I'm pending to add the condition.

And there's a third work in progress feature: The cancel reload action which triggers the reload canceled event. The feature is implemented, but I haven't tested it yet.

I'm doing this alpha release because I thought you could find it very useful to have the 'Set bullet instance by name' action. :D

Download | Source code
Image
B
38
S
9
G
1
Posts: 18
Reputation: 2,490

Post » Thu Feb 22, 2018 4:41 pm

Fine stuff. Thanks for the update.
B
80
S
29
G
176
Posts: 243
Reputation: 94,137


Previous

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 11 guests