Noodlebox's Forum Posts

  • 4 posts
  • A few things to try:

    You don't need the for each loop, the game will trigger an event individually for each 'Spawn' if their bool is active.

    There is another action that causes the actual object to spawn another object rather than the System. In the 'Action' menu click on your 'Spawn' and click 'Create another object'.

    Additionally if this doesn't work for some reason, you could try the actual timer behavior. Add the 'Timer' behavior to your 'Spawn', set a Tag like 'spawnEnemy'.

    When bool = active

    AND

    Timer 'spawnEnemy' is NOT running (right click and invert this condition)

    Then Start Timer 'spawnEnemy' for X seconds.

    On timer 'spawnEnemy'

    Then the 'Spawn' creates object etc.

  • Try the 'Tween' Behavior. It lets you trigger smooth or exponential (or like 50 other) adjustments to things like size, opacity, color etc.

    ex:

    Condition: Mouse Cursor is over Object (Button)

    Action: Tween (Two Properties) (Size) Over X seconds

    - X (width)

    - Y (height)

    Else: Tween (Two Properties) (Size) to Default size Over X seconds

  • Edit: This seemed to work okay but recently I have been trying to expand it a bit and make it capable of not just attacking **the player but** any nearby target in the "Ally" family.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My project is maybe slightly out of the scope of Construct 3, but I'm wondering if anyone else has attempted this or something like it with success.

    Basically I have a state machine that worked well when I had all the enemies targeting the same thing (the Player object). My previous state Machine looked like this:

    EnemyMob 'EnemyType' var =Goblin

    EnemyType 'State' = Idle

    Do this stuff

    EnemyType 'State' var = Wander

    Do this

    etc.

    This seemed to work okay but recently I have been trying to expand it a bit and make it capable of not just attacking any nearby target in the "Ally" family.

    My main issue however is that now that I'm attaching a 'TargetUID' var to the Enemies and making them target a 'MobAlly' with a specified UID, they kind of run each others code a lot of the time. It works fine when there is only 1 enemy I am testing but be the more I add the buggier it gets and the more they stutter around, switching from their target to another Enemy's target.

    I'm looking for a way to make these enemies trigger their own events, but I know construct can be a bit limited in the way that it is set up.

    Things I've tried:

    - Making everything timer based, random(.05,.3) so that the mobs triggered their events somewhat staggered { this helped somewhat but there will still stutters the more enemies were added }

    - Making the enemies call Functions that run the code and sending over the UID fingerprints of the Enemy running the code and their 'TargetUID' var {the limitation with this being (as I am understand) you can only run a function once at a time.}

    - I've tried some stuff with "For Each" loops but it seemed to make things stutter more often.

    Any ideas would be welcome, I have been trying to get a solid foundation for AI in my game leaving it open ended for me to create any allies/enemies, but I've been at a bit of a roadblock for the last 2 days.

    Tagged:

  • You do not have permission to view this post

  • 4 posts