How do I add this feature without being buggy?

0 favourites
  • 8 posts
From the Asset Store
In this template the music plays without looping in your game
  • So it's a bit hard to explain, but I'll try the best I can. I want to make a game in which you play as this ship and you have two cannons. Now you can equip different weapons on cannons, or the same one on both of them. I'm kind of struggling with doing so. As you can see from these screenshots prnt.sc/ulmynj prnt.sc/ulmyww I've made it so that when you click on the little box some buttons will pop up. One for equipping the weapon on the left, one for the right, and one for both of them (haven't made the both button yet)

    Now the problem is that most of the time when I'm trying to equip a weapon it seems like it's random what it does, and it's annoying me a lot as it's hard to find out what's wrong.

    Here is my event sheet for this layout, and on the bottom is a pic of the layout itself

    prnt.sc/uln154

    prnt.sc/uln1h0

    prnt.sc/uln2n7

    I should also point out that the layers Player, and Background has a parallax of 0, while Menu is normal, and the normal weapons on the left are on the Player Layer

    So I feel like the problem has to do with me selecting the weapon that's the closest to the Mouse, however I do not know how to do it otherwise

    I've struggled with this for some days and I could really need some help, thanks in advance

  • Weapon equip should be really simple. I looked at the screenshots and events and still don't know what's going on really. Better to send the project file or explain how the system works and can come up with a better way of implementing it.

  • Weapon equip should be really simple. I looked at the screenshots and events and still don't know what's going on really. Better to send the project file or explain how the system works and can come up with a better way of implementing it.

    Alright, here's a link to the file, I hope I did this sharing thing right, haha

    drive.google.com/file/d/1_3A062_GAV1xR_6_9oGyh1m2ygmzqiws/view

  • > Weapon equip should be really simple. I looked at the screenshots and events and still don't know what's going on really. Better to send the project file or explain how the system works and can come up with a better way of implementing it.

    Alright, here's a link to the file, I hope I did this sharing thing right, haha

    https://drive.google.com/file/d/1_3A062_GAV1xR_6_9oGyh1m2ygmzqiws/view?usp=sharing

    Also, I might add that there are some things there that was mostly used for testing and that don't do anything, so just ignore those

  • Hmm with the file I'm still not quite sure because it's in a test state. It seems to be very visual though relying on objects. You could use global variables to determine if something is equipped on the left or right of the player. And then you can use another variable for type, so equippedleft=Claw, equippedright=Claw etc. I don't quite understand the interface and the clicking and equipping but I would use variables anyway.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm with the file I'm still not quite sure because it's in a test state. It seems to be very visual though relying on objects. You could use global variables to determine if something is equipped on the left or right of the player. And then you can use another variable for type, so equippedleft=Claw, equippedright=Claw etc. I don't quite understand the interface and the clicking and equipping but I would use variables anyway.

    What do you mean by test state?

    And how exactly do these global variables work? I've never used them

  • You know the design of the game but I don't know so i'm not sure what the clicking of the placeholder squares is meant to do across the different bars. Global variables are for setting values used throughout the game such as player hp. You can use these for player upgrades, one for left and one for right

  • You know the design of the game but I don't know so i'm not sure what the clicking of the placeholder squares is meant to do across the different bars. Global variables are for setting values used throughout the game such as player hp. You can use these for player upgrades, one for left and one for right

    Alright I'll try to do something with these global variables

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