Jomnitech's Forum Posts

  • Hi there

    Im looking for a way to spawn a object (Bullet) at the imagine Point with a variable X position. I want to spawn more than one bullet. But i want that they dont spawn at the same time at the same point. It should spawn a little bit one after another. I have try to set a wait function bevore. It seams to work but when i shoot in other direction the Bullets sometimes change the direction.

    So i think about to spawn the bullets like that: Spawn Bullet at imagine Point 0 + X (random(1,2)). But i dont know how to write it correctly. Can anyone help me?

    Thanks

    Edit:

    Solved. I have give it up to try to make it into the spawn call. I make a extra line how set position.

  • mostafanastary

    Hope i have understand what you want.

    https://www.dropbox.com/s/p3rpxa3133l6o ... .capx?dl=0

  • mostafanastary

    Im new in Construct 2, but i will try.

  • mostafanastary

    Is it a Platformer or a top down game?

  • ultrafop

    No the change between range and close attack works fine with the Line of Sight behavior. The problem ist that the AI`s triggering to simultaneously. For example, they have to diferent Meele Attacks. The normal attack and the jump attack, the random change with choose one of them works fine. But the time they have to wait to set the AI is always the same for all Enemys and not diferent for each Enemy. Dont know why.

    Trying to explane:

    The line of sight is near the player. So they have to choose make Meele attack or make jump attack for each. And it will repeate that every random second. Some of the Enemys make jump attack and some of them make meele attack. That works for each one. But all of the Enemys that jump, jump at the same time, and all of them how make a meele attack, make it at the same time. i have addet a wait random time in the same line like they choose which attack them make but they always ceep making it simultaneous.

    It dosent hurry. I`m happy that you help me

    Hope you understand what i mean.

  • Hi ultrafop

    I have addet some AI to the Enemys. But i have a little trigger problem. The problem ist that the Enemys allways make her AI`s simultaneously. For example when they attack, all the Enemys how attacks at this time attacks at the same time. I have try to make it more variable and Edit like this:

    https://www.dropbox.com/s/psjfghw9nwpwd ... r.png?dl=0

    My idea was to set a random Every X time to trigger them at diferent times to the next AI. But it dosent do so... Do you have any idea why?

    I also have a problem with the spawn AI. But i think its the same trigger problem.

    new capx:

    https://www.dropbox.com/s/yjqgd5f1tdea6 ... .capx?dl=0

  • ultrafop

    Sry, i have overlook that you post a new capx. It looks to run fine. I will try to undestood what you have done , dont know what .UID means (will reading some manuals).

    I will add some logic and give you a final feedback.

    Big thanks for help and spending your time!

  • ultrafop

    Nope, dosent work so. The Enemeys spawns a tons of hitboxes and from time to time they freeze.

  • ultrafop

    I also have made a AI with the tutorial you posted. You see rest of it in the layer "Enemys" the Variables of checking distance and AI are missing because i have re organized.

    But always have the same Problems with the meele attack. When there are more than one Enemy the attack will not work. They stucking arround or do other creapy stuff.

  • ultrafop

    I have toggle off the "Set Enemy AI 1/2. So i can for testing switching between the AI`s with right or left click.

    When i Trigger the Enemy AI to 3 i have the same creapy stuff i also had. The Enemys spawns a lot of Attack Boxes and sometimes the stuck and do nothing.

  • The Shadow have a Instance Variable called YDistance

    • Shadow - Set X to Plane.X , says that the X coordinates always ist the same ase the plane. so when you move the Plane Forward or backword the shadow will follow.

    -Shadow set YDistance (this is the Instance Variable) to abs(planeY-ShadowY)/3 . Means alwasy calculate the difference of the altitute between Plane and Shadow. /3, do only set the result smaler to Looks more smoother.

    • Shadow set width to 200 ( ist the same width like Plane) - shadow.YDistance (Subtract the distance to make it smaler when the Plane flys upworts.)
    • Shadow set height ( do the same ase the width simply with the height)
    • Shadow Set Y to 500 -( shadow.YDistance) , i set to get a Little depth effect. you can toggle off ore delete it.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks 4 answering

    ultrafop

    The Idle double post was a copy and paste mistace. I have deletet it and set all under one "for each" and deleted the other ones. But it still works Buggy....

    Sirvoid

    There is a capx. Ist a little bit big, dont know if it is posible to minimize it.

    https://www.dropbox.com/s/944hm0b5fmffk ... .capx?dl=0

    Edit:

    The Layer "Enemys" is a old try to make a Enemy AI, the Layer "Enemys_AI" is the current.

  • There is a new capx who Change the Height too and goes a Little bit backward: https://www.dropbox.com/s/ui120uwc13fj6 ... .capx?dl=0

    Its a littel bit difficultto check if the Airplane its move up or it moves back or Forward. Dont know how <img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question">

    Are you looking for a depth effect?

    I`m a noob in Construct, learning coding by looking tutorials <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    Hope i understud you correct, my english ist not the yellow from the egg <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink"> (and auto correction makes a lot of crap stuff)

  • Hi there

    I try to create a Enemy AI. I have look diverent Tutorials an look to some samples. But i find only Tutorials where the Enemys walk and jump arround, that Part also works fine. I want to add a Attack and have a lot of Problems with this, trying arround about 3 days....

    Here ist what i have at time:

    https://www.dropbox.com/s/irq3zfg206t0z ... e.png?dl=0

    With 1 Enemy it works fine. But when i set more of them i have at this time a timeout Error. I have try diverent thinks. Either i have a Timeout Problem or the Enemys do crazy things or stucking arround or spawn the "AttackBox" many times...

    Can anyone help me?

    *Sorry for Google English*