AllanR's Recent Forum Activity

  • EzekielRage

    *too dumb (just kidding - my wife is a teacher and I am a terrible speller so I get corrected a lot)

    rather than searching every time to see if a "card" has already been picked, it is easier to make a source array with all the available numbers (cards) in it, and delete each one out of the source array as it is dealt to a player...

    https://www.rieperts.com/games/forum/Deal21Cards.capx

    the SourceDeck is a one dimensional array - with 21 places in it to hold a number.

    the PlayerDeck is a two dimensional array that has 7 rows with 3 columns

    so, the players (x axis) are numbered 0 to 6, and each one has three (y axis) spots for a card number.

    the first players cards are (0,0), (0,1) and (0,2)

    second players cards are (1,0), (1,1) and (1,2)

    etc...

  • sizcoz

    that's awesome! I knew there had to be a tween value - I just didn't scroll down far enough!

    There are definitely a couple bugs in spritefont - when you specify character widths, the font no longer centers properly, and it seems like it checks for word/character wrapping before it applies the character width adjustments. And it doesn't seem to calculate TextWidth properly either.

    those things work properly in C2. I am going to file a bug report...

    in my sample I put a yellow sprite behind spritefont2 so that I can see where the edges of the font are (to see why it wasn't centered). I am also changing the size, as well as the scale, so that the mouse wont trigger the tween unless the mouse is near the text.

    https://www.rieperts.com/games/forum/tweenfont2.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • jobel

    for the spritefont, changing the width and height doesn't change the size of the text - I do that at the bottom:

    every tick - set scale to self.Width/self.OriginalWidth

    and I think that, plus the elastic tween results in the strange movement (pixel rounding might also play a role).

    I tried a few other tween settings, and things like only tweening the height and leaving the width at a fixed setting, but nothing seemed to help very much.

    I don't think tweening the scale of a spritefont is going to be a viable option. Tweening a sprite works much better...

    there may be a way to paste the text of a spritefont into a canvas and load that into a sprite if you really need text that can change. otherwise, make sprites of the words you need.

    or make sprites of individual letters and combine those to make the words you need (so, basically a custom sprite font).

  • you could try "Set Time Scale" and set it to 0.

    another option is to put all the objects playing animations in a family, then at the family level you can tell them to stop with a single action.

  • john Cutter

    very well done again! found all of them - the zoom really help this time.

    the second black and white one gave me the most trouble.

  • jatin1726

    when the text in the textbox changes, use Find(textbox.text,"love")

    if the position returned is -1 then love was not found, otherwise you can start the jump animation.

    https://www.rieperts.com/games/forum/LoveJump.capx

  • WeariedCoffee2

    looks like the angleofmotion isn't available until the next tick after the bullet is created - that is why the delay works...

    but you can achieve what you want by setting the bullet angle (not angleofmotion), and you can do that immediately after it is spawned.

  • jobel

    just updated my sample with a sprite font...

    the other problem with a sprite font is that the origin is the top left corner, so to make it bounce you also have to re-center it every tick.

    just realized that spritefont does let you change the origin!

    so download the file again and take a look.

    EDIT: I also just re-read you original post and saw that you wanted a full sine cycle - mine only does half a cycle while the mouse is over the object and then finishes the cycle when the mouse is not over... to change my sample you would have to make the shrink tweens automatically start when the grow tweens finish.

  • jobel

    yeah, the problem with scaling the font is that you have to also adjust with width and height so that the text will still fit inside after increasing the scale...

    it is a lot easier to make a sprite out of the font characters used in the sprite font and work with that.

    unless you need to use text that changes in the game - like player's name, or score...

    this is how I would make a sprite bounce in size:

    https://www.rieperts.com/games/forum/tweenfont.c3p

  • dungeon

    The Mnk beat me to it, but here is my version...

    similar concept, except I used Touch so it will work with both mouse and touch devices, and I added zoom using the mouse wheel...

    https://www.rieperts.com/games/forum/RotateZoom.capx

  • give the pictures an instance variable, and put the text that matches in the instance variable.

    or another way would be to put all the pictures in one sprite as different animations, and name the animation based on the text you want it to match with - then you can compare text to Sprite.AnimationName

  • tommyoliversays

    everything in the trigger once event can go in a function, and then call that when needed.

    the tween end will only trigger after then function starts the sequence, so that is not a problem to leave it out on its own...

    you could also put all the events in a group and disable the group until it is needed.

AllanR's avatar

AllanR

Member since 21 Nov, 2013

Twitter
AllanR has 23 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies