dop2000's Forum Posts

  • Adjust Platform Vector Y. For example, to make a higher jump - "Player Set Vector Y to (Self.Platform.VectorY-200)"

    Detecting when the platform is moving up is different problem. Depending on the behavior you use to move it, you may be able to access its velocity or moving vector (something like Platform.Behavior.VectorY). If not, you can simply place invisible Zone sprites on your layout in places where platforms are going up. When player is jumping and overlapping the Zone sprite, make its jump higher.

  • On the start of layout set high numbers for Physics world stepping, for example 50 and 50, or even 100,100. You need to experiment with this setting, it makes all physics calculations more accurate, but also affects performance.

    Use bigger chain links with much higher density, decrease the number of links. This will make the rope stronger. Say, if I make 100 links with density 2, the rope stretches a little, but doesn't break, unless I start looping it around poles. Unfortunately, it still goes through poles quite easily.

    I guess your method of checking the rope overall lenght can work here, but instead of increasing Lilbot density, you need to decrease its velocity. If the rope becomes stretched, find the nearest pole to the Lilbot and adjust Lilbot's velocity, allowing it to move only towards the pole, not away from it. But I don't know the formulas for that, sorry :)

    You can also try applying an impulse that will pull the Lilbot back (at rope angle) when the rope becomes stretched.

  • That's because "On animation frame changed" is triggered separately per each enemy instance. And inside this event the enemy instance is picked, that's why the bullet is created by this instance.

    If you have an event "Enemy shoot variable =1", it picks all enemy instances with shoot=1, and if you want them all to create bullets, you either need to use "For each" or "Enemy Spawn.." action.

    .

    I don't like using state machines because you have to check lots of conditions on every tick. I prefer Timer behavior. Note, that "On Timer" event can pick multiple instances at once, if their timers expired in the same tick, so you still might need to add "For each"

  • BillyShears You need to download the addon manually from that link I gave you, then install it in Addon Manager. Then restart Construct and try to open the project.

    construct.net/en/make-games/manuals/construct-3/tips-and-guides/installing-third-party-addons

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can check all objects in a loop, for example:

    variable correctCounter=0
    For each Object
     Object Is Overlapping Spot
     Object Is animation playing Spot.AnimationName
     Object compare frame =Spot.AnimationFrame
    	-> Add 1 to correctCounter
    
    
    If correctCounter=Object.Count
    	-> display message "All objects correctly positioned"
    
  • The easiest method would be making the same animations structure in both sprites.

    In the Object sprite create animations "red", "blue", "green" - with 3 frames in each (circles "A", "B", "C").

    In the Spot sprite create the same animations also with three frames in each (squares "A", "B", "C").

    Then add this event:

    On Object drop
    Object Is Overlapping Spot
    	Object Is animation playing Spot.AnimationName
    	Object compare frame =Spot.AnimationFrame
    		-> display message "Correct spot"
    	Else
    		-> display message "Wrong spot"
    
  • I have a demo project just like that. There are two levels and different items are sold in the shop on these levels.

    dropbox.com/s/0ex32akdcl7s2ie/ArcherMan3.capx

    You will need to install CSV addon to open it:

    github.com/erenertugrul/construct-plugins/blob/master/ported_plugins/plugins/rex_csv/dist/rex_csv.c3addon

    construct.net/en/forum/extending-construct-2/addons-29/plugin-csv-csv2array-csv2dicti-41868

  • Sounds like the order of events may be wrong in your project. For example, you are trying to access AJAX.LastData before "AJAX On completed" is triggered, or you are writing and reading to/from local storage at the same time, or something similar. You need to post your project or screenshots of the relevant event sheets.

  • If you don't want to preview from the intro/loader layout, as a temporary solution you can create a function "InitializeVars" and add it to "On created" events. (probably not all, just the ones that get triggered first). Remove this function call before exporting the game.

  • Open "8 directional behavior" template and add these two actions:

  • Level unlocking:

    construct.net/en/tutorials/level-selector-995

    To add a life every hour you can check system time:

    Set currentTime variable to Browser.ExecJS("Math.floor(Date.now()/1000);")

    This will give you current unix time in seconds. Divide it by 3600 to get the number of hours. Check if an hour or more has passed since you last awarded a life.

    In Construct 3 you can use unixtime expression instead of Browser.ExecJS

    .

    You can also try downloading big complete game templates (free or commercial) that have these mechanics from Scirra store.

  • If you link one array instance with one family instance, it doesn't really matter where you define the 'ChildUID' variable.

    It only makes difference when you need to link one-to-many.

  • It's easy to do with Tween behavior.

    dropbox.com/s/jgagd4v8a9e0e8j/HueTween.c3p

  • It will not be possible to store each piece in a separate layout. Here is what I usually do when I need to randomly generate a level from pre-made scenes:

    I put all scenes on the layout, somewhere outside of visible area. Scenes (yellow rectangles on the screenshot) have 'type' instance variable defined with values like 'easy', 'medium', 'hard'. This allows to build levels of different difficulties, and mix and match them, for example 5 medium scenes + 3 hard.

    All objects on the scenes are added to one or two big families, in this case "Entities" for sprites and "Obstacles_TB" for tiled backgrounds.

  • No, you should not use "Wait" when programming such things. Use Timer behavior instead.

    On start of the layout 
     : Enemy Start Timer "change_direction" for 0.5s recurring
    
    Enemy on Timer "change_direction"
     : Enemy set variable direction to choose("left", "right")
    
    Enemy direction="left" 
     : Enemy simulate moving left
    
    Enemy direction="right" 
     : Enemy simulate moving right
    
    

    You can randomize their movement if you restart the timer in "On timer" event for random number of seconds, for example random(0.5, 1.5)