Lou Bagel's Forum Posts

  • You have very good work but I like your profile pic the best, ha, it makes me ashamed of mine . . .

  • ...after playing around a little with the grenades this actually makes me want to make a game with a totally destroy-able environment. Imagine instead of Toad a guy with a bazooka completely wrecking a city . . .

  • Sorry it took a little while, I was at work before.

    ...and I took a little time to make the capx fun (for me at least):

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

    I organized and commented everything to try and make it easy to follow but feel free to ask me any questions!

    Enjoy!

    *Note: The images were obviously taken from Mario 2. I hope that doesn't get me in trouble anywhere as this was only for learning purposes.

  • I'm not near Construct right now but I would wager

    On Space

    -Erase Tile: PositionToTileX(CharacterSprite.x), PositionToTileY(CharacterSprite.y)-1

    Or, if tile size 16 then PositionToTileY(CharacterSprite.y-16)

    I can take a look in Construct later and be more exact but that's the idea.

    Also, I would actually wrap it in a function so you can reuse it later

    On Space -> Call.Function("eraseTile", PositionToTileX(CharacterSprite.x), PositionToTileY(CharacterSprite.y-16))

    Function "eraseTile"

    -Erase Tile

    --X = function.param(0)

    --Y = function.param(1)

    But if you aren't familiar with functions start the testing without it

  • In the manual there is an action for erase tile:

    https://www.scirra.com/manual/172/tilemap

    So the only other thing you need is a reference of where your character is on the tilemap, which I assume the second expression on that page will work -> PositionToTile

    Then you would have to add 1 to the Y tile so it destroys the tile underneath the character's feet.

  • I was actually trying to help someone else answer a question for choosing a random animation. If there was a count expression you could simply do Play Animation: "Animation"&ceil(random(0, AnimationCount)) and name them Animation1, Animation2, etc.

    Yes, it is not that useful, as opposed to just counting yourself, but I always appreciate it when setup to avoid manual input and oversight, when adding/removing animations in this case.

    More specifically was thinking Idle animations so add a folder for all the Idle animations and name them Idle1, Idle2, etc and find a way to do a count for the animations in that folder

  • I'm not sure how to tell what is wrong but I check to make sure you have all of your settings and formats correct:

    https://www.scirra.com/manual/52/import-audio

    I'm not audio wiz, I've only used audio files a few times in Construct. One time though a file didn't have the optimal settings but I figured hey I'll try it anyway. It worked fine in my browser and I forgot to change it and later when pulling it up on my phone it made horrid noise (like a dial-up modem or a fax). I can't find it right now where I read what the optimal settings are but since the link I sent is part of the manual I assume the bits and Hz displayed in the image are recommended.

  • You could also do the same time of thing based on score, if you prefer it get harder based on that instead of time.

  • Could you just do:

    1st Key is down & 2nd key is down?

    And add the Trigger Only Once if you want it to only run once when both keys are down?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I know there is a AnimationFrameCount to count the number of frames in an animation but I didn't see anything like AnimationCount to count the number of different animations in a Sprite. Is there any other way to detect this? Or the amount of animations in a animation sub-folder?

  • I am in the same boat for a project I have in mind and oosyrag makes some good points.

    I haven't had enough time/energy/motivation/clear mind in one sitting to break down all the parts in the multiplayer tutorials/examples. It is high on my to do list though as I know I will want to use it eventually evin if not for the project I have in mind, so for me I know it is 'worth' doing.

    If you make the game without the multiplayer functionality first you will most likely have to start from scratch when creating the multiplayer version. But I may make a single player version first anyway to focus on the game play elements and making the game fun. I'm sure making a bunch of changes to optimize game play will be significantly more difficult with all the multiplayer elements involved.

    Good luck and I will let you know any tips if I get it figured out!

  • Old post but I have just started to play with these. They are found under the Touch object so add that to your project.

    Best advice I can give so far is to add three text boxes to your project and ever tick have them change to Touch.Alpha etc. Then preview over wifi to your mobile device and watch the values change as you tilt/move your mobile.

    I have gotten a sprite (character) to move around based on these but there are exceptions as in I have to be holding my phone a certain way. Hopefully I can figure out the events to not make it appear buggy to a user unaware of how it works—I doubt game players will like being told how they have to hold their phone in order for the game to work . . .

  • First of all make sure you have Touch added (do so in layout view).

    Then do something like:

    On Object Tap

    Apply Impulse

    Wait

    Apply Impulse in opposite direction

    If you are using Physics it will take some playing with to get it how you want. You mentioned impulse but if you want a gradual acceleration/deceleration you should use force. Impulse is like a ball hitting a bat or an explosion; Force is like a car/bicycle/jetpack accelerating.

    If I am picturing correctly in my head how you might want it to look try this:

    Add a instance variable to the object (numerical). I will refer to this variable as state but call it what you want.

    For our reference:

    0: inactive

    1: accelerating

    2: float

    3: decelerating

    On touch if state = 0 then change state to 1

    If state = 1

    If velocity < (desired velocity here) then apply force

    If velocity >= (desired velocity) then state = 2

    If state = 2

    Trigger only once -> Wait desired float time then state = 3

    If state = 3

    If velocity > 0 Then apply force in opposite direction or some other method to slow the object

    If velocity = 0 (or less than 0 if gravity taking hold) Then state = 0 (thus being ready for the touch even again)

    That's just off the top of my head so there might be a flaw in there but give it a try and let me know how it works

  • Thanks oosyrag

    I figured I would make a layer for each sub menu but was worried if I kept adding menu items that would be more and more layers. If I get too many I'll work on a spawning system.

    I won't need a dynamic menu for this project . . . but I'm sure I will for some project. Have you mastered a dynamic menu before? I'm assuming an array or multiple arrays would be the best option.

  • Not a game. Thought this might be useful for those that need randomly generated names (for example: zombie survival game where you randomly find another person to add to your party; random name suggestions for characters, etc.)

    I made this a while ago so a little rough looking and no frills added but serves its purpose as an example:

    Preview: http://www.loubagel.com/RandomPeople/index.html

    (click on sprites to see the randomly given names and location)

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

    In my example the XML Contains:

    Top 100 male first names in US

    Top 100 female first names in US (not used as I was too lazy to make female sprites)

    Top 1000 last names in US

    Most populous States cities in US (maybe top 250, can't remember)

    I took these all from internet lists I found, copied into Excel and converted to an XML file.

    Using random value between 1 and nodeCount it will randomly assign a name and location.

    For those not familiar with XML you can take a look at the path expressions here and that's pretty much all you need to know to use with Construct:

    http://www.w3schools.com/xsl/xpath_syntax.asp

    (boo W3schools all you want but best explanation I've seen for beginners)

    Let me know if I can clarify anything, any thoughts/ideas, or have any questions about it.

    I've found XML very useful and an organized way to deal with a lot of aspects: lines of text for the story or that characters say, enemy stats, instructions at beginning of game, even calling Construct functions from it. Just saying this as if you have any other XML related questions feel free to ask me.

    Hope some people find it useful!