construct 3 problem

0 favourites
  • 8 posts
From the Asset Store
Casino? money? who knows? but the target is the same!
  • hello

    sometimes i cant set new data in to variable, like when im doing family with variable move - right and on wall set left in to move but nothing happens in move is all the time right even when i set up variable for enemie no family new data cant be set in to variable any idea why that happens....??

    sorry for my english

  • Can you please break your message into shorter sentences? It's impossible to decrypt it..

    Your "move" variable should change from "right" to "left" when enemy collides with the wall, but this doesn't work?

    Please post your project file or a screenshot of the event list.

  • sorry for my msg

    i have created family with behavior platform and family variable string right(move).i have added 2 enemieses to the family

    up to this point everything was ok instant variable was changing how supposted to.

    instand variable was changing

    enemies_move has wall on right set variable left

    enemies_move Move=left enemies_move simulate left

    enemies_move has wall on left set variable to right

    everything was ok

    when i added another 3/4 enemies to the familly instand variable stop changing and was inintial right all the time.

    so i created another family enemies_move1 with platformer and instand variable move1

    i have added 2 enemies with exacly the same code just with new object enemies_move1 and new variable move1 but variable dont want change when enemies hit solid object.

    so i have created everything for 1 single enemie with platformer and own variable but same problem variable cant change. This problem happens after i was trying add 3/4 enemies to enemies_move to the 1 family

    ibb.co/3MBJXZh

    ibb.co/p0FC88v

    on second screenshoot you can see i have created single M3 enemies and that dont work.

    thank you for helping and im sorry for my english.

  • Thanks for the detailed explanation. It's difficult to tell what can be wrong by the screenshot. The number of objects in the family should not matter!

    Try changing events like this:

    Also check enemies collision polygons and origin image point - they should be symmetrical. Otherwise when the sprite is mirrored it can collide with the wall.

    Randomizing enemies speed should be done on start of the layout, or on changing direction. If you do it on every tick (like on your screenshot), it will not work.

    If after these changes there is still a problem with move variable, please post your project file.

  • You might want to add a new event with "For Each (enemies)".

    Then move all the "enemies" events as a sub-event below the "For Each" condition.

    I think currently, the events will check one of the enemies variables, then apply the outcome to all enemies (so suddenly it thinks all enemies are moving "left" even though some are moving "right").

    If you add a For Each command, this will make Construct 3 re-run the same events individually for every enemy that you add.

    I understand you have made a new family as a test to fix the issue you were having, but just to clarify, I would recommend trying to keep all enemy events into 1 family, then you can have the 1 "For each" event with all the AI being sub-events.

    A quick mockup screenshot to demonstrate:

    Hope this helps!

  • I think currently, the events will check one of the enemies variables, then apply the outcome to all enemies

    Jase00 No, I don't think so. The events on that screenshot should pick all instances with move="right", then all instance with move="left". So it's unlikely that "for each" will help. But the order of events and actions definitely needs fixing.

  • > I think currently, the events will check one of the enemies variables, then apply the outcome to all enemies

    Jase00 No, I don't think so. The events on that screenshot should pick all instances with move="right", then all instance with move="left". So it's unlikely that "for each" will help. But the order of events and actions definitely needs fixing.

    dop2000 I'm not too sure about the order of events being the cause, it's not the most optimised but it looks functional to me visually, and OP said it does work with 1 instance of the enemy.

    I do agree that the "Set Maximum Speed" is misplaced and must be run once, though!

    I suggested the ForEach idea because, personally, whenever I have a system working perfectly with 1 instance, but it breaks when I add more instances (just like OP's situation), then I find a "For Each" condition fixes everything.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thank you for help you guys are great.

    weird is that i have reinstall construct and oryginal set up (coding) start works also i have added another enemie and is working i dont have clue what was wrong, what i have deleted enemies_move2 and i have added enemie (names M1-M6) M6 and is working with no problem with enemies M3/M4 was problem so probably that could be problem with animation of enemies or some problem with program

    thank you for help guys i will test your options asewel cos i want know better construct :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)