dop2000's Forum Posts

  • Ok, I tried it. But it doesn't sort the array of players, it simply assigns different positions to the first 11 players. So player #4 for example, can be DF in formation 5-3-2. But the same player #4 will become MD in formation 3-4-3. The remaining 7 players are not used at all.

    If this is what you want, then it's very easy. For formation 5-3-2:

    Repeat 10 times: 
    Array set (loopindex<5?"DF":loopindex<8?"MD":"AT") at x=loopindex, y=1
    
  • So you want to "toss a coin" and if it's "heads", then you run the function, correct?

    The easiest way is to use condition choose(0,1)=1

    If you need a 20% chance for example, then use random(100)<20

  • You should've given all these additional details from the beginning.. Yeah, my method will not work.

    So if there are 18 players in the array, and you want to make the formation 5-3-2, what should happen? First 5 DF players move to the top of the array, and the reserve DF players (if there are any) should stay in the end of the array? Or you need to remove all reserve players, only leaving 10 people in the array?

    I think it would be easier to copy records to another array.

    Or even easier if you had sprite instances instead of the array. 18 instances, you pick all DF, mark first 5 of them as selected for the game. Then pick all MD players, select 3 of them, then pick AT player, select 2 of them.

  • Are you sure that "On Path Found" is triggered? Add some visual indication to this event too. Run in the debug mode, check variables, check if pathfinding is enabled etc. If nothing helps, please post your project file.

  • Is it failing to find path? Or it finds the path, but doesn't move?

  • Move event number 10 to top level, it doesn't need to be nested under "Every tick".

    It's not possible to guess what the problem is by the screenshot. Add another event "On failed to find path -> Mira set opacity to 20". You will see if the pathfinding can't find the path, in this case try changing cell size/padding, check solid objects etc.

    You may also need to recalculate the obstacles map.

    Also, change Hunt_SalaT2 variable when the path is found, or add another condition to event #8 - "Mira is NOT moving along the path", otherwise it will be trying to finding a new path every tick.

  • This will be difficult to make with Car behavior. Have you considered using Physics? Or a combination of Car+Physics. It's not recommended mixing Physics with other behaviors, but when done correctly it may work.

    I have a small demo where I control a ball with explosions:

    dropbox.com/s/7k8w9mn8ngdu5q9/Concept5.capx

  • Or restart the layout, but don't reset the score in "On start of layout" event. Only reset the score when you need to do so, for example, when the character has died.

  • Do you want to delay the water effect, or increase its intensity gradually? If you want to delay, then disable it on start of layout, and enable only when needed.

    If you need to increase effect intensity, say from 1 to 10, use Tween behavior, "Tween Value" action. When this tween is running, set water effect parameter to Sprite.Tween("tag").value

    Or you can probably change effect parameter based on the sprite opacity, something like "set effect parameter 0 to (Self.opacity/10)"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just go through all objects, BBCode objects have an icon with two blue brackets - [ ]

    If the project is very large and you can't find them, there is a trick. Add a new BBCode Text object, name it ABC123 for example. Then create a family and add ABC123 object to it. The list on the left will show all other objects of the same type.

    Then replace them manually with Text objects one by one. After that you'll be able to switch to runtime 3 and enjoy all the new features of Construct 3.

  • system -> is on platform

    It was moved to Platform Info object.

  • Actually, sorry, I was wrong. C3 version does exist, but it only supports runtime 2. After you open the project, you will still need to remove the plugin, to be able to switch to runtime 3.

    Here is the download link:

    dropbox.com/s/e2quau8b2ouugsv/bbcodetext.c3addon

  • I think what people meant is that you don't need BBCode plugin in C3, because Text object now natively supports it. And I don't think C3 version of this Rex's plugin exists.

    So you need to completely remove this plugin from your C2 project, and then you will be open it in C3.