Unconnected's Recent Forum Activity

  • I knew it was like that for events and conditions, I wasn't 100% sure on Functions. Thank you

  • Is it a good idea to call many functions at once?

    If Clicked

    Call Function1

    Call Function2

    Call Function3

    Call Function4

    Does this complete Function1 before it calls Function2 or are all of them called as quick as possible, where Function2 could finish before Function1 if it were a shorter Function?

    It is working properly on my computer, but I am not sure how it would work on a weak device.

    Should I have 'Wait 0 Seconds' between each function to add a tick between each Function call?

    Thanks, in advance.

  • Gashapon seems useful but I need to control the outcome for this one.

    The group thing, I think that is called a dice roll.

    I am actually using it and seed due to gameglaux

    I thought I had it accurate enough before all of this. I ran some simulations and an item that was suppose to drop .08% was given 0% - 6% of the time in 1 of the simulations. I couldn't have that for some items.

    I now have a dice roll to select a group and in each group I have probabilities for each item in that group, very similar to what gameglaux and TylerMon suggested.

    I have a seed that is set to pick a seemingly random number between 1-100 and not repeat an obvious pattern or the same number until item 101 is looted. Even after item 101 is looted the pattern shouldn't be noticeable because the subgroup will seemingly have randomness to it.

    Using this I can be sure that every item group is selected properly.

    A 1% chance to get an item from the legendary group will always be 1 out of 100, no matter what.

    If I need to increase the drop rate of an item I can be sure that it is given out as intended, while still maintaining a seemingly random aspect.

    What I put in the legendary group will be 100% of the 1% of the group's availability.

    If I pollute the legendary group with 90% potions and actually 10% legendary items. Then getting a legendary item is 10% of 1% or 0.1%.

    Using a formula for subgroups then I can control what 0.1% means.

    By having an uncontrolled random it will translate to where 0.1% means every time you get a chance to get an item from the legendary group you have an actual 0.1% chance to get it. Meaning you will get 0-1 legendary item(s) in 100 loots. I would do this by having a random or unrelated controlled seed for subgroups.

    By doing a controlled random. It will select all the numbers 1 by 1 seemingly random without repeats until all values are used. This means opening 10,000(100x100) will give you 1 of every available item, this means 100 legendary items. This is done by checking the main seed number. If the same main seed is picked twice then it means the main seed ran 100 times. I can then change a variable for the subgroup seed. Using the main seed and the same math I can calculate that every value in the subgroup is selected the same way as the main seed. This means 0-100 will be selected in each subgroup without repeats until the 101st item from that group is looted. Meaning no subgroup seed value will be repeated until 10,001 items have been looted. When the 10,001 item has been looted then the whole pattern starts over....

    What I was trying to do before was trying to compare a placement in a variable and set a new variable to it.

    I don't think it is easily possible.

    Example:

    A random number would be 435

    I was wanting to be able to get:

    4, 3 and 5 from it and set it to variables in order to randomize other things.

    I was hoping for a wildcard type thing but I couldn't find anything.

    I though about doing math. It would be a lot of extra unneeded calculations and I'm not sure how to do it.

    The combination of dice roll and seed seems to be best.

    Thanks guys.

  • If I have an object that has an instance variable then it should have it already. There is no need to create a variable during runtime.

    I suppose if an instance variable won't be interacted with for a long time it is best to use an Array.

    If it will be interacted with often it is better to be a variable.

  • It is still part of the seed question.

    The more digits in the seeded number the less noticeable the pattern will be.

    If I can select a specific placement in the number than I can randomize anything in the game off of one seeded number.

    I want to compare values to 275268

    *****8 and *****268

    both would be true so it would trigger an event.

    * is wildcard.

    How do I do that?

    It is the same question as https://www.scirra.com/forum/wildcards-in-strings_t58257

    I am unable to open the cap file and not fully understanding the explained solution in the post.

    I even change the file type in hope it was a typo, but it didn't open.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a semi related question. I don't know what it's called so I'm not sure how to look it up.

    If I have a random number.

    275268

    How do I select a number from it to set it to a variable?

    How do I select 8?

    How do I select 268?

    Wildcard?

  • That does sound like a better idea.

    A seed is easier on the memory as well as more secure.

    I tried looking up how to use seeds, and couldn't figure it out completely, until I found this

    Https://cdsmith.wordpress.com/2011/10/10/build-your-own-simple-random-numbers/

    It is basically a formula that can be changed with a few variables.

    This allows the game to calculate repeatable randomness.

    The only issue is a pattern becomes noticeable if you limit the highest seed number to a lower number.

    11 would give you 10 numbers before a pattern is repeated.

    ***EDIT***

    The formula in the link reverses the Dividend and Divisor when it figures remainder.

    X*7 % 11

    1*7 % 11 is supposed to equal 4.

    This is proven by 7+4 = 11

    In link it does

    1*7%11= 7

    I believe this is done in order to keep the generator and it's calculation simple.

    In a spreadsheet I found out if you correct the Dividend and Divisor then the generator stops working.

    You end up getting stuck in a 0 or 1 loop.

    Also X can not be equal or a multiple of 11 (11, 22, 33, 44, 55)

    11%11 is 0 and will cause a 0 loop.

    22%11 is 0 and will cause a 0 loop.

  • Depending on how many inventory slots you have. The amount in the array should match.

    You should be equal to the amount of spaces in your inventory array.

    Then you should give every inventory slot an ID number starting with 0.

    Let's say your inventory is 5 spaces wide and 4 height.

    So with the Inventory ID it would look like his.

    00, 01, 02, 03, 04

    05, 06, 07, 08, 09

    10, 11, 12, 13, 14

    15, 16, 17, 18, 19

    If you have 20 inventory slots then the array should be:

    0, No Item

    1, No Item

    ...

    ...

    18, No Item

    19,No Item

    This is because 0 counts as 1.

    Using the info in the Array you can then make up the inventory.

    Make a variable that you can use to identify items.

    You can have Variable "Item"

    If the item the player picks up is a potion you can give the "Item" variable a value of "potion".

    After the value of variable "Item" is changed it should put it's value into the array.

    The array would be something like this.

    0, Potion

    1, Potion

    2, Stick

    3, Rock

    ...

    ...

    18, No Item

    19, Rock

    When the inventory array is changed you should update the inventory instantly.

    If the player uses the potion in Inventory ID 1 then you can grab that value and use it to change the value of that row in the Array.

    It was a "Potion" so now it should be changed to "No Item"

    You have to do this by comparing the used inventory ID to the Row of the Array.

    Inventory ID 1

    is the same as

    Row 1 in the Array

    0, Potion

    1, No Item

    2, Stick

    3, Rock

    ...

    ...

    18, No Item

    19, Rock

    If player picks up another Rock, check the Array for the first Row with the value of "No Item"

    Grab that Row number. That would be Row 1 again since the player used it the potion in Row 1.

    0, Potion

    1, Rock

    2, Stick

    3, Rock

    ...

    ...

    18, No Item

    19, Rock

    Every time you add a value into the the Inventory Array you should grab the Row ID it is being placed in.

    If the item is placed in the Array in Row 1.

    Then you should create the Rock Image in the X,Y location of the inventory ID of 1.

    When the Item needs to be used then you should delete that Image of that object and get the ID location of the Item and change the Array Value in that row to "No Item".

    If the player picks up an item you need to change the variable "Item" to what was picked up and then destroy that item. Insert it's value into the array. After it is put into the array using the "Item" Variable. Then you should use it's row to figure out where inventory ID it goes into in the inventory. Then you create the Rock image to the inventory ID spot.

  • Yes. All you have to do is contact them or visit their site to figure out costs and what kind of ad and the size that is needed.

  • While we are on the topic I have another question.

    Is there a difference in using instance variables to store in data over using an Array?

    To me using an array seems like it would be worst because instead of just having the info it has to look for it.

  • Thanks I got it.

    Basically the same I do with objects to figure things out like that.

  • Advertise using a platform like Google or Facebook. It is often cheaper than you would think.

Unconnected's avatar

Unconnected

Member since 6 Apr, 2016

Twitter
Unconnected has 1 followers

Trophy Case

  • 8-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies