dop2000's Forum Posts

  • Timelines are mostly used for scripted sequences, to make cut-scenes, intros etc.

    Pathfinding is completely different. It finds a path around obstacles, can be used in many top-down view games (RPG, RTS, racing), certain puzzles etc. It's often an important part of creating an enemy AI.

  • Yeah, you need to explain what "You.ObjectTypeName" means?

    If you want to create a random object from the Players family, just do "Create Players".

    If you need to create a player of a particular type, use "Create by name" action and make sure that You.ObjectTypeName variable contains the valid object name. Run the project in debug mode to check.

  • only the Fighter_Control created first is picked as the one colliding-- even if it is completely not in motion

    It doesn't matter which sprite is in motion. Collision event between two instances Obj and ObjFamily only triggers once.

    If you need to process pairs of fighters, to decide which one makes a punch and which one gets hit, update animations etc., use this code:

    The function will be triggered two times, for Fighter1+Fighter2, and Fighter2+Fighter1.

    .

    If you want to process each instance separately, don't use a family. "Obj on collision with Obj" will pick both instances, so inside this event you can do "For Each Obj" and it will loop two times.

  • I don't think such expression exists. You need to loop through all tiles and check if they are all empty. An empty tile has value -1

    Another method - if your tilemap is a fixed size, get Tilemap.TilesJSON of an empty tilemap, save it in a variable. And next time you need to check if the tilemap is empty, compare Tilemap.TilesJSON with that saved value.

  • dropbox.com/s/pzhuot5i7779tn8/DOW_FromInternet.c3p

    It's a Construct 3 project, you can open it in free version of C3. And then just copy everything to C2.

  • and what I want is that nobody can cheat with it.

    And that's why I gave you the URL to get the date/time information from the internet.

  • Use AJAX to request URL "https://worldtimeapi.org/api/ip", you should receive JSON string containing all the information about current date, time, day of the week, timezone etc.

    There are probably many similar services, just google them.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sure, no worries!

  • First you need to request the file "file_"&"clickedID"&".Text" with AJAX.

    When AJAX request is completed, then you need to use tokenat() to parse the data from the file. So your code should look like this:

  • First of all, you need to use waypoints. In MoveTo instead of "Direct" mode, use "Add waypoint" mode, then you can add the whole path at once and you will not need all those "Compare x/y" events.

    To change animations, use BadGuy.MoveTo.MovingAngle expression.

    .

  • I can help you making this game.

  • Some behaviors you can only add once - Solid, Tween, Anchor etc.

    That's why if any member of the family already has Tween, you can't add Tween to the family.

  • Gamepad.Axis(0,axis) should return a value from -100 to 100, which you can use for setting X/Y vectors. Something like this (you might need to change the axis indices):

    Player Set vector X to Gamepad.Axis(0,2)

    Player Set vector Y to Gamepad.Axis(0,3)

  • Touch and Mouse events like "On object clicked" are picking all instances on all layers under the cursor or finger, but Drag & Drop behavior works differently. It picks the top instance only, even if this object is invisible, or the layer is invisible.

    So if you need to prevent objects from dragging on a particular layer, you need to disable Drag & Drop behavior for them.