dop2000's Forum Posts

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think when you enable/disable physics collisions, this affects all instances of both objects. You can't enable/disable collisions for specific instances.

  • Please share the working link to your capx

  • You don't need an array, you can do this with instance variables.

    Add "isUnlocked" and "isSelected" instance variables to your character sprite/family.

    In "Team Edit" menu display only characters that have isUnlocked=true

    When player clicks a character, toggle isSelected variable.

    To keep track of how many characters are selected, you can use a counter variable, or you can pick all characters with isSelected=true and use expression character.PickedCount to get the number of picked instances.

  • If you've never tested your game on mobile, I strongly suggest you use WiFi preview before actually building the mobile app:

    https://www.scirra.com/tutorials/247/ho ... al-network

    If everything is fine with the preview, you can use Cocoon.io or PhoneGap to build the APK.

    Just search this forum, there are lots of manuals how to do it, here is the most recent post:

    tutorial-build-signed-apk-in-android-studio-phonegap-build_t196001

  • You don't need arrays..

    You can use a simple variable MenuSelected (which stores a number id or a text tag of the button) and, say, a function that will set "Blink" animation for the selected item and "default" for others.

    On button Up pressed -> 
       set MenuSelected to Max(1, MenuSelected-1)
       Call Function UpdateMenuButtons()
    
    On button Down pressed -> 
       set MenuSelected to Min(4, MenuSelected+1)
       Call Function UpdateMenuButtons()
    
    On Function UpdateMenuButtons
       MenuButton -> Set animation to "Default"
       Pick MenuButton with id=MenuSelected -> Set animation to "Blink"
    [/code:3dllbdl8]
    
    If you prefer working with string tags, this expression may be handy to minimize the number of events:  
    (condition ? result_if_true : result_if_false)
    
    .....set MenuSelected to (MenuSelected="controls" ? "start" : (MenuSelected="start" ? "continue" : (MenuSelected="continue" ? "story" : "controls")))
  • Your first "On collision with waypoint" event picks one waypoint. You can't just pick another waypoint in the same event or its sub-events.

    Try adding "System -> Pick All waypoint" before "Waypoint pick instance with UID" sub-event.

    If this doesn't help, then move this sub-event to a function.

    Something like this:

    ... Call Function MoveToWaypoint(Enemy.UID, Enemy.MyNextWaypoint)
    
    On Function MoveToWaypoint
      Enemy pick instance with UID= Function.Param(0)
        Waypoint pick instance with UID = Function.Param(1)
             Enemy Find path to (waypoint.x, waypoint.y)
    [/code:1twtbp6e]
  • You don't have to tag Ashley

    This sprite must be a member of a family and this behavior is probably defined on the family.

  • justintime0185 your link is broken, try posting it without the "https://" part