Excal's Forum Posts

  • SOLVED!!

    <img src="http://i.imgur.com/v5q1RlR.png" border="0" />

  • Give each sprite a variable called Follow. This variable is equal to the UID of the sprite to follow.

    Give each sprite a variable called speed.

    Then just add whatever movement plugin you plan to use and have the sprite match angle and speed of the one to follow.

    In theory, this is how I would do it. I haven't actually done it before, so perhaps someone with more experience can give a more optimized solution.

  • Running out of ideas here. I've tried numerous things, and I'm not sure how to synchronize the two.

    If anyone has ever done something like this (delayed object creation WITH highlighting of the object spawn area), please help.

  • FPS is dependent on hardware and the workload demanded by a program.

  • I've updated the .capx to include a debug counter.

    <img src="http://i.imgur.com/SC2oP5J.png" border="0" />

    The reason why the computer's second and third spawns are much faster than the first is because the ComputerSpawn variable rapidly goes from 2 to 3.

    This causes the highlighting to happen quickly, meaning spawn positions 2 and 3 will become highlighted in quick succession instead of slowly, and I'm not quite sure how to change this.

  • R0J0hound

    This definitely seems to work!

    <img src="http://i.imgur.com/fS0RvKu.png" border="0" />

    The other problem I'm having is the highlighting synchronization. The highlight on the first spawn works perfectly, but after the computer spawns its first unit, the other two spawn areas start to highlight even though the spawning only happens one at a time. Any ideas on how to synchronize the two?

  • Click 'Events' in the top toolbar. At the far right is a search feature.

  • Would like to bump this since one of the math wizards (@r0j0hound) seems to be on :D

    The problem: After the player spawns his units, I want the computer to spawn its units. Computer spawning is working, but I'm trying to control the timing so that the computer doesn't spawn all of its units at once but instead sequentially with a slight delay between each spawn. This is made difficult by the fact that I want the currently spawning area to be highlighted.

  • I think a 'trigger once per object' would be an excellent addition to the game.

    Right now I'm creating a board game where both the player and computer spawn units before the game starts. The trickiest part for me was creating computer spawning in a way that happens sequentially instead of spawning all of its units at once. I think a 'trigger once per object' would have made my events a lot simpler.

  • I feel the same way.

    The truth at the end of the day is that nobody cares about your project except for you. This is why every single one of my 'how do I?' threads involves me posting follow-ups stating things I've found as I've tried to diagnose the problem. People probably won't read them, but what drives me to develop is the notion of progress, even if it's just a little progress, and that's why I continue to post.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The runtime.js file is only the C2 runtime. You need all the other files exported with the project in order to host the project.

  • Another update. This is very close to what I'm looking for, although I'm still not exactly sure why the second and third spawns are much shorter in time than the first spawn.

    <img src="http://i.imgur.com/lZwzUB9.png" border="0" />

    The .capx has also been updated.

  • I've done some more testing and decided putting a loop inside a function isn't going to cut it. If I just wanted to have delayed spawning without highlighting, this would have worked just fine, but since I effectively need a delay on two items at once, I think not using a loop is more effective.

    <img src="http://i.imgur.com/rNTbHKt.png" border="0" />

    This is what I have now, and it seems to work much better, although it's still not quite what I'm looking for. I've updated the .capx as well.

  • In my program, the computer will spawn units after the player spawns units. The computer spawns units one at a time, similar to the player. This aspect of the game is working well.

    I want to have the spawn area the computer is focused on to highlight. Right now, every spawn area the computer can spawn a unit on will be highlighted during computer spawning as opposed to one at a time (run the game to see what I mean).

    Here is the relevant code:

    <img src="http://i.imgur.com/wq4qyHB.png" border="0">

    Any help or ideas would be appreciated.

    BoardGame.capx

  • I'm going to be brutally honest here. C2 is the easiest development kit I have ever worked with, but the export features that it promises on the main site are more or less half-truths.

    C2 relies on external wrappers to export, and almost all of them have compatibility issues with C2's exported code. For example, CocoonJS apps written in the CocoonJS SDK seem to perform very well, whereas C2-exported code that is run under CocoonJS struggles with things like physics.

    This is most evident in the fact that over time, performance with CocoonJS using C2-created programs has gotten worse. I wouldn't be surprised if Ludei announced over the next few weeks that they are dropping support for C2, because this is what it seems like they are doing. Every new update they post promises new features, enhancements, and performance improvements, and recently every new update has resulted in C2 programs losing performance.