dop2000's Recent Forum Activity

  • Move second condition where you comparing a variable to a sub-event and use Else:

    On tap gesture on btn
    
        System avatarPicked=3  -> .........
        
        Else
        System avatarPicked=4  -> .........
    
        Else
        System avatarPicked=13  -> .........
    [/code:3qkv17ti]
    
    Or you can actually compress all this code into a single expression using [url=https://en.wikipedia.org/wiki/%3F:]ternary operator[/url]:
    avatarPicked= (avatarPicked=3 ? 4 : avatarPicked=4 ? 13 : avatarPicked=14 ? 21 : 0)
    avatars Set animation frame to (avatarPicked)
  • So you have something like this:

    Enemy2 spawn Enemy1

    Enemy2 destroy

    Add another action before destroying Enemy2:

    Enemy1 set Bullet angle of motion to (Enemy2.Bullet.AngleOfMotion)

  • Instance variable is the easiest way to do it. You can also try something like this:

    build a string with UIDs of all picked instances in the first function and pass it as a parameter to the second function.

    Make sure to separate UIDs with some character, say "#".

    In your second function pick the same set of instances using find(function.param(0), "#"& str(Sprite.UID) &"#" )>-1

  • Oh, you are using a custom slider bar.

    Just calculate the position of slid_btn using the Unlerp() function, same as you do in "TextBox->On Text Changed" event.

  • worm1

    To open a capx saved in newer version, rename it to zip, unpack to a folder, open .caproj file in Notepad and edit this line:

    <saved-with-version>24700</saved-with-version>

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try Mouse.X(layer) and Mouse.Y(layer)

    Return the position of the mouse cursor in game co-ordinates, with scrolling, scaling and rotation taken in to account for the given layer. The layer can be identified either by a string of its name or its zero-based index

    See also this post:

  • Save the values in global viariables. Set slider value to the global variable on start of the layout.

    Have you tried it?

  • Wow. Do you really need to have 350 objects with enabled physics, all at once, on a small mobile screen?

    What kind of game is it?

  • Simply delete your events 4,5 and 6.

    Only if player is alive, new enemy will be spawned.

    That's it. You don't need the code "If not alive, then don't spawn enemies".

    You can add "Player Set player_IsAlive=0" to event #11, although this is not necessary. After player object is destroyed, event #2 will stop working anyway.

    One more thing - when you invert an event, you invert the condition (left part), not the action (right part).

    So your event #6 means:

    Condition -> "NOT every 1 second"

    Action -> "Create new enemy".

    As a result new enemy will be created not on every 1 second, but on every tick, about 60 times per second.

  • No, you can't select by UID like that.

    Sprite(10) is a Sprite instance with IID=10, not UID

    To pick a Sprite with UID=10 you need to use this event:

    Sprite-> Pick by Unique ID =10

  • gameba

    There are not many options -

    1. temporary disable Physics behavior when you don't need collisions

    2. use different objects instead of instances of the same object.

    3. use Chipmunk.

  • Run your game in debug mode (Ctrl-F4), select each health bar sprite, see where they are located before and after you destroy the gun, which one of them gets destroyed etc.

dop2000's avatar

dop2000

Member since 26 May, 2016

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