math validating

0 favourites
From the Asset Store
Aliens are invading our planet! Solve the math question, and attack the alien with your laser. Covers addition, subtract
  • hi,

    i have a problem in my program. in my project i have wanted number(text) and the values are changing randomly. and down side i have few sprite images with same name and changing that also changing randomly and working fine.but my problem is the according to the down side numbers the wanted total has to come, because the wanted total 1st and 2nd random variables are having numbers to count.but for last numbers are validating. can any one help me please.

    dropbox.com/s/fnviyqpwc52troi/demo_num.capx

  • Hi Narasimha.

    I am trying to figure out what your problems is. But i am having a hard time understanding what it is.

    You ask for a "WantedTotal" and you show a "Current" value. You can then click on the sprite numbers to try and get the "wantedtotal".

    That seems to work for you. So what is the problem you want to solve?

  • hi cvp

       my wanted total and sprite number is working fine.but my autual problem is the last sprite numbers are not having the proper wanted total and for me upto the last sprite number the Wnated total has to come like countable.

    Ex:suppose if last sprite number having 9 the wanted total also has to be 9 , but for me it's coming like some other number. please share your ideas.

  • ahh.. ok.

    So the problem is that the wantedTotal asked for a number that is not possible to make?

  • yes cvp

  • Ok

    I dont have time to make you an example right now. If you cant figure it out yourself I can make an example for your tonight.

    But my approach would be:

    Instead of creating the wantedTotal from a random number. Create the number from the numbers you have available on the sprites in the bottom. So pick 1,2 or 3(depending on how you want it) random numbers from the sprites in the bottom and them add them together to get a new wantedTotal

  • thanks

       Now i'll go with your idea .i'll try it now.if possible for you send the example. thanks

  • I made an example.

    It might not be the most pretty example, but as far as i can tell it works <img src="smileys/smiley17.gif" border="0" align="middle">

    .capx

  • Thanks cvp

    in your example , you have taken local variable v=2, can you explain me what does it mean.

  • V is just a simple counter variable.

    It is set to 2 as that is the number of sprites in the bottom it adds together to make the wantedTotal.

  • thanks cvp

  • hi cvp,

       it's all working fine with it, but i have small problem in it. actually my wanted total few times displaying below 10. but i want random(10,20) to display in wanted total.

    dropbox.com/s/spqdg2fu5qniusa/r130_demo_31%20-bk.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • hi

       it's all working fine with it, but i have small problem in it. actually my wanted total few times displaying below 10. but i want random(10,20) to display in wanted total.

    dropbox.com/s/5hwbq801jz2ahku/r130_demo_31%20-bk.capx

  • hi cvp

    by giving v=3 i'm getting more than 23 , but i need in between the (10,18) .please help how get in between that value.

  • Thanks cvp that's fine working now.

        But i have got another problem in it. when the game is finished i have set it to next level where i have a text functionality for it.And i have taken 9sprite images

       It is like

       ->system WantedTotal=0 nextlevel textbox visible

           

              But the thing is before the wantedtotal=0 the nextlevel text box is getting visible(and it would be around wantedTotal 5 to 9) these text box is visible .What would be problem please help me.

    Note : i have taken only 9sprite images

    Thanks once again

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)