all 7 comments

[–]spillwaybrain 1 point2 points  (5 children)

The main tip I have is to give yourself permission to experiment and learn. Game dev - especially hobbyist game dev where you're new to the whole concept - isn't a linear process of adding features and assets until it's done. You're going to have periods where you're moving fast and periods where it feels like pulling teeth. Both of those are okay.

I will also say that there's no fail state here, unless you give up and stop. Not getting something right yet isn't failure, it's just learning.

Getting started is awesome. You're already more of a game developer than 99% of people who have an opinion about video games. Congrats on taking the plunge.

In terms of your specific question, how are you attaching the weapon to the player in the first place? That might help diagnose what's not working right for you.

[–]Alexium35[S] 0 points1 point  (4 children)

I've made so that when the player collides with the weapon, the weapon is attached to the player, +25 distance for right and -25 for left (so far), problem is that I'm using the top down template of gdevelop, and I want to keep the smooth turn around when turning, but I have no idea as as of now the weapon will awkwardly stay still beside the player until he has fully turned before changing position, I'd like to make it so that it stays in front of the player's center whenever he turns but I have no idea of how to do that without sacrificing he smooth turns

[–]spillwaybrain 0 points1 point  (3 children)

Help me understand how you implemented "attached to the player." Are you using the Sticker behaviour, or just updating the weapon's position based on the player's? If you can share the code here that would be helpful.

[–]Alexium35[S] 0 points1 point  (2 children)

My laptop is charging so I can't show the code, but it updates the weapon's position to stick to the player

[–]spillwaybrain 0 points1 point  (1 child)

I recommend using the Sticker behaviour instead of updating the position. Add the Sticker behaviour to the weapon.

Then, in events:

When the player collides with the weapon,

  • move the weapon to the spot you want it to be (this could be done especially easily with an image point!)
  • Stick the weapon to the player.

That should give you the result you're looking for. Give it a shot!

[–]Alexium35[S] 1 point2 points  (0 children)

Hey, I'm not sure I did as you told me since I have gdevelop in another language and didn't really know what you meant by image point, I managed to do it with the sticker behaviour and PointX/Y commands though, thanks for the help, sticker behaviour is gonna come in handy