mekonbekon's Forum Posts

  • You can create as many probability tables as you want. You need to set the table before using the AdvancedRandom.Weighted expression to generate a value from the desired table:

    dropbox.com/s/uyyh6ysseszs9qq/Advanced%20Random.c3p

    It would be nicer to be able to call the table directly from the expression itself e.g. AdvancedRandom.Weighted("Table1").

    I believe you can have multiple entries on the table with the same name, hence the requirement to state the weighting. Why you would want duplicates I'm not sure - perhaps because you can't change a weighting for an entry once it's been added?

    It would also be nice to be able to import a table from json rather than having to set all the entries as actions.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For homing bullets:

    Add the bullet behaviour to your bullet. Make sure "Set Angle" is ticked on the project properties.

    If you want you bullet to always target the nearest enemy, even if the nearest one changes, then do the following every tick:

    System condition: For each bullet, pick nearest enemy to bullet.X, bullet.Y

    Bullet action: rotate n degrees toward enemy.X, enemy.Y

    The greater the value of n the more the bullet will home in.

    If you have a lot of bullets and performance is suffering swap every tick for every t seconds and increase n.

  • Here's one way:

    1. Give the character a boolean variable: isIdle

    2. Add your idle animations: "breathing", "looking", "twitching" to the character. Make sure they're not set to loop.

    3. When your character is on the ground and not moving set isIdle to true.

    4.Add an event with these conditions and action:

    Condition: Character isIdle

    Condition: Character Compare Frame is equal to Character.AnimationFrameCount-1,

    Action: Set Animation to choose("breathing", "looking", twitching) from beginning.

    Remember to switch isIdle to false when the character starts moving or is off the ground.

  • Colludium Good to know, cheers!

  • This looks really cool Colludium, looking forward to trying it out.

    Is it compatible with this method for creating a "blobby" water effect?:

    construct.net/en/tutorials/create-water-games-2172

  • Awesome!

  • Tom

    An author page would be a great addition for collating, curating and sharing your portfolio, and easily exploring other devs.

    The "Suggested Games" list provides some of that access but a dev's games might get swamped out by other trending titles - perhaps a "More by this Author" list at the bottom of the game page would also be useful?

  • - When viewing game, the follow button allows you to follow author of game. Although haven't implemented notifications yet for when they publish a new game. On to-do list!

    Tom Will you be able to see a list of the devs that you are following on the arcade itself? Currently if I view a dev's profile I don't see any of the games they've uploaded. Will a forum member's profile be separate to their arcade page?

  • Cheers Tom, It's looking great so far! I'll upload a few of my games when I get the chance.

    Here's some initial feedback:

    1. As mentioned by , a back button from a selected game would be useful.

    2. An option to follow a dev so you can jump straight to their games would be really handy (plus notifications when they add new content).

    3. Is the "Top Games" selection determined by most upvotes/favourites or is it more complex than that?

    4. When you select a game there's no indication which categories the game belongs in. I'd also indicate if the game is WIP or Test/Experiment on the game page.

    5. Are games on the previous version of the arcade going to be automatically uploaded or is the slate being wiped clean?

  • Yes please, Tom - really looking forward to this :-)

  • I put this together, which should work for you:

    dropbox.com/s/gavzxhalnxdur6n/probabilityTable.capx

    The data is in a json array file in the project settings and I import it into an array object using the AJAX object.

    If you run the project in debug you can check the a_fish object and see that the probabilities have been added correctly.

    I've used percentage figures you supplied, but a bonus of this system is that you don't have to use percentages - you can use counts (10 of fish A, 6 of fish B etc) and it will still work fine, meaning that if you change the value for one fish you don't have to recalculate the percentages for the other fish.

    Each fish is a separate object as you requested, but if you had a single fish object with each fish as an animation then you could set the animation in a single event directly from the "fish" variable rather than needing an event to check for each fish object.

    In Construct 3 there is a probability table feature in the Advanced Random plugin which makes this very easy to do. Sadly there isn't that option for C2.

  • I think this may be the C2 demo created by R0J0hound for parabolas to a point:

    dropbox.com/s/sp4npl259hcudia/parabola.capx

  • Assuming that you are using each frame as a different piece, you can do it like this:

    1. Create an array with dimensions (12, 1, 1)

    2. Give the array a variable "n"

    3. Add the following events on start (or put in a function):

    //First set the values of the array to 0-11, one for each frame.

    Array | for each XYZ element : Array | Set value at (Array.CurX, Array.CurY) to Array.CurX

    //Shuffle the array

    System | For "i" from 0 to array.Width-1 :

    >> Array | Set n to floor(random(Array.Width-loopindex("i")))

    >> Array | Push back Array.At(n,0) on X axis

    >> Array | Delete index n from X axis

    //Assign frames to the pieces using the shuffled array values

    Pieces | Set Animation Frame to Array.At(self.IID)

    To be able to use the IID in this way to assign you shouldn't have any other puzzle pieces in the scene. If you do need additional pieces in the scene for some reason, then instead give the piece sprite a variable e.g. pieceNo, number the pieces 0-11 and use that pieceNo instead of the IID.

    Hope that helps! :-)

  • Been having the same problem for a while now, somehow missed this thread. I also install the latest C3 beta as a desktop app, and have to go through the rigmarole of uninstalling and reinstalling updates in order to get them to stay updated.

    I agree that it is confusing to receive the "update success" message only to have the version revert next time you open, especially when you also receive "downloaded, ready to use offline" notification as well.

    If part of the problem is beta and stable releases use different URLs, so if you're using beta then your URL is not going to point to the latest stable, when there is a new stable release couldn't the beta track be updated to match it e.g. if there is a stable 100, create a beta 100.0?

  • Hi mekonbekon

    Thanks for your reply and it really helped me to understand these words, still there are some points

    1) I got understand Threshold complete and no confusion.

    2) Now I understand what is Permutation but a little confusion

    > For example a length of 3 with an offset of 1 will generate the numbers 1, 2 and 3, and then randomly shuffle them.

    according to above line I understand that offset of 2 will generate the number 1,2 and 3 and then again 1,2 and 3 and after this randomly shuffle. I mean if offset is 1 then there will no randomness for the first time and if offset will be 2 then there will No randomness for 2 times and then after than random will start. Am i right ?

    No, the offset determines the starting number for the permutation table so, a length of 3 with offset 2 will shuffle 2,3 and 4; an offset of 5 would shuffle 5,6 and 7 etc. The numbers in the table will remain in that order from the initial table creation until you use the "shuffle permutation table" action.

    3) From your explanation about seed i understand that if seed will be 0 then each time random sequence will be different but if seed will be 1 then first random sequence will be repeated for all next sequences. Am I Right?

    Think of it like this: when you pick a random number it does so from a very large list of random numbers - this list is fixed and unchanging; the seed says "start reading numbers from this point in the list". If you use the same seed then it will always start reading from the same point, so you get the same (pseudo-)random number sequence each time. If you don't add a seed value then it will start reading from any point in the list, so you'll get a different sequence each time.

    Note that you don't have to use a number for this list - it can be a string, so if the player has entered a character name (for example) you could use that to always generate the same random number sequence.