dop2000's Recent Forum Activity

  • I tried that too and also see about 30-40% difference in fps between the "Array->Value at" event and "array.at(x,y)".

    Who would have thought!

  • Set unitName="water"

    Set unitQuantity=43

    Set text to "I want " & unitQuantity & " units of " & unitName

    If you load these lines of text from csv, it may be easier to put tags in them and then use replace expression.

    You can mark tags with some rarely used symbol - #$@%& etc.

    For example, CSV file contains this string:

    "I want #quantity# units of #name#"

    And then you do:

    Set text to replace(textFromCSV, "#quantity#", str(unitQuantity))

    Set text to replace(textFromCSV, "#name#", unitName)

  • It's not tricky when you know The Secret Formula <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Put this event inside the "Repeat 100000 times" loop, run the project in Debug Mode and see if there is any difference in CPU load and FPS.

  • Count me in.

    What will be the format of this course - text tutorial, youtube videos, Udemi course, paid/free etc.?

  • marceloborghi

    This is quite a bold statement

    A million sprites, with behaviors and events? I'd love to see some examples, and would definitely be interested to know how (if) this could be done.

  • add two instance variables to the sprite: StartX, StartY.

    On Start of the layout set StartX to Sprite.x, set StartY to Sprite.y

    On Drop - if dropped on a wrong spot, set Sprite position to (Sprite.StartX, Sprite.StartY)

  • Sure, you can add other instance variables to that family, say TargetGroup and TargetLayer.

    When family member is tapped, deactivate all popup groups and make all popup layers invisible, then activate only ButtonsFamily.TargetGroup and set ButtonsFamily.TargetLayer visible.

    Or you can create an event that runs every 0.1 seconds for example, checks layers visibility, and activates/deactivates corresponding groups.

    If you have lots of layers/groups, you can name them like PopupGroup1, PopupGroup2, PopupGroup3... PopupLayer1, PopupLayer2, PopupLayer3..

    and disable them in a loop:

    For "x"=1 to 20 ->

    ... Set group "PopupGroup"&loopindex deactivated

    ... Set layer "PopupGroup"&loopindex invisible

  • 1. This is the right approach. I do the same in my games. Alternatively, you can put events into different groups and deactivate/activate groups. For example, if menu buttons are invisible and should be disabled, deactivate Menu_Events group. When player taps Menu icon, deactivate platform controls and activate Menu_Events group.

    2. You can add another condition "Retry is on layer..":

    On Retry tapped

    and Retry is on layer "GameOverLayer"

    and layer "GameOverLayer" is visible

    On Retry tapped

    and Retry is on layer "PauseLayer"

    and layer "PauseLayer" is visible

    3. I also suggest adding "Wait 0" before making layer visible/invisible.

    Say, you have two buttons (MenuOpen and MenuClose) in the same position on the screen, but on different layers:

    On tapped MenuOpen -> Set layer "Menu" visible

    and layer "Menu" is NOT visible

    On tapped MenuClose

    and layer "Menu" is visible -> Set layer "Menu" invisible

    With events like this, tapping MenuOpen will make layer visible, but then the same tap will be registered in the next event on MenuClose button, and the layer will immediately become invisible again. Adding "Wait 0" before changing layer visibility will fix this problem.

    EDIT: you can actually optimize all these events by adding all clickable objects to a family, create a family instance variable buttonFunction, and make this generic event:

    On tapped ButtonsFamily

    ButtonsFamily is visible

    Layer ButtonsFamily.LayerNumber is visible -> Function call (ButtonsFamily.buttonFunction)

  • It depends on which effect you want to use.

    You need another sprite as a mask (white circle for example), put both sprites on the same layer (mask should be on top).

    Try applying different effects and/or blend modes to the mask sprite.

  • Here you go:

    Of course, you can do this in one formula, without the "v" variable.

    If you need a constant climbing speed no matter what the pole angle is, instead of "Set Y to self.Y+5" you can add an instance variable ClimbProgress (changing from 0 to 1) and then your event could look like this:

    Set X to lerp(spr_Pole.X, spr_Pole.ImagePointX("PoleTop"), ClimbProgress)

    Set Y to lerp(spr_Pole.Y, spr_Pole.ImagePointY("PoleTop"), ClimbProgress)

    Also, you should not change the angle of Physics (or Chipmunk) objects directly. Instead of "Pole->Rotate" you need to apply force or impulse to PoleTop image point.

  • Here is the easy way:

    System->Every random(2,3) seconds

    ...System -> Pick random instance of object -> spawn object

    The better way is to add Timer behavior and start an individual timer for a random period on each instance.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 257 followers

Connect with dop2000

Trophy Case

  • 8-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
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies