[Behavior] jj_Weapon

0 favourites
  • Peteer, you can use Mouse.click event from events-sheet and set Weapon.Shoot action

  • Thx,

    ill try it

  • It`s working thx.

    Any idea how can i count the bullets fired from a jj_Weapon?

    I use mouse button for firing (mouse->left mouse button is down).

  • never mind...I got it :D

  • awesome plugin!

    one "problem" though; i want the bullets to fire at an angle of weapon.angle + random(X,-X)degrees from the weapon but if the weapon changes its angle while firing, so will the bullets mid-flight =(

    anyway to get around that or like add a "spread" variable to the weapon?

    thanks!

    EDIT:

    think i fixed it, changed from "set angle" to "set bullet angle of motion to bullet.angle + random(10, -10) degrees

  • Hi all, I keep getting this error when i start construct 2 after copying this plugin

    'D:\Construct 2\exporters\html5\plugins\jj_weapon\': Found 'GetPluginSettings'global, but it is not a function

    This plugin will not be available in the editor.

    Please help

  • emutron

    Put it in D:\Construct 2\exporters\html5\behaviors folder.

  • Oh hey thanks ! works great now :) ... i feel silly for not seeing that before

  • hi again, I tried but i cant get the set bullet instance right, i'm not exactly sure how its done. I searched he forums and found this thread scirra.com/forum/how-i-can-create-instance-in-plugin_topic46254.html

    but i still cant get it to work

    Also i was wondering

    1) After assigning multiple weapons to a sprite how can i switch between them?

    2) Can this behavior be combined with the turret behavior to create enemies with complex firing conditions or even with the platforming AI code to give the non shooting enemies weapons in a much simpler way?

    I'm sorry if my questions seem a bit stupid but I'm not really a programmer and construct 2 is the first program of its kind that i've ever used, i hope i'll get the hang of it soon.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi, can someone please upload a capx example with the bullet instance ... Thanks in advance :)

  • Hi, can someone please upload a capx example with the bullet instance ... Thanks in advance :)

    Look at this games.baskovsky.ru/labs/construct2/jj_Weapon/jj_Weapon_Example.capx

  • I'm betting he never comes back to see that example...

    Neat plugin though, thanks!

  • Guys,

    i was using this Behavior in my project, and it worked perfectly and fit exactly my needs, but today i get a personal license and go right in to test it in CocoonJS, the problem is, when he loads the layout in witch i have the jj_weapon it froze the game and give me a message in the debug saying can't find variable: jQuery. After some testing i removed the behavior and it loaded the layout.

    Sooo, anyone have any info on this behavior, i don't know if behaviors can use jQuery...

    Is there anything similar? sice i will have to remake my game from start without this behavior to make all the gun functionality on events an etc..

    Regards

    Caio Branco

  • Awesome plugin. <img src="smileys/smiley4.gif" border="0" align="middle" />

  • 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)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)