VIKINGS's Forum Posts

  • I took a look at your capx Colludium but I didn't understand what it was supposed to teach me or what it was adressing....

    Anyway a friend of mine solved it!:D Apparently in order to get that type of wave movement you have to add the sine behavior twice to the same object, once for the horizontal and once for vertical. Then you play around with the values of each and you can get a movement pretty much exactly like in that graph. Olso the physics behavior is still there, and so far there doesn't seem to be any conflicts, yaay.

    P.S. WTF happened to the forum?!?!?!? Is it a bug or did they change it? And if they did change it how can I revert back to the old one please?!

  • Then how could I achieve that type of movement while keeping my physics behavior?

    Oh, and fyi blackhornet , the sine behavior does seem to work fine alongside the physics behavior when it comes to a simple, continuous back and forth motion on a single axis.

    That is what I did first, and once I saw that worked, I assumed the wave motion would work as well, but like I said above, I can't seem to get that one to work....

  • Hello World,

    Can I use the sine behavior go get a bunch of objects to actually move in a wave pattern like seen in the first graph of this picture(that the manual links to by the way)?

    Cause I've been playing with this behavior for about 30 mins now, and I can't seem to get that result no matter what combination of settings I choose in the properties of the behavior.

    Thank you.

    LE: And if the answer is "No, you can't do that with the sine behavior." Does anyone please know how I could create that effect myself with events?

    LLE: In case it matters I guess I should olso tell you that the objects that I put the sine behavior on olso have the physics behavior, could there be some sort of conflict between the two?

  • Then make a different sprite(doesn't matter what, can just be a box of any color) put it on top of the player and pin it to the player. Then add the camera effect to that box.

    I think the "How to make a platformer game" tutorial covered that, so check it out.

  • There are multiple ways of doing this, id say it depends on what you are specifically after and how the rest of your game works.

    Here's another way: open C2, click start a new project, scroll down and choose Template: Auto-runner. See if you like how it's done there.

  • Why are you even using a bullet instead of a normal movement?

    Just do On z pressed set x to self.x +2

    and On x pressed set x to self.x -2

    Replace 2 with whatever value you want.

  • Yeah, I forgot about the instance variable. I suppose I could use it to give each spritefont object a unique id, and then put those ids into another array and then correlate the 2 arrays to get the desired effect....

    I'll give it a try, thanky you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'd olso recommend taking a look at this. It helped me out much more then the tutorial RayKi linked to.

  • 1. Get cranberrygame shareapp plugin(search the forum) add that plugin to C2 and then to your game. Once added to your project select the shareapp plugin and modify it's properties, include the links you want.

    2. Then grab a twitter icon from here, don't forget to read their guidelines.

    3. Then add event on touched(or clicked, whatever) twitter button action share app via twitter.

    You can use this plugin to share on facebook(and other things) too, just repeat steps 2 and 3 for each one. Enjoy.

  • Problem is that doesn't always work frozenpeas , I tried it and it was buggy. But cranberrygames plugin(which does the same thing as that checkbox) seems to work flawlessly.

  • Hello World.

    Ok, this might get dizzy so sit down and bare with me please.

    My game has 50 levels and 3 difficulty modes, so I use an array to store the score for width(51):LevelNumber and height(4):Difficulty(I use 51 and 4 becaue I don't want to store at 0,0). "LevelNumber" and "Difficulty" are global variables.

    We have 3 layouts:

    • Main: where you have start game, options, quit, etc. (this is where the game boots up)
    • LevelSelector: where you choose what level you want to play and the difficulty (you are taken here when you press "Start Game" on the main layout)
    • Level 1: the first level of the game

    Now on the LevelSelector I have sprites for all the levels, each sprite has 4 spritefonts on it as follows: first spritefont-the level name, second spritefont-"Easy: ", third spritefont-"Medium: " and forth spritefont-"Hard: " . The layout olso has 2 list objects, one to select your level and another to select your difficulty and another sprite(button) when you press it, it takes you to the selected level and difficulty and sets the global variables for those.

    So you play a level(all levels share the same event sheet) and at the end of the level I have event: If the array value at(LevelNumber,Difficulty) < Score then action set value at(LevelNumber, Difficulty) to Score.(score is another global variable)

    The problem is that now when I come back to the LevelSelector layout, if I want to show those scores I have to create on start of layout a different action for each spritefont!!!!.... so 50 levels x 3 difficulty modes=150 actions....

    Imagine on start of layout:

    Level1Easy(a spritefont object) | Set text to "Easy: " &Array.At(1,1)

    Level1Medium(a different spritefont object) | Set text to "Medium: " &Array.At(1,2)

    Level1Hard | Set text to "Hard: " &Array.At(1,3)

    Level2Easy | Set text to "Easy: " &Array.At(2,1)

    ....

    ....

    ....

    Is there a way to make this retrieval easier without using soooo many actions? Idealy I would want at start of layout to read the variables LevelNumber and Difficulty(which have been set by the level you just played) and then modify the correct spritefont that is chosen based on the number of those variables.

    So what do I do, create a second array for the spritefonts? But then how do I put objects in the correct place in the array without again having 150 events telling C2 what object corresponds to what value.....

    I've been sitting starring at the screen for about 1 hour now and I can't figure this out.....

    Maybe I am overthinking it? Does it even matter(performance wise on mobiles and tablets) if I have so many actions on a start of layout event requesting things? Cause if it's just a "cleaner code" issue I could live without it....

    Thoughts, suggestions?

    Thank you.

  • Do a forum search and get the PhonegapStatusBar plugin by cranberrygame. It does exactly what you want.

  • Ok, cool. Thank you very much guys.

  • Ok blackhornet one more time just to be clear, so I add one just to the width, or to height as well?

    Lool sorry frozenpeas but what you wrote there didn't really help with my confusion.

  • Set animation to random(B1,B2,B3,B4,B5)?