Lou Bagel's Recent Forum Activity

  • 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 . . .

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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!

  • There is a plethora of effects to choose from that come with Construct 2—I haven't really used any.

    I was hoping to make an open thread where people can post rather simple effect techniques they find useful.

    Simple: so those new to effects like me can grasp and try out quickly

    Useful: as in describe the circumstance/situation you have used it in or the desired effect you were looking for. The effects all have descriptions in Construct so it is not an explanation of effects that would be helpful but practical circumstances to use them (where they would add value visually).

    Examples:

    To show which option in a menu is selected you can use ___________ effect to highlight the text/sprite.

    In a Multi-player game you can use the color replace effect to make each team a different color using the same sprites.

    I have seen some threads on more advanced effects but not for beginners.

    I know I can search out specific tutorials/forums if I have a desired result in mind, but I was hoping this to be more of a thread to browse and find something that makes you think "oh! I haven't thought of that!"

    Please share any tips and tricks you have discovered in hopes that many find this thread useful!

  • For an in game menu is it a good idea to just have hidden layers for each menu screen?

    I don't have a good understanding on the factors that will cause slow down issues. Will a bunch of hidden menus have much effect?

    Instead of hiding (visibility) should I get used to spawning and destroying the menus? How beneficial is that?

    Example:

      Options Controls Inventory Upgrade Character Load/Save Etc.

    Is it worth making a separate layout for certain menus?

  • I know this is a very old thread but what did you find was the best way?

    I was just thinking about this and was considering animating the whole arm for each weapon and attaching a the shoulder.

    For the z-index part of the question couldn't you set the arm/weapon equal to z-index of the character's sprite?

  • Solved

    Didn't realized I used "while key down" instead of "on key pressed" so it was constantly running (and replacing the variable more than once). Changing to "on key pressed" or adding "trigger once" both solved.

    Sorry and thanks.

  • Player gravity is 2000

    Trigger on button:

    Set instance variable to Player.Platform.Gravity

    Change Player gravity to 300

    On button release:

    Change player gravity to Player.instanceVariable

    Why does instance variable get change to 300 instead of 2000?

    Checked in debugger and instance variable is 300. Why does this seemingly go out of order? I would think that it would be set to 2000.

  • That makes sense - that is what I originally expected.

    Thanks oosyrag

  • Wait does not block. You would have to include each subsequent test also as a sub test. You mean 'case:switch' with a fall-though? Otherwise 'case' is just a simpler elseif.

    Yes, with fall-through.

    But apparently my example is flawed due to using wait. This was not a post directed towards wait.

    If the waits were replaced by an intense calculation that took even fractions of a second would they go in order? Or would they all fire at once?

  • ugh, can I not post images?

    On event start:

    Test1 : wait, append text

    Test2: wait, append text

    Blank test: append text

    The last will append before the first two.

    . . . but if you are capable of answering the question I doubt you needed that

Lou Bagel's avatar

Lou Bagel

Member since 7 Sep, 2015

Twitter
Lou Bagel has 3 followers

Connect with Lou Bagel

Trophy Case

  • 9-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies