dop2000's Forum Posts

  • In C2 this can easily be done with Paster plugin - on every tick paste game layer(s) on it, then resize. Don't think this is possible with DrawingCanvas.

    To make 8direction move slower at Y axis - create an instance variable oldY, on every tick set Player Y to lerp(Self.oldY, Self.Y, 0.5), then set oldY to Player.Y . This is not recursive and will decrease vertical speed by 50%.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use CB Hash or similar plugin to digitally "sign" your save data. Save it together with the hash, on load check if the hash is correct.

    This will make the simple editing of the save file impossible, but won't protect from a more experienced hacker.

  • Try to change the first condition to "On object Enemy clicked", and remove "Cursor over enemy". If this doesn't help, please post your capx.

  • It works fine if you set Diagonals:enabled in pathfinding properties. But of course, following the NPC with a camera at 50x speed is not a good idea.

  • You need to post a screenshot, otherwise how can I know what are you doing wrong?

  • You do not have permission to view this post

  • You do not have permission to view this post

  • As I understand, the problem is that at x50 speed pathfinding objects are moving too fast and sometimes may run into obstacles, get stuck, miss target position etc. I believe there is a simple solution to this:

    There may still be other issues - NPCs may trigger collision events when moving at high speed, may become destroyed if they have Destroy Outside Layout behavior etc.. You can temporary disable some events/behaviors when the time scale is set to 50.

  • Considering your array has size (width=3, height=5):

    For "w"=0 to 2
    	local variable sum=0
    
    	For "h"=0 to 4
    		Add (array.at(loopindex("w"), loopindex("h"))) to sum
    	
    	System pick Nth instance, object:TextBox, instance: loopindex("w")
    		TextBox set text to str(sum)
    
    
    
  • See also this example of dual-thumbstick I made for another post:

    dropbox.com/s/rrpxnmer3gwhl88/DoubleVirtualGamepad_v3.c3p

  • Bullet set angle of motion to angle(self.x, self.y, player.x, player.y)

    Or, if you have "Set angle=yes" in Bullet properties, then you can use action "Bullet set angle towards position (Player.x, Player.y)", the bullet will fly in the direction it's facing.

  • Put all values into a dictionary and save this dictionary in local storage. Demo:

    dropbox.com/s/1cz1k5x3teikbv5/DictionaryLocalStorage.capx

  • What, why do you add up an angle with x/y coordinates? It probably works, because the circle.angle is zero, but it doesn't make any sense.

    You need this:

    Circle on collision with Enemy
    	Target set position to Player
    	Target move at angle
    		Angle: angle(Player.x, Player.y, Enemy.x, Enemy.y)
    		Distance: (Сircle.width/2)
    

    If multiple enemies can be in range, you might want to modify it to something like this:

    Circle is overlapping Enemy
    Enemy pick nearest to Player.x, Player.y
    
    	Target set position to Player
    	Target move at angle
    		Angle: angle(Player.x, Player.y, Enemy.x, Enemy.y)
    		Distance: (Сircle.width/2)
    

    Also, you can do the same without the circle sprite, using Line of Sight behavior.

  • This is a very vague question. Try browsing/searching the Tutorials:

    construct.net/en/tutorials

  • There are a couple of C2 addons for seeded random, I like this one:

    construct.net/en/forum/extending-construct-2/addons-29/plugin-seedrandom-53718