lennaert's Forum Posts

  • RandomFellow

    Haha, yeah, that slowness effect was actually in the original game too, but there you had to move a cursor over the screen with a joystick aswell hehe.

    I updated the game, decreased the audio volume on the missles launch and reduced the ones on the building explode too.

    Thanks for the feedback :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Made this missle commander clone from back in the atari days, it was a bit of a test to check the scirra arcade highscore system.

    It works ^_^

    Missle Command in the Arcade

    Enjoy

  • suatozkan1987, Have you tried using the debug mode yet? (Ctrl+F5 or "Debug layout" button in ribbon)

    Using this feature allows you to see what the value of every variable is. Maybe, you'll notice something isn't changing that should be.

    It seems he experiences the issues only once it exported through cocoonjs.

  • Sorry, your capx has plugins I dont use (Rotate by rexrainbow)

    So I cant open your capx.

  • pls use a drop box or something not requiring a download manager to be downloaded prior to downloading your capx.

  • lev4 is number.

    Then there must be something in your code causing the problem, might be an ideaa to post a link to a capx.

  • add a variable, int(), timecheck.

    When you want it to record the first moment: set value timecheck = wallclocktime

    when your done, set the value again: timecheck = wallclocktime - timecheck.

    Voila, time difference between begin and end time.

  • How is the content of Lev4 build ?

    and are both int()'s   ?

    Perhaps check what datatypees are in there.

    Like, it will not work when you are trying to compare a text to an int.

  • Maybe add some more information about the game type your referring too.

    Seeing as there are quite some differences in animations for in example a platformer or a top down view or even isometric.

    btw, that last link didnt work for me.

  • Instead of saving to file,try saving to webstorage.

  • currentlevel = 3

    the < 6 is always true, as the value only triggers when its 3. (its a sub of the currentlevel = 3)

    The else should tigger when its bigger then 6, but that will never happen seeing as currentlevel is always three when it gets there.

  • check some tuts from allmarkmade.

  • Loop through them and indivudally check, if found, add 1 to counter.

    var: counter int() = 0

    event: for each sprite

    sub:

    event: compare animation frame not equal 0

    event: sprite is on screen

    subs action: add 1 to counter

    After the loop, the counter holds number of sprites which are on screen with their current animation frame other then 0

  • I think one of the ideas for the foundation of C2 is that the tools be as intuitive as possible. Having things that sudden don't work isn't a good idea.

    It wouldnt be sudden, as it would be in the manual, and in the webconsole.

    Though, one idea is to have another boolean for sprites for "Always maintain aspect ratio". But, it's easy enough to manually do that.

    This would generate the same issue you pointed out, it suddenly wouldnt work ? (changing width or height)

    Another idea, is that whenever your set scale for a sprite, then you can have an instance variable that keeps track of that scale. Thus a comparison can easily be done with that.

    These would be off if you changed only width or height.

  • By means of tokenat you can make tons of self made array approaches.

    simple approach:

    a text variable:

    you can create an array by using a comon character like a comma or pipe sign on which you can itterate through the sections.

    like

    text = 1,2,3,4,5,6,7

    tokenat arrays start counting at 0, so keep that in mind.

    tokenat(text, 0 , ",") = 1   

    tokenat(text, 1 , ",") = 2   

    etc

    This would all be sinle level arrays without keys, but straight up pieces of content.

    Extending this, making each piece alse have a list of options by means of a different comon character.

    text = 1,2,3,4 | 5,6,7,8,9 | 45,46,47

    This takes the second chunk of data from text:

    tokenat(text, 1, "|") = 5,6,7,8,9

    now, if I want the 8 from the second chunk of data, we simply nest the tokenat calls:

    tokenat(tokenat(text, 1, "|"), 2, ",") = 7

    tokenat(tokenat(text, 1, "|"), 3, ",") = 8

    tokenat(tokenat(text, 1, "|"), 4, ",") = 9

    this way it references single pieces from the second chunk, but you could easily loop through it:

    for each "looptokes"

    from: 0

    to: tokencount(tokenat(text, 1, "|"), ",")

    create text,

    set text tokenat(tokenat(text, 1, "|"), loopindex ,",")

    With the above approach, if you keep a uniform structure, like adding a question type first, then a question, then which of the following anwsers is correct, then some awnsers: either one or more. You have a full system that can dynamically expand as you add more.

    Or you could use objects having a text variable with these sets.

    example:

    obect questiontext, has instance variable awnser int()

    obect awnsertext, has instance variable awnser int()

    textvariable = multiplechoicetext,which is faster,0,train,horse,man|multiplechoiceimage,which color is red,2,image0,image1,image2,image3|inputquestion,how many cm are in a M,0,100

    The above variable shows examples of 3 type of questions.

    Looping through them with

    for each "looptokes"

    from: 0

    to: tokencount(textvariable, "|")

    sub of loop

    compare 2 variables

    tokenat(tokenat(textvariable, loopindex, "|"), 0 ,",")

    equals

    "multiplechoicetext" : action spawn questiontext, set text: tokenat(tokenat(textvariable, loopindex, "|"), 1 ,",") //Set question

    set questiontext instance variable awnser: tokenat(tokenat(textvariable, loopindex, "|"), 2 ,",") // Text instance variable now holds correct awsner

    set tempvariable: tokenat(textvariable, loopindex, "|") //use a temp to avoid loopindex issues in the next loop

    sub of compare

    for each loop to create the questions awnsers:

    from: 3 // First three entries were type, question and awnser

    to: tokencount(tempvariable, ",")

    action: spawn awnsertext, set text = tokenat(tempvariable, loopindex, ",") // sets the questions

    set awnsertext instance variable awnser: loopindex

    Onclick awnsertext

    compare 2 variables

    questiontext.awsner

    equals

    anwerstext.awnser

    action: awnser correct

    else: action: incorrect

    A bit advanced, but can work really well without any further extras.