dop2000's Recent Forum Activity

  • Check image points on the turret.

    Origin image point is the "center" of the sprite. You can move it to where you want it to be. Also, you can define other points, for example "FirePoint" on the tip of the cannon, where bullets will be fired from.

  • Yes, if you use "wait" in a loop, you can't access any temporary variables (local variables, loopindex expression, function parameters etc.) after the "wait" action.

    You need to use either global variables, instance variables or static local variables.

    For example, this will not work:

    For i=1 to 10 -> Wait 0.5*loopindex ; Create Sprite at (loopindex*50, 200)

    You have to change it to something like this:

    Local Static variable x=0

    For i=1 to 10

    ... Wait 0.5*loopindex

    ... Add 1 to x

    ... Create Sprite at (x*50, 200)

  • You can convert both ways:

    Set number=int("2")

    Set text=str(2)

  • facecrime

    find(Object.myStringOfNumbers, "2")

    If this returns a number >=0, this means that "2" is found.

    But, if your string is long and contains numbers with multiple digits ("0,7,8,12,22,729") , if you need to find exact number 2, you should search for ",2," string.

    With lists like this it's better to use tokenat/tokencount

  • There are a number of expressions you can use:

    to parse a string with a list of values separated by comma or some other symbol - use tokenat(), tokencount()

    For example:

    For "x"=0 to tokencount(text, ",")-1

    ...value = int(tokenat(text, loopindex, ","))

    to search for a substring - find()

    Other expressions:

    left

    right

    mid

    len

    etc.

    https://www.scirra.com/manual/126/system-expressions

  • Both sprites should be on the same layer, mask sprite should be above the pink square, mask sprite should have "Destination out" blend mode.

  • I started replying, then got distracted and tarek2 beat me

    Yeah, the problem is that all these events are executed on every tick (unless they are sub-events under some parent event, it's not clear from the screenshot).

    If these events are top-level, this means that the animation is restarted again and again on every tick and lots of "wait 1.83" threads are created... It could be a total mess.

    You need to use Else:

    Health=4

    Else Health=3

    Else Health=2

    etc.

    Otherwise when health is for example 1, all four top events are triggered.

    Or add another condition - check if animation is playing:

    Health<=4

    (and) Heart5 is "HeartDestroy" is NOT playing

    Alive=0 condition is also triggered many times and restarting the animation...

    You can add "Trigger once while true" to it or set alive= -1, to prevent if from triggering again.

    Also, don't use long-running "Wait" actions, you don't have control over them. Use Timer behavior.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You should try again, because it does work. Make sure the "hole" sprite is on top of the main sprite. And both sprites are not on the bottom layer.

  • raymond91 , It may sound stupid, but check maybe this behavior is already added to the object?

    Or it could be added to the family, if the object is part of the family.

    Timer behavior has no properties, so it's hard to notice.

  • You can use Touch.AngleAt(0) and Touch.SpeedAt(0) to recognize gestures.

    Here is a demo I made for another post:

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

  • Check the tutorials section or google "construct 2 quiz", there should be lots of examples:

    https://www.scirra.com/tutorials/all

    As for the roulette, here is a demo:

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

  • Pretty sure all sprites (visible, invisible, off-screen, with all their animations) are loaded into memory on start of the layout.

    You can easily test it - put several big sprites on the layout, make them invisible, run the project in debug mode (Ctrl-F4) and check memory usage.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 279 followers

Connect with dop2000

Trophy Case

  • 10-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • 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
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x14
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

30/44
How to earn trophies