Unconnected's Forum Posts

  • I understand Pop and Push.

    I am having trouble understanding how to choose the bottom Y when trying to change values.

    I have a 2,1,1 Array. It is used to pre-select random numbers to prevent reloading to so the player can't cheat in the game. The game has to currently keep track of two random numbers.

    X0, X1

    What I would like to do is add a Function that will add a row to the bottom and change it.

    I will also have a Function that Pops the top row, I already know how to do this though.

    After adding a row to the bottom how do I then change the bottom row.

    X0, X1

    X0, X1

    Do I have to use a variable to keep track of the bottom row, or is there another way of just changing the bottom row?

    In the Parameters for Push I am not understanding what "Value" means. If I have two values on the axis why is it only asking for one?

  • There is usually more than one way to do anything in C2.

    The example you have could be done by variables or by an Array.

    While we would like to help we don't know the structure that you are using or have. We either need an explanation of how it is structured or we need a file.

  • TRMG That is basically the same thing as generating a random number, but it would take longer to change the odds. I think this is okay to do if you only have a few items, but I have quite a bunch.

    Yes, I am glad you brought that up. I was gonna go for weight. Where each one would get a variable for weight and then I could manipulate the pool of items easily, but this seems better.

    I was actually reading on loot drop practices. I probably wouldn't have made the connection of groups if you haven't mentioned it.

    I believe what you brought up would coincide with a dice role. The first dice roll (RGN) picks a group and the second dice (RGN) picks an item in that group.

    http://www.gamasutra.com/blogs/DanielCook/20141215/232300/Loot_drop_best_practices.php

    I also should point out that sometimes people cheat when they have a chance to get loot. They can save the game and keep reloading until they get what item they want..

    It is a good idea to store a random generated number or a few ahead of time to prevent people from reloading the game until they get the random number they want.

    Thanks guys. Input appreciated.

  • Thanks for the link. It was useful.

    When I first started the Manual was confusing to me. The problem I had was I didn't know some of the lingo used or I knew some of it, but didn't realize it applied to C2. Now that I have been using C2 for a while I can understand a lot of the manual.

    This engine always amazes me.

    You must get tired of posting links to the manual.

  • I am aware that I can do a Random Generated Number (RGN) in order to get a random number.

    I can take that Random Number and mathematically set the drop rate of an item using conditions.

    If the RGN is between 0 and 999

    Then I know 0-499 will be 50% and so will 500-999.

    When I have a low amount of items an enemy may drop, then it can easily be managed with a Random Generated Number. What do you do when you will constantly be adding to the list of dropped items. Every time you add a single item or change a single condition it changes everything. I should add that I am only giving one item out at a time. Is there an easier way to do this so I don't have to change every number in the conditions each time I add or change an item? I understand that every time you add in another item you change the percent of the other items. So if there isn't a way around this then I suppose I am looking for another tactic.

    I guess I am asking how to keep a fixed drop rate on some items.

    Does Random Number Generation tend to favor certain numbers over others?

    The only other thing I can think of is using an Array.

    Placing X amount of items into the Array to give each item weight.

    I would then select a random item.

    Similar to a sweepstakes or giveaway.

    ItemA will be put into an Array 10 times.

    ItemB will be put into an Array 20 times.

    ItemC will be put into an Array 1 time.

    ItemD will be put into an Array 15 times.

    Every time I put in a new item or adjust a number of entries the percent of every item changes. I was trying to avoid that but at least I won't have to adjust nearly every number. Using an Array seems to be going off of weight instead.

    Is this an accurate way of having a random item given?

    Would using an Array be more beneficial than RGN?

    I could do this without an Array, by using Cumulative.

    By adding 10, 20, 1 and 15 I get the max amount of entries.

    46 entries total.

    The random generated number is generated. Lets say 32.

    ItemA is 10.

    32 isn't equal or below 10.

    ItemA+ItemB = 30

    32 is not equal or below 30

    ItemA+ItemB+ItemC = 31

    32 is not equal or below 31

    ItemA+ItemB+ItemC+ItemD = 46

    32 is equal or below 46

    So the item generated is ItemD.

    It is a bit tedious, but it would prevent me from having to change a lot by making a simple change or adding an item. It would also prevent the need for an extra Array.

    I could probably set up a variable and just have it loop the correct amount of times automatically.

    I just need a small bit of guidance on how to do drop rates if the items that can be dropped will be increasing over time. Right now I have about 14 planned and I will still have more to add.

  • This happened to me as well. It most likely has something to do with me cleaning up files on my computer with a program.

    Luckily I had backups....

    Good reason to have it auto back up more than a few times.

  • Is there no need to free up RAM?

  • I know I am able to preload sound. I assume it goes into the RAM.

    After the sound is played does it automatically get removed from the RAM or does it slowly go away due to other things being put into the RAM?

    This question brings up other questions, these may be answered with the first question.

    If it is a common played sound is there a way to keep the sound in the RAM?

    If it is a very rare played sound do I need to ( or can I) remove it from RAM?

    How long does the preloaded sound stay in RAM if I preload it and don't use it right away?

    I am only assuming it goes into RAM.

  • lapinchatware Thank you for the Capx.

    It is what I was seeking, but I am not fully understanding the structure the Capx. is using. I am not sure what it is using an Array for and am not sure what the "gamedata" is being used for. Seeing how it works I now have an idea of how to do what I needed.

    From my understanding there is a small rectangle that has 5 different frames to allow 4 different sprite colors and 1 transparent. This sprite is rendered next to itself to make an illusion of a bar.

    It is given a spawn point for the small rectangles and renders it a certain distance away from the the spawn and the angle of the point changes an equal amount depending on the health variable. This creates the illusion of a circle using the small rectangles.

    Below may help performance for mobile devices.

    The Capx. file that was given uses 500 small rectangles in order to show a health bar circle.

    You can reduce this by using larger segments of the health bar and switching to smaller segments when needed. Having collision off when it isn't needed is good to do for any object.

    Also if you create/destroy segments as needed instead of having rendered objects as transparent then it will help reduce the number objects. No need in having an object on screen when it doesn't have a purpose.

    Another way is to use larger segments of circle, then you can rotate by a set angle to animate the bar. If you have 100 health you can divide 360 by 100 and know each health point to rotate the quarter segment by 3.6 degrees. Since a quarter is 25%, at 75 and 50 health you would know to erase a quarter segment to keep the flow looking normal. At 76 and 51 health you would have to create a quarter piece to prevent a gap between segments. The issue with this is the last quarter of the Circle bar would have to be small rectangles. You can replace the last quarter with small rectangles when it is needed or you can just make the last quarter small rectangles to start off with.

    If performance is an issue and you are just doing a line health bar you shouldn't use small rectangles. One object should be used and then it should be scaled depending on the health variable.

  • Yes 1607 is the anniversary update.. I had trouble installing 10 and I got it to install and had to patch-fix it a lot. It finally got so bad I couldn't install software so I had to reinstall 10 and got everything going again.. As soon as I get it set they forced 1607 on me and I had trouble installing that.. I finally had to download an ISO with 1607 in it and reinstall it for the third time..

  • DankP3 Thanks for pointing this out. It saved me some time. I thought I did something wrong.

    Ashley Thanks Boss. Keep up the good work. I love this software.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I didn't think to test it in other browsers, should have been my first though. I am glad you brought that up.

    I use Firefox and Chrome at the same thing for different tasks. It prevents me from losing all of my tabs and log-ins when a browser crash occurs. So I usually have 6+ tabs open on Firefox and 2 or 3 tabs open at once on Chrome. I use Edge to test/debug to have faster loading and eliminate the risk of losing my Firefox/Chrome tabs when I accidentally make a bad loop.

    I did test in Firefox 48.0.1, Chrome 52.02743.116 m (64-bit) and I couldn't cause the problem to happen.

    So the problem seems to be in Edge for me.

    Edge 38.14393.0.0

    EdgeHTML 14.14393

    I put both Edge and HTML versions for Edge. Mainly because I have never seen a program with a version and a language version. So I assumed both would be needed if anybody were to try to duplicate this.

    Windows Pro 64-bit version 1607

  • It was a full project but it still does it in an empty project with 'ScrollTo' and '8Direction' on an object. Nothing else.

    It has something to do with the keyboard.

    I added on-screen buttons and it doesn't do it with Mouse click or touch, but it still does it with key press during the same session.

    Since nobody else seemed to have brought this up it is probably just my configuration, I'm not worrying about it anymore unless it becomes an issue when exported.

  • I have an object that only has 'ScrollTo' and '8Direction' on it.

    I have

    Directions: set to '8 Directions'

    Set Angle: Set to 'No'

    Default Control: Set to 'Yes'

    Initial State: Set to 'Enabled'

    The object is supposed to stop moving when the arrow key is released. Sometimes after I release an arrow the object keeps moving for what seems like forever, and sometimes it just moves for a few seconds before it stops. If I tap any arrow key while it is moving on it's own it will stop moving. Also when I change directions by pressing/releasing a second arrow it sometimes goes straight for a small distance before adjusting it's direction, and sometimes it doesn't change directions at all. It will also get stuck going at an angle with no keys being held.

    This is also happening when I removed behaviors and only had events that adjusted the objects Self.X or Self.Y while an arrow key is being held.

    Right Arrow Down: Self.X + 6

    Left Arrow Down: Self.X - 6

    ...etc

    When a key is pressed it starts acting instantly, but it is acting like there is a lag between key being held and key being released or it isn't detecting it.

    What could be causing this since there is no other objects or events interfering or associated with the object I am moving? This gave me problems in a large project, but it is also happens in an empty project.

    I don't have a bad keyboard, I would have noticed it when typing or using other software.

    I have Release 233 (64-Bit)

    I need to know what could be causing this and a solution if possible.