dop2000's Recent Forum Activity

  • It's getting too difficult to follow.

    Could you share you capx?

    Also, can I ask - did you develop this game from scratch? Or did you use someone else's demo/game template?

    Because some of the code in your project is quite advanced, and yet the questions you are asking are very basic. I'm confused.

  • Well, what you are trying to do is not possible, because you can't refer objects by their name.

    By selecting multiple objects I didn't mean "at once", I meant selecting instances of different objects.

    Say, you can select either Block sprite, or Tree sprite or Rock sprite.

    And understandably you don't want to create 3 almost identical events. (if selectedObject="Block" then set position to block.. if selectedObject="Tree" then set position to Tree.. if selectedObject="Rock" .....)

    So the workaround would be adding all three sprites to a family SelectableSprites. And then do what I suggested in my previous comment - pick family member by UID and set position to family instance.

    And one more thing - BlockMoveable(21) means instance with IID=21, not with UID=21

    https://www.scirra.com/manual/130/common-features

  • See this tutorial:

    https://www.scirra.com/manual/163/line-of-sight

    Have you added "Has LOS to object" event? Your enemy should start shooting only if this event is true:

    Enemy->Has LOS to player -> Enemy spawn bullet

    If you still have troubles, please share your capx

  • Change your events to this:

  • Distance between enemy and player:

    distance(enemy.x, enemy.y, player.x, player.y)

    Angle from enemy to player (to shoot bullets):

    angle(enemy.x, enemy.y, player.x, player.y)

    Or use Line Of Sight behavior if you also need to take into account obstacles. You can set maximum distance for Line of Sight.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Move "Function call" after "Sprite133 Set isOccupied=true".

    And remove "Word append.." from this event, because this is done with the function now.

    Edit: actually, you should add another "Function call" in the Else event, after "Letters1 set position to (startY, startY)"

  • Akia410

  • Almost..

    Events 17,18,19 should not be under "On Start of layout".

    I recommend you create a function "UpdateWord" and move these events to the function.

    Call this function after any letter is dropped.

  • No, instance variables. You have them on some other sprites, for example your PlayerBattle sprite has instance variable "health".

    Instance variables is a powerful thing, you should use them more.

    Create instance variable "startX" and "startY" on the Letters sprite. Set them to each letter's position on start of layout.

    This will allow you to return any letter instance to its original position when needed. Say, when it's dropped not on the grey box.

  • Just remove the quotes:

    Set position to (BlockMoveable(21).BBoxLeft-2, .....

    As for the second part (int(selectedObject & ".BBoxTop")), this will not work. You can't refer to objects in C2 by their string name. Same applies to expressions.

    It's hard to tell what are you trying to do from the screenshot. If multiple objects/sprites can be selected, then one possible solution would be to add all such objects to a family. Use SelectedObject variable to store UID of the selected instance.

    Then do this:

    MyFamily -> Pick by unique ID = SelectedObject

    .........HighlightBox Set position to (BlockMoveable(21).BBoxLeft-2, MyFamily.BBoxTop-2)

  • max2612 It's on the properties panel:

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 250 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
  • x4
    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