99Instances2Go's Recent Forum Activity

  • Tokenat returns a string. Cant substract/add from/to a string. Got to translate the string to a number first. With int().

    No sure why you use a string for this in the array. And not sure why it has to be 3D.

    For me, it is easyer to store numbers in the array. Like.

    Store an ID on the X-axis that pairs with the house or the soldiier. So you know wich place on the X-axis is witch house or soldier.

    Now, if we write the positions in the array as (a,b) .... (yes just a 2D array) ...

    Then all values on the X-axis lay on positions .... (a = some ID, b = zero.)

    Now 'b' represents a whole big world we can use.

    Just note the 'b' positions down.

    Lets say

    position (ID,1) = price

    position (ID,2) = buildtime

    position (ID,3) = range

    position (ID,4) = color

    So storing the the range for soldier number 15 .... is easy as ...

    Array > Set at XY(15,3) to Range

    Retreiving the color for soldier number 12 ...

    color = Array.at(12,4)

    Hope this helps you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Allow me to explain it this way.

    CoolBlue dileverd us a MathTeacher. The manual says we have 2 actions and 1 condition.

    Action 1 = Ask the dude to solve some mathproblem. ('Ask')

    Action 2 = Tell us the solution. ('Tell')

    Condition = On the moment that he knows the solution. ('On known')

    Manual also states that he takes some time to find the solution.

    So what we do ?

    We start with the action 'Ask'

    Then we make a top-level condition

    'On known' paired with the action 'Tell'.

    Now we do other stuff, like watching tv, and change some pampers, and wait till the dude is ready.

    All this time we make sure that we and no one else feeds the dude a new mathproblem, got to wait till he is ready. Else he will go crazy. And we lose the warranty.

    When the dude is ready, the 'On known' triggers, and the dude tells us the solution.

    What did you do ?

    You start with 'Ask' followed by 'Tell', under a trigger !

    But the dude is not ready yet, so he cant tell yet.

    So when he's ready he's holding his breath, eager to tell. But he cant, the actiont to 'Tell' is caged under that trigger.

    So the next time you use 'Ask' followed by 'Tell' that fast, the pure dude is stuck on what to do.

  • Did you really made a top level condtion (as explained in every tutorial) ...

    Sprite > pathfinding> 'on path found'

    Followed by the action Sprite > pathfinding> move along path

    ?

    As you can see in the tutorial on event 2 :

  • Set propertie Period Offset to Period/4. So if period is 4, set Offset to 1.

  • Some pick condition.

    x= random(object(0).x,object(1).x)

    Asuming the pickconditon only puts 2 objects in the Selected Objects List.

  • Yeah. So.

    Halfway following a path, it finds a new path and follows that. This is what you see.

    Use

    condition 'on path found'

    action move along path

    Maybe follow this tut once.

    https://www.scirra.com/tutorials/1118/path-finding

  • managed to that. Can consider him as the specialist.

  • Halfway following a path, it finds a new path and follows that. This is what you see.

    Use

    condition 'on path found'

    action move along path

    Maybe follow this tut once.

    https://www.scirra.com/tutorials/1118/path-finding

  • Here is a way to find solid working paths in tight places & move a player in tight places.

    https://www.dropbox.com/s/m3ypzxx77f436 ... .capx?dl=0

    Need those plugins.

    viewtopic.php?t=68958&start=0

    behavior-moveto_t63156

  • Besides all things nimos pointed out:

    Your player is a solid. Since you have set solids to be obstacles, the player is an obstacle.

    You can not find a path to a position that is inside an obstacle.

    Defining objects (as you do with the walls) as obstacles has no function if you have solids set as obstacle.

    Would you set obstacles to custom and add the walls to the obstacles, then (since they dont move) once (in the on layout startup) is enough. Adding objects to the obstacles must be followed by a 'regenerate obstacle map'.

    I am afraid the grid is to narrow for official pathfinding plugin, afraid it can not find a path that keeps the enemys out the walls.

  • Can we clarify what 'Z order' we talk about ? Z order based on IID or Z order based on Y(x) ?

    Let me try to explain.

    Based on IID. When you copy or clone in the layout. The last one created shows above the others. The same for newly created instances during runtime. The last created one show above the others. It has a higher IID (when picking all) and a higher Zindex.

    (problem could be solved with a fake IID index in a familie variable)

    Based on Y(x). Those objects with a higher Y show above those that have a lower Y. Usaly used for dimetric games.

    (problem could be solved with plugins)

99Instances2Go's avatar

99Instances2Go

Member since 12 Feb, 2016

Twitter
99Instances2Go has 2 followers

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies