How do I make a system that is modular + another thing

Get help using Construct 2

Post » Thu Mar 15, 2018 5:04 am

Hi, been working on a project a little while now and I'm having some issues. I'm making a platformer and the problem is that gun mechanics are very difficult for me to get working. I can make guns shoot with Bullet behaviors and spawning but mirroring and weapons are the bane of me.
How do I make multiple guns? I've set up different animations for the player but it really does not work and doesn't change the origin points and spawning. Is there an easier way to do this?
I've also had issues with mirroring. When the player is mirrored and shoots, he shoots both directions for some reason with the system I've made. I cannot figure out how to fix this.
Thanks!
B
8
S
1
Posts: 27
Reputation: 512

Post » Thu Mar 15, 2018 8:11 am

There are a few ways you can do this:
1. create separate animations for the character sprite holding different weapons.
2. Pin weapon to an image point (might need a plugin) or origin point of the character sprite. Mirror both the character and the weapon.
3. Set weapon position/angle/mirrored state on every tick to character's position/angle/mirrored state.

See this post:
viewtopic.php?f=147&t=201040

As for firing a bullet, you need to set bullet angle (or bullet angle of motion) to 180 when the character is mirrored.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
155
Posts: 2,199
Reputation: 82,479

Post » Thu Mar 15, 2018 9:37 pm

Thanks, I was able to get it working quite well. I just have one issue and that is bullets that have been spawned going to the right, when mirroring the character, come flying back at 180 degrees instead of going the direction they were originally in. You know how to fix this?
B
8
S
1
Posts: 27
Reputation: 512

Post » Thu Mar 15, 2018 11:48 pm

That's probably because you are mirroring or changing the angle of an existing bullet instance.
You should set the angle in the event where you create/spawn new bullet.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
155
Posts: 2,199
Reputation: 82,479

Post » Fri Mar 16, 2018 1:07 am

that worked really well. that's all the issues fixed and you've helped me learn a lot, thanks!
B
8
S
1
Posts: 27
Reputation: 512


Return to How do I....?

Who is online

Users browsing this forum: MaxM, ultrafop and 3 guests