Oko's Forum Posts

  • Yep, I have plenty of time-based events that have just 1 condition such as : "If object value is equal to X"... and that seems to be as bad as "always"

    Oh well, I got some work to do .

  • Oops!

    I.. err... the...

    Haha, I'm so stupid

    1 question : are simple events like: "if object value is equal to X" as bad as always?

    I certainly hope not, as I would have to sift through the 170 events of my no-where-near-finished game engine!

  • "How could do this?"

    Tee-hee!

    Anywho, I wouldn't touch the "every X milliseconds" condition with a ten foot long clown pole.

    Give the object an alterable value, call it "shoot" (what else?) then...

    Always:

    Object: Add random(3)+(2) to object.value('shoot')

    Object.value('shoot') is equal to or greater than 100:

    System: create object- bullet at object.x and object.y.

    Object : set value "shoot" to 0

    Modify the numbers here depending on how often you wish that object to shoot.

    And this is all assuming you want an object to shoot something and that you know what to do from here (bullet movement or behavior).

  • Thanks .

  • Okay, as I do not want the enemy object itself to rotate but want it to have limited view relative to angle, I created an enemy "eye" object, placed it in the enemy's container and have it always set it's position to the enemy.

    It works fine ,I can see that the enemy "eye" object is spread out correctly on the multiple instances of enemies.

    The event :

    For each "eye" object

    if Eye object has LOS to player

    THEN

    Enemy : Set value ('seesplayer') to 1

    What I'm wondering, is if there should be another "for each object" condition for "enemy" or if "for each eye object" automatically selects the enemy object of which it is contained.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've never player F.E.A.R. but why not have the text sort of... flickery?

    Simply overlap two of the same text-boxes (give 'em glow or whatever) set their transparency to like 80 each, then make one of them move on an angle then back super fast, but have that event only occur every like... 2 seconds.

  • That was exactly what I wanted, thankyouz!

  • Within my enemy AI group I want to have an event that tests if the enemy's health is below a certain level, then it makes them flee.

    But that's just the problem, see, I could simply test the player's x and y coordinates relative to the enemy and then have the enemy move in the proper direction but that's 4-6 different events, I was hoping there is a more efficient way of doing such a thing, with perhaps only ONE event.

    So the idea is, with an RTS movement event "move to position", what, my good sir might I enter in the X and Y coordinates boxes to make the enemy move AWAY from the player?

  • You're not going to learn anything if you don't learn HOW to learn .

    It sounds as if you think you can make a game from only using behaviours.

    Since you're a beginner, I strongly suggest you create a bunch of 1-level projects and fiddle around in construct, testing events and figuring out what does what when and where, Instead of just throwing up your hands and saying : "how do I do this?".

  • Because of the LOS and RTS behaviours it's very easy to simulate AI (RTS has pathfinding and object avoidance) (LOS = line of sight).

    You can add behaviours to an object by looking at it's properties and clicking : add behaviour.

    Example,

    IF enemy has player in LOS

    + move to: (Y) player.x (X) player.y (RTS)

    IF enemy DOESN'T have player in LOS (you can invert conditions by right clicking on them and then "invert")

    + move to: (Y) enemy.value('ystation') (X) enemy.value('xstation') (RTS)

    Enemy value "xstation" and "ystation" determine they're starting position. you can set those automatically with the event :

    Start of layout :

    set enemy.value('xstation') to enemy.x

    set enemy.value('ystation') to enemy.y

    This is of course a very (EXTREMELY) simplified AI, you just have to get more creative I.E. having the enemy's also check distance between them and player, make them stop and look around after losing sight of player and things like that .

    Also : this is my first post!

    Edit : If your talking about platforming AI, completely disregard my post .