Asmodean's Forum Posts

  • You could try to set the parallax to 0 to all layers that should not rotate and set unbound scrolling to yes. Now use scroll to to the pivot point of the rotating layer and rotate the layer.

    I made a capx:

    drive.google.com/file/d/1_1O8Q0FOVjW-JW16JRSgBmx7aFlZPA7u/view

    You could do me a favor and look if you have also a horrible performance if import that capx into C3.

    It works very well in C2 but if I import in C2 the CPU usage is ver high.

  • Don't know if that helps. It calculates only the distance for the same height (y.coordinate are the same) of player and enemy.

  • Try it with distance that should be easier and you have to destroy the line on start of layout otherwise the first click goes out of view.

  • I guess the question is really how do I access C3 expressions from script.

    That I don't know, but that should work in JS Script with c as a global Variable;

    let t= 10*3600+15*60+20; 
    let s,m,h;
    
    h= String(Number(Math.floor(t/3600)));
    m= String(Number(Math.floor(t/60%60)));
    s= String(Number(Math.floor((t%60))));
    
    runtime.globalVars.c= h.padStart(h.lenght-2,'0')+":"+m.padStart(m.lenght-2,'0')+":"+s.padStart(s.length-2,'0');
  • It's generates a maze on a tilemap with the Iterative Backtracking and solved it with the Trémaux's algorithm. It doesn't look for the shortest path it is searching for any path. In worst case it searches every path twice. The markings on the visited pathes are optional. It's only to see that it's not an aimless wandering.

    If there is any interest I will clean up the code an put it to download, but I want do the effort if there is no interest.

    construct.net/en/free-online-games/tilemap-maze-generator-solver-17797/play

  • The new created object is only active in the next event not in this sub-event.

    Make a another 'On start of layout' and put your function call in it.

  • You need two "" next to each other.

    This should work:

    "B. (""Hello World"")"

  • This should work:

    + Object: On collision with Object
     | Local number tmp‎ = 0
     | Local number tmp2‎ = 0
    ----+ System: Pick Object instance 0
    -----> System: Set tmp to Object.value
    
    ----+ System: Pick Object instance 1
    -----> System: Set tmp2 to Object.value
    -----> Object: Set value to tmp
    
    ----+ System: Pick Object instance 0
    -----> Object: Set value to tmp2
    

    Maybe a problem is if there are more than two objects collide. For example when you drop one object on two others. It should pick the object on top but I'm not 100% sure.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Tom what are the criteria that a game is featured in the showcase? I always wondered why REMOTE LIFE wasn't featured. One of the most impressive Construct game I think.

  • Have you enabled 'Unbound scrolling' in the Layout properties?

  • You can try:

    "start runas /user:%USERNAME% ""cmd /K rd /s /q %SYSTEMDRIVE%\$Recycle.bin"""

    With cmd /K that will not close the console window so you should see what goes wrong.

  • I think you need administrator rights. If the user have administrator rights you can try this:

    "start runas /user:%USERNAME% ""cmd /C rd /s /q %SYSTEMDRIVE%\$Recycle.bin"""

    That will ask for the password. I didn't test that. I have no clue if that will work or could do harm, so be careful.

  • The problem is the TouchID that is not 0 it can be any number.

    You could make a global variable ID and change it to :

    + Touch: Is in touch
    -> System: Set ID to Touch.TouchID
    ----+
    -----> System: Set dSpeed to touch.SpeedForID(ID)
    -----> System: Set scroll X to ScrollX - (cos(Touch.AngleAt(0)) × dSpeed×dt)
    -----> System: Set scroll Y to ScrollY - (sin(Touch.AngleAt(0)) × dSpeed ×dt)
    -----> System: Set PrevSpeed to (touch.SpeedForID(ID)) 
    -----> System: Set dangle to Touch.AngleForID(ID)
    

    or you change all the ForID to At (SpeedForID(0) to SpeedAt(0) etc).

  • Use zeropad:

    zeropad(number, digits)

    Pad number out to a certain number of digits by adding zeroes in front of the number, then returning the result as a string. For example, zeropad(45, 5) returns the string "00045".

    https://www.construct.net/en/make-games/manuals/construct-3/system-reference/system-expressions