LuckyRawat's Recent Forum Activity

  • thanks brother

    thank you very much it really gud feeling getting problem solved

    i was about from two weeks in this point

    thank you once again

  • Foreach creates a loop that goes round and round for each x element it cycles through each line in the array.

    Condition allows us to restrict amount of lines/loops to a specific rule

    Our rule is x must be greater than 2

    Why 2?

    Because tutorial says if player attempts level he gets a 1, if he wins the level he gets a 2, if he wins and gets 1 star, he gets 3, wins and 2 stars, he gets 4 and if he wins and gets max stars he gets 5

    Its just a number.

    We know that 2 of the 5 is not stars so we want to subtract the 2 to get the remainder.

    Examples

    x = 3 player has 1 star 3-2=1

    x = 4 player has 2 stars 4-2=1

    x = 5 player has 3 stars 5-2=3

    So we loop through each x element that is greater than 2

    We add total x number to a total variable

    we also add 1 to count number of times it cycles (this is number of x entries that have stars.

    No we do the same. Total -2 = stars but I did it a litle different

    Total - (numberlevelswithstars*2)

    i have try this

    but result is below

    https://www.dropbox.com/s/ajsvwt1gxmhcd ... m.jpg?dl=0

  • thanks

    i'll try to grab it

    thanks again

  • seems complex

    can't understand

    i have to read this about many times to proper understand

  • here is the link

    i want to count total stars here

    https://www.dropbox.com/s/n9qq0r1s2rmlb ... .capx?dl=0

  • actually i want to count amount of stars in above linked tutorial

    i m new in construct 2 and not getting this point

  • In select level tutorial when we set array x to

    max(2+stars,levelsat(currentlevel)

    then if i want to sum all X values then how do i do it

  • one thing more i have try in this

    set "count stars" to max(stars, levels.At(currentLevel)) - min(stars, levels.At(currentLevel))

    by doing this

    suppose we play two time first we get 1 star and second time we get 3 star

    when we get 1 star, 1 is added to "count stars"

    when we get 3 star, then

    max is 3 and min is 1 = 2 added to "count stars"

    now updated "count stars" is 3

    but problem comes when we play 3 times and we gets 1,2,3 stars

    .

    1st time we get 1 star

    1 added "count stars"

    .

    2nd time we get 2 star

    2-1= 1 more added to "count stars"

    3rd time we get 3 star

    3-1=2 adding to "count stars" this is the problem

    because when we play 3rd time i want to deduct 2stars

    .

    but 2 is not "max" neither "min"

    i don't know how to fix it

    or may be their is any other solution available

    or i m going wrong way

  • Ok

    suppose I have 10 level

    i m getting star on each level as per<B>level select tutorial</B>

    i have put

    if "stars" are > 0 add "stars" to "count stars"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • yes i want total amount of stars

    i have did, but wrong, when level playing again

    suppose i get 2 stars and then i play again this level and gain 3 stars but it counting 5 stars.

    m not getting this point how to do this

    pls suggest

  • https://www.scirra.com/tutorials/311/level-select

    in above link pls anybody tell my how to count stars of each level

  • How to add chartboost and others in my game

LuckyRawat's avatar

LuckyRawat

Member since 27 Aug, 2015

Twitter
LuckyRawat has 11 followers

Connect with LuckyRawat

Trophy Case

  • 10-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x2
    Popular Game One of your games has over 1,000 players
  • x43
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

25/44
How to earn trophies