Octopus tophat's Recent Forum Activity

  • how is the glowing done in CC?

    I can't PM you because I don't have enough reputation points. I'm not using construct anymore, I'm porting my game over to game maker studio, so I probably won't be on this forum enough to earn enough rep points. I'm also on youtube/twitch/tigsource. I also can't send links in this message, cause of my rep. So just look up octopus__tophat on twitch, 2 underscores, not one, and give me a pm

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could use a loop.

    Just use while(stat_points>0) and tell it to add points to a random variable.

    To do this, you can have 2 global "temp" variables. For each loop, set temp1 to a random value, then under the loop, compare temp.

    while

    stat_points>0

    always set temp1 to random(2)

    always set temp2 to random(10)+1

    if temp1=0, set STR to temp2

    if temp1=1, set SPD to temp2

    always subtract temp2 from stat_points

    With this, stat_points could end up being negative and the sum of all stats could be greater than 100. If you want to make sure it equals exactly 100, you could limit the value 'temp2' gets by clamping it.

    ex. set temp2 to clamp(random(10),1,'stat_points')

    Temp1 is the variable it's giving points to. Temp2 is the how many points it gives that stat.

    This will just keep allocating points to different stats until there are no more points left.

    This will scale to any amount of stats, unlike the solution you came up with.

    To make sure this only happens when the object spawns, I use an "initialized" flag on all objects. Make the default value of this = 0. Then test if initialized is 0 before doing the loop. When the loop is over, or anything else regarding initializing the object is done, set initialized to 1.

    Temp variables are very useful because they can be used for anything. Lots of times you just need to temporarily use some variable to count things in a loop.

    You can also point to different variables if you don't want to test temp1, say for example, if you have like 25 different stats, but you shouldn't need to worry about that.

    This is how I'm making random weapons/armor pieces in my game.

  • I've been working on a roguelike game for more than a year now. It takes a lot of inspiration from towerclimb.

    I'm a massive fan of towerclimb, so I starting getting friendly with davioware, and eventually I was inspired to make my own game with construct classic. He's helped me a lot with problems I've had during development, so I'm giving him lots of credit.

    Cool apparently I can't post links. Look up "Rogueworld tigsource" on google.

Octopus tophat's avatar

Octopus tophat

Member since 18 Aug, 2015

None one is following Octopus tophat yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies