TRMG's Recent Forum Activity

  • dop2000 I have been using another program to make the animations and I would've copied the values from the program for each keyframe. But I think I will switch to Adobe Flash if I can export the animations automatically.

    Thanks for the advice!

  • dop2000 I see, I'll look for the tutorials.

    Also, if by prepare the animation sequences you are referring to how I set the values of the array, I was planning to copy each value by hand for each keyframe of the animation (not each frame) and use the time value to see how much I would need to move /rotate the object per tick.

  • dop2000 Could you go into a bit more detail on how exactly to do this?

    I'm not familiar with XML files or how to fill them into arrays.

  • Hey there, I'm currently trying to make a game like Dark Souls and I'm working on the animations (since that is a pretty crucial part of the combat system), but it didn't occur to me how may animations I would have to make for each weapon until now.

    If you're not familiar with Dark Souls, for each weapon class (sword, spear, halberd, etc.) you would have between 1 and 3 attack animations, 1 animation to return the weapon to it's idle state and then an idle animation with your weapon, rolling, running, resting at a bonfire, etc.

    And to make matters worse, the player could also wear 4 different armor pieces at once and a shield.

    I later saw a GDC talk (youtu.be/pmSAG51BybY?t=7m4s | Minute: 7:04 - 8:30) where he talks about splitting the character in multiple parts and having them rotate and position themselves based on a text file.

    So I was thinking how to implement this inside C2 and I thought of using arrays like this:

    The problem is that this would be quite tedious to set up (since C2 only allows you to change one X,Y or Z value at a time) and I would need one array like this for each animation, which would be quite a lot of arrays...

    So, do you guys have any suggestions on how to do this?

  • blackhornet I see... Alright then, thanks for the help!

  • blackhornet So it resets every tick?

    If it does, did this change happen recently? I remember using local vars to store information before...

  • (Solved) Hey, I seem to have some strange problem with the local variables in my project...

    If I write a simple code like this (in a new project, on R239, R244 and R247), the variable freezes at 0.1...

    ...but when I turn it into a global variable, it works as expected...

    I'm posting this here (and not reporting it as a bug yet) because I have had some strange small problems like these with my computer in multiple programs and I wanted to make sure it wasn't just my Pc first.

    So, does this happen to you guys too, or is it just me?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Like I said, you could use a loader and an invisible layer. When everything is spawned you make the layer visible and let players play.

    Anyway... I just finished the capx with the hexgrid.

    https://www.dropbox.com/s/ggk6caxje7i6m ... .capx?dl=0

    See if this helps. Cheers.

    Oh, so I would stop the players with a variable or something and let them play after the bases have been spawned. Got it now, sorry for being so slow...

    Thanks for the hexgrid capx!

    It looks a bit too much like it's on a grid for this project, but I'll keep it in mind for later ones.

    Thank you for the help!

  • brunopalermo It's very basic stuff, like if the spaceship is overlapping the blue circle, it applies a force towards the center of it and if it touches the base, it destroys the ship.

    But the base needs to be in place before the player can play, otherwise a base could spawn right in front of them...

  • You could spawn them invisible (or in an invisible layer)

    That wouldn't really work, as I need them for physics...

    Regarding the hex grid. I'll check a bubble shooter I have implemented that is built on an hex grid and adapt it. But I don't think I'll have it today...

    That would be awesome, thank you!

  • brunopalermo Thank you, it worked great!

    I got one problem with it tho, it seems not to spawn them all at the same time. Is there a way to make the game wait till it finished spawning them in?

    To stop the infinite loop problem, I think I'll check to see how many seconds went by since the start of the game and if and there have been like 3 seconds, I'll just stop the spawning. (Unless I'm wrong about this. This is my first randomly generated game, if you couldn't tell =D)

    Also, if it isn't to much to ask, could you show me an example of the hex grid?

  • Hey !

    Be aware that doing this by only checking random coordinates can be very long if the map is full or nearly full of bases. You can even make an infinite loop here.

    That being said, the problem in the events is that you take 1 set of random coordinates per cycle of the main loop. So in total, you take maximum NrOfBases coordinates, even if one random set is valid or not.

    The second problem is that, if it find any base that is further enough, then it decides that it is a valid position. Instead, it should be only if ALL bases are further enough.

    So you need to change the base loop here, by making it a while instead of a for, and by modifying you "validation" detection. The easiest should be to do something like this :

    EDIT ! I forgot the While in the main loop....

    Hi, sorry for responding so late...

    I tried your code (the one with the while loop), but the bases still spawn within that minimum distance...

    I then tried with MinDistance being less than "distance(Base.X, Base.Y, X, Y)", but that didn't load...

TRMG's avatar

TRMG

Member since 4 Dec, 2015

None one is following TRMG yet!

Connect with TRMG

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies