kroftek's Recent Forum Activity

  • Man, C3 sometimes really is full of surprises. How come I overlooked this one? Thanks for the heads up.

  • Let's say I'm making a top-down, turn based RPG (or roguelike/roguelite/whatever). So upon first entering a particular level, all the items, monsters, etc., basically all interactable items are set and ready to be interacted with. So, say I pick up some items and kill some monsters (not all of them), and then I exit the level, and go try another one. When I come back to the mentioned level, the items and monsters with which I interacted shouldn't be there anymore. Basically the state of every level is saved every time I exit it and reloaded when I come back again. I do have several ideas on this, but I'm not sure if those would be the way to go, or would those be too demanding resource-wise, or just require massive additional time to set it up properly, but maybe there are more experienced people on this matter, so my question is, what is the best way to do this? Am I missing something easy along the way?

    Tagged:

  • I was wondering are there any ways to sort an array by an particular column, something like a sports league table where the teams are sorted by points?

  • Am i missing something, or is the array editor not available in the beta?

  • OK, I did it, but can I go anywhere from here? Can I make a way that any values are added and somehow saved in the array, so the next time I add a value, it just adds up onto the existing one?

  • It doesn't restart the layout; persist? never heard of it so far; using global variables would be too much, because eventually the number of teams will be increased, and that would make A LOT of global variables...although i don't know about instance variables...every team has stats in those variables which are then updated in the array, or vice versa...but how would I connect them? Also, I've never worked with webstorage, so... looks like I'm more than useless ATM

    OK, so ANYONE with experience in working with arrays, webstorages, etc., please take a quick look at this capx (~20 events), and try to tell me where I'm wrong and what could/should be fixed (currently the match scores are Set to XY in the array)...

    Open it up in debug, left click the team to select it as Home team, and right click for Away, and watch the ''teams'' array and then simulate the match...it's a bit confusing at first, but it goes in this order - team index, team name, matches played, wins, draws, losses, goals for, goals against, goal difference, points, unused slot

    As I said, I need some way to store the data to the array when the match is simulated, so that when I click simulate again, it just adds the new data onto the existing one...

  • I'm currently doing it like that (I suppose Self.CurValue + whatever is the same), but I need a way to tell the game that it doesn't reset the scores everytime I press Simulate match, I want it to keep them and then just add on anything onto it...

    I don't know, if you want, I can provide you with a capx (it's not too complex) so you can have a better look into it and possibly figure out the solution...

  • Push or insert? I don't see how can that work...

    If I didn't make myself clear, here's the most basic rundown possible:

    Team A is playing against Team B.

    In the array, Team A's points stat is set at X 9, Y 0, while Team B's is at X 9, Y 1.

    I've made a system where it is known who plays against who, and when a match is simulated, it applies, for instance, 3 points to the tem that won.

    But, I want those 3 points to stay in the table, and when I simulate the match again, I want (in case that team wins again) those points to be ADDED to those 3 already, so it of course totals 6, and so on, and on, and on...

    Get it? Points are just added to the tally every time I simulate a match...

  • OK, I might be on a trail to something. I have an array filled with 4 teams and their stats. Whenever a certain team is picked, it sets the global variable to either ''globalhome'' or ''globalaway'' which is then easy to apply the post-match data (for instance, wins are written to (x, ''globalhome''), etc. BUT, I would like to know - how can I ADD the data to the array, instead of setting it? For instance, I've simulated a match, and it sets the data to their respective cells in the array. But, when I simulate it again, it erases the old data and writes down new data (I suppose it's because of the Set at XY action)...

    I want that any data that gets written to it is actually added to it. Is there any way?

  • Anyone? :/

  • > First of all, if you have the time and you're by any chance a football/soccer fan, I would like that you give this game a try:

    >

    > (since I don't have 300 rep points, I cannot post an URL, so please google Soccer Cards PC, on manwithnomouth.com - latest version 1.42)

    >

    > It's a pretty fun game, mostly involving luck but sometimes even skill.

    >

    > Now my question is - can it be made with C2?

    > At first sight, the game doesn't look that complex, the graphics are primitive and would be easily made with C2, but my main concern is generating the match outcome, and generating the schedule of the matches.

    >

    > Let's say that I have 4 teams to pick from, and I pick 2 that will play against each other. I've made 2 so far, and it works (both teams have inst. variables for matches played, wins, goals scored, points etc. which are at the end transferred to their respective cells in the array). But what if I want, let's say Team 2 vs. Team 4? How will I tell C2 that these teams are playing, and apply the post-match data to their variables? I'm thinking of a solution all day long, and just can't put my mind to anything. I was thinking of 2 slots, like ''opponent 1'' and ''opponent 2'', and then pick teams that will fill those slots, but how will the variables be handled still baffles me. I don't need any complex brainstorming, just a push in the right direction from someone who is more skilled with this tool.

    >

    > (Also, if you have already tested the game a bit, please take a look at some of the aspects of the game, most notably the Schedule, and possibly give me a slight hint or opinion how things should/could be made).

    >

    > Thanks in forward!

    >

    From what I read, it seems you are already in the right path

    Your idea on 2 slots will work, handle the instance variables like you've done before, you should be ok!

    Look at Array.IndexOf expression, you'll be using this quite a lot to update post-match data. I can relate this to my CCG project, the combo of Array.At(Array.IndexOf("variablesXXX"),variablesYYY) is pretty darn useful in cases like this.

    Jeez, my brain is still useless I don't get it, and I don't know if the right path is the appropriate expression currently...

    OK, I'll try to explain this as best as I can.

    So far I've made 2 teams, both of them have instance variables for the matches played, wins, draws, goals scored etc. and are registered in the array, each team updates its stats when the match is simulated because it's set to run every tick. It's just Team 1 vs Team 2, and 2 global variables which represent the score. Based on that variable, the stats are applied to the teams in question.

    So now (you've guessed it), I would like to take a step forward, and introduce a selection list of let's say 4 teams. Then I'd pick Team 2 and Team 3. But I just can't figure out clearly how will the game know who's playing, and to whom should it apply the post-match data at the end. What is the most less-painful way to code this? I mentioned the opponent 1 and 2 slots, but how would I apply the chosen teams (teams 2 and 3 in this case) to these slots, and how should I handle the score variables, so that at the end of the match, the data is applied to the teams that played?

    I must mention that I'm very new at arrays, I just recently started working with them, so don't be too harsh on me I really like this game, and would like not just to remake it, but to improve it in many ways possible, but this is one of the major problems for me that needs to be solved.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • First of all, if you have the time and you're by any chance a football/soccer fan, I would like that you give this game a try:

    (since I don't have 300 rep points, I cannot post an URL, so please google Soccer Cards PC, on manwithnomouth.com - latest version 1.42)

    It's a pretty fun game, mostly involving luck but sometimes even skill.

    Now my question is - can it be made with C2?

    At first sight, the game doesn't look that complex, the graphics are primitive and would be easily made with C2, but my main concern is generating the match outcome, and generating the schedule of the matches.

    Let's say that I have 4 teams to pick from, and I pick 2 that will play against each other. I've made 2 so far, and it works (both teams have inst. variables for matches played, wins, goals scored, points etc. which are at the end transferred to their respective cells in the array). But what if I want, let's say Team 2 vs. Team 4? How will I tell C2 that these teams are playing, and apply the post-match data to their variables? I'm thinking of a solution all day long, and just can't put my mind to anything. I was thinking of 2 slots, like ''opponent 1'' and ''opponent 2'', and then pick teams that will fill those slots, but how will the variables be handled still baffles me. I don't need any complex brainstorming, just a push in the right direction from someone who is more skilled with this tool.

    (Also, if you have already tested the game a bit, please take a look at some of the aspects of the game, most notably the Schedule, and possibly give me a slight hint or opinion how things should/could be made).

    Thanks in forward!

kroftek's avatar

kroftek

Member since 4 Dec, 2013

None one is following kroftek yet!

Trophy Case

  • 11-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

13/44
How to earn trophies