dop2000's Recent Forum Activity

  • You can use Text Box object.

    If you don't want to let users change the text, add this event:

    TextBox on text changed -> TextBox set text to "your text here"

  • Yes, you can do that.

    An easier way would be to add all 21 fruits to the layout and then delete random 18:

    And then move the remaining 3 sprites to their predetermined locations.

    There are lots of other ways how to spawn objects without duplicates, you can search this forum or tutorials.

  • Browser object has "On suspended" and "On resumed" events.

  • This is how you fire a "spray" of 5 bullets with 4 degrees between them:

    For x= -2 to 2

    ...create Bullet at Character (x, y)

    ...Bullet set angle to (Character.angle + loopindex*4)

  • You can pass data in URL parameters.

    website .com/mygame.html?mypath=~wp-content~plugins~foo-game~scripts

    Then use Browser.QueryParam("mypath") to retrieve this parameter and replace "~" symbol with "/"

    There may be other ways too, but this is the only one I know.

  • ex32

    Select first sprite, copy its coordinates (from "Position" field on the left properties panel).

    Select the second sprite, paste coordinates to its "Position" field.

    It takes 2 seconds.

  • Vonca

    Create an instance variable shotCounter.

    After each shot add 1 to shotCounter.

    If shotCounter<3, start short timer to fire another shot.

    If shotCounter=3, start a longer ("cooldown") timer.

    On "cooldown" timer reset shotCounter to 0 and you can shoot again.

    Note that it doesn't take into account LoS.

    You might want to add another instance variable - EnemyUID to the turret.

    When an enemy is in LoS, save enemy.UID to this variable.

    Then fire 3 bullets at that enemy (every time picking it by EnemyUID).

    After the "cooldown" timer check LoS again and repeat.

  • NetOne

    Yes, this is one of the main features of containers - when you pick one object, other objects from the container are picked automatically.

  • Thanks!

  • It's better to use Timer behavior. You can run different timers for each turret instance, pause/cancel timers if needed etc.

    Restart the timer after each shot. After 3 shots start a longer timer.

  • Probably not a bug.. I think what happens is the first "Is overlapping" condition picks instances of Team1 object. So the remaining System conditions in this event are comparing X for picked instances only. If "Is overlapping" picked 0 instances, then the rest of OR block has nothing to compare.

    If you change the event like this, it works:

    That being said, there are problems with OR-blocks in C2.

    See this comment from Ashley:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I didn't know how you wanted to arrange your soldiers.

    If you want a grid with 10 soldiers in each row, you can do this:

    variable posX

    variable posY

    System For Each Soldier (order by Soldier.attackDamage) descending

    ....Set posX to (loopindex%10)*70

    ....Set posY to int(loopindex/10)*70

    ....Soldier set position to (X= 50+posX, Y=50 +posY)

    Or you can put invisible "placeholder" sprites to where you want to place your soldiers. And then set position to (X=placeholderSprite(loopindex).x, Y=placeholderSprite(loopindex).y)

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 280 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