[Behavior] jj_Weapon

Post your completed addons to share with the community

Post » Sat Jun 29, 2013 10:26 pm

Hey peoples! How's it going?

First off, I love the aggregation of so many elements in this behavior that really compacts the number of events and variables in my project.
Thank you @JohnJ !

My main concern with this behavior is that when I have more than one instance of the same gun, whenever the gun is commanded to shoot, bullets only come from the first instance of the gun.

I don't know if it's because of the way I have it set up, but my head is aching at the moment and I want someone with a fresher mind that can help shed some light into alternative methods.

Here's the project I was talking about:
No map design & Shoooting activated.
Shooting deactivated w/ Map design (just for watching pathfinding work its magic)aznmonkeyboy2013-06-30 01:44:33
B
8
S
2
Posts: 40
Reputation: 2,136

Post » Thu Mar 06, 2014 11:23 am

Not working brings error
B
206
S
27
G
13
Posts: 1,834
Reputation: 35,776

Post » Sat Mar 08, 2014 8:08 pm

Cool. I'll have to try this out.
B
14
S
2
G
2
Posts: 96
Reputation: 1,093

Post » Thu Aug 21, 2014 8:49 pm

Im making a 2d shooter like Metal Slug, i can set up the plugin rigth, everything works fine when im facing right, but when i face left im having trouble setting the bullet angle.
Normaly if i werent using the plugin i would set the angle when the bullet is created depending on if the player is mirrored or not, but how do you handle this with the jjWeapon plugin? I tried the same method but all my bullets get mirrored =S
B
9
S
1
Posts: 73
Reputation: 716

Post » Sun Mar 01, 2015 6:29 pm

What are the codes for the controls?
B
4
Posts: 5
Reputation: 210

Post » Mon Mar 02, 2015 9:30 am

A small request: make it possible to change to x y offset for bullets so there'd be no need to set weapon's origin point or create a special box for jj_weapon.

EDIT: Whoopsy daisy,forgot to look at properties, looked into events instead! Btw is it possible to change image point for bullets via events?

EDIT2: Having problem with single shots. If I set up single shots, gun still auto fires.Had to make a workaround like
on mouse click - make a shoot.
B
78
S
23
G
6
Posts: 234
Reputation: 7,662

Post » Mon Jun 22, 2015 8:20 am

Plz Help !!!
How Can I Add Bullets To The Stock From The Event Sheet ????
I Can't Seem To Find It
OK,I Can Add Bullets To The Clip But Not The Stock
Any Idea ?????
B
7
Posts: 17
Reputation: 323

Post » Thu Aug 11, 2016 6:55 pm

Hello, I found you have a missing feature in your behavior. It doesn't trigger 'On Created' event.

I guess it is for performance, but you should enable it as an optional feature for guns with certain special bullets.

Here is a snippet to trigger the event:

Code: Select all
var inst = this.runtime.spawnInstance(this.bullet_instance, this.inst.layer.index, image_point, this.inst.angle);
this.runtime.trigger(Object.getPrototypeOf(inst.type.plugin).cnds.OnCreated, inst);


Just replace the line 231 with the above two lines.

Making this feature optional is simple, thought.

Thanks for this amazing behavior 8-)
Image
B
18
S
5
G
1
Posts: 5
Reputation: 1,512

Post » Mon Aug 29, 2016 7:36 am

@JeyDotC

Hi, i noticed that developer doesn't want to support this behaviour, could you add new features like changing 'User control' by events?
B
20
S
6
G
2
Posts: 173
Reputation: 2,762

Post » Mon Sep 12, 2016 4:40 am

I think you are right. I'll create a Github repository for my custom behaviors. A weapon plugin based on jj_Weapon will be my first one. 8-)

norman74 wrote:@JeyDotC

Hi, i noticed that developer doesn't want to support this behaviour, could you add new features like changing 'User control' by events?
Image
B
18
S
5
G
1
Posts: 5
Reputation: 1,512

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest