Lou Bagel's Recent Forum Activity

  • > To turn physics into a top-down model don't you just need to turn off gravity?

    >

    maybe?

    Informative!

    Ha, jk. I put it as a question to see if anyone disagrees. I believe I have done it in a project before, for a top down soccer game actually, and it seemed to work just fine for that purpose. Just if there is zero gravity you might have it increase some attributes to help slow down objects so they don't appear as floating (linear dampening?). I'm not confident though because it was a while ago and only played around with it for a couple of hours, so could get unrealistic looking under some circumstances I didn't encounter.

  • Oh, you are saying you want some to be more rarely chosen than others? Let's say like cards in a deck (like in a board game/collecting game, not poker cards) where there are more of some cards than others.

    If so I think MadSpy hit the nail on the head there (except I think flipflopped percentages, 35 should be 45).

    Are you familiar with random and choose, the expressions for generating random numbers? (shown by MadSpy above). That is all you need to create any type of randomness you want. After learning about those you just have to really think out how you want the math because you could do it tons of different ways.

    For example, here is one thing to think about:

    You say you want a common card drawn 45% of the time, uncommon, 35% of the time, and rare 20% of the time. MadSpy's example will do exactly what you want.

    That means the following probability of drawing each card:

    0: 15% (45/3)

    1: 15%

    2: 15%

    3: 17.5% (35/2)

    4: 17.5%

    5: 20% (20/1)

    So probability wise you will draw common cards most often but the rare card, since you only have one rare card, will be the most commonly drawn card in the game. Not sure you are indenting that . . .

    But that is more of a balancing discussion. Like I said, you could set this up so many different ways so what I suggest is you get out pen and paper and write out the math you want. That way you can ask specific questions on how to implement if you get stuck.

  • I'm not sure what you were looking for exactly but I needed some practice so made a capx that demonstrates what system expressions you can use for determining how many tiles wide/high a tilemap is:

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

  • I am really not clear on what you are trying to do and there is no probably many different ways to achieve whatever you are trying to do.

    Which of the following have you thought about using to implement this:

    Instance variables

    Different sprites vs different animations

    Families

    Array

    I would make 3 different sprites, one for each level of rareness, put all the cards in as a different frame in the same animation. Then have it randomly choose a frame on prompt.

    Have you tried anything yet?

  • I agree with oosyrag that the best route is in essence the player is playing as an invisible box with the character sprite pinned to it.

    Though if you have a really small project with only 2 characters and not a lot of animations you could just load it all into one sprite and carefully event your animations based on which character they chose.

  • xanxion Did you make your avatar img?

    I like it

  • Try removing the quotes from around the variable.

    For example you have:

    mysql_connect("$host", "$username", "$password")or die("cannot connect");

    Believe it should be like:

    mysql_connect($host, $username, $password)or die("cannot connect");

    In PHP $ signifies the start of a variable. " signifies the start of a string. So "$ signifies the start of string starting with a dollar sign, not a variable.

  • To turn physics into a top-down model don't you just need to turn off gravity?

  • oosyrag The Bullet behaviour does not do what i need it to do, Instead of hitting and landing on the ground it passes through my ground but when i do stop it, It does not look as natural as im trying to imitate.

    The only thing i seen that makes it happen is physic and i am trying to avoid it since i cant use it.

    I do like the bullet but is it possible to stop the bullet in a way that looks good and not forced.

    Try adding an event that would disable the bullet behavior when the pieces are overlapping the ground or wherever you want them to stop

  • I think there is actually a typewriter example that comes with Construct as a template (if not I found it as a tutorial, or I could share later).

    I would start with that and then speed it up if button pressed/is down.

    Basic process is just a txtSource (offscreen) and txtDestination. Start of function will place your desired text in txtSource and every tick will update txtDestination with another letter. I think it was

    Every Tick

    -txtDestination = txtSource.length(txtDestination+1)

    Could have change it to an if else scenario with +2 as the faster one

  • I'm gonna call it like it is:

    All ten of you that viewed this post so far but didn't share your bazooka are real jerks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • A sprite of one that is. If anyone has one handy I have a cool idea that just hit me and I can repost a capx (or link to playable) in probably like 10-15 minutes.

    Also, a town, building, or some kind of scenery or else he won't have anything to blow up.

    I think it would be neat for all to see to say the least . . .

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