tarek2's Forum Posts

  • tarek2 yep that's exactly what i was trying to do thank you so much, So it's the detector that gets called in at enemy spawn, and whatever tiles the detector is overlapping it locks out is that right? How do you do the functions? I haven't seen that ability or is that from a plugin?

    rbailey83 No problem man glad it was helphul

    Yeah that's right the Detector is the one checking for the neighbor's tiles of the enemy tile when is spawned but only checks overlap if the enemy was spawned also if you notice I exclude the enemy Tile on the overlap Checking , I used the function because is a Trigger so it checks the overlap once and also the Function are really good because you can pass the UID of the objects so you can do more extra staff to that particular object later on by just picking that UID

    You should definitely learn how to use the Functions if you can as has many benefits, they are very easy to learn and once you learned you will see is not much complicated and very useful

    The Function is an official plugin from c2, you can add the Function Plugin by going to the Right side panel and right click on the folder that says "Object Types" then choose insert new objects and then choose "Function"

    You can read more about it here

    https://www.scirra.com/manual/149/function

    I must be really tired when I did this yesterday as after wake up today and look it at it again a saw a few errors like the "trigger once" in one of the function so we don't need that in a function as the Function is already a trigger once so yeah haha I don't wanna show you bad habits I corrected that and another thing that we don't need is to create and destroy the detector that was unnecessary from my part so I update the Capx much cleaner

    https://www.dropbox.com/s/1lwpxn8k4pdgaie/Tiles%20Spawn%20Objects3.capx?dl=0

  • Hi rbailey83

    something like this??

    You didn't specify which types of tiles (Tilemaps, sprites tiles, etc..) so I just did it with Sprite Tiles, I hope it helps

    https://www.dropbox.com/s/al7t5tl7cvx1yv9/Tiles%20Spawn%20Objects.capx?dl=0

  • tarek2 , Thank you very much! Is kind of that.

    What I need is to bring the popup In and Out without changing the value of the Slider Bar (slid_line).

    Like: If I bring the Popup In and set the value of the first bar to 60, when send the Popup Out of the screen, the value of the bar would remain 60.

    What is happening is that I set the bar value to 60, and when I send the Popup out of the screen, the bar value goes to 0.

    I see what you mean, maybe like this?

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

    And also you can do it in less events

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

    you set your minimum value at the start of the layout then it only changes if the value is changed

  • Hi, I'm not sure if I understood properly is this what you need?

    https://www.dropbox.com/s/3f5vd0yz9rahvze/SlidePopup1.capx?dl=0

  • datiel12

    Also one quick note just in case you Forget:

    Right now you have one enemy and one gun and I'm not sure if you planning to add more instances of that enemy on the same level but if you do make sure you link each gun with his Parent enemy other ways you will have travel picking, you can do it by "Instance Variables" or you can link them in a "container"

    Good luck with your Game looks pretty good

  • datiel12

    I'm so glad that you just sent the minimum capx other ways I would have had my second heart Attack <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    if you change this in those two places will work:

    On Event sheet: EnemySheet Lines 27 to 29

    https://www.dropbox.com/s/v34ozsm4hev0kxy/turret%20gunFix.png?dl=0

    And On Event sheet: CorePlaySheet Lines 90 to 91

    https://www.dropbox.com/s/cj5kdlrczbba5 ... 2.png?dl=0

  • datiel12

    before you post your capx try this

    https://www.dropbox.com/s/orbftbkmjt3qp8f/turret%20gun.png?dl=0

    note: you need to put the enemy gun in a container with the enemy

    Edit: jeje you where quicker done me to post the capx I will have a look

  • datiel12

    can you share a minimum capx so we can have a look? is quite hard to know just from the pictures as it may be the fault in somewhere else

    Also, who is the one that doesn't shoot the Enemy or the Player?

  • Artpunk

    Nice one!! is Looking Grate can wait to play on the iPhone I like the nice funny characters haha I see like you don't lose the time well-done mate keep it up, nice to see people like you creating games with c2 gives a lot of motivation to create Games

  • datiel12

    Something like this?

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

    you can organize everything under The Line Of Sight to save some extra checking

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

  • > Use "For each bee"?

    > Also, you need to organize your events a bit, there are too many small events, it will very soon become hard to keep track of them.

    > Move some of them under "On every tick", others under "Every 0.1s", create functions etc.

    > Something like this:

    >

    > Thanks for the tips. I tried for every bee but i got anerror at the beginning. The game still worked but the enemies didn't work...

    Matei511 you cant use the Active group that way as it would not work as intended or not work at all, as you use it with multiple instances of the same object is not like instances variables which they act independently so here once you deactivate the group you will deactivate for the whole bees and vice-versa, the Active and Deactive Group is best suited for one object like example for the player as is one object, or you can use it with multiple objects for specific things example the beginning and the end of some particular "Zone events" etc....

    The reason you will have problems activating it and deactivating it is:

    Because first the For Each will act for each instance independently so you gonna have the scenario where you have some Bees Angry and some not so this will a cause conflict as some they are firing Active group and some they are firing Deactive Group all at the same time so unless they are all the at same state example not Angry then it will work the deactivate the group and vice-versa and this will work as long as the trigger to deactivate groups is outside of that group because if are inside the group, once you the deactivate the group it will not be possible to activate it again as all the triggers to activate it are inside the group and the group is obviously is not active.

    One thing you can do is if the bees are in a particular area or zone then you can do:

    1-Before enter that zone where all the bees are, then place a dummy sprite to active the group bee controls

    2-At the end of that zone where are the bees you can have another dummy to the activate the group bee controls

  • DiabloOvermind

    No problem mate glad to help, don't worry it happens to everyone, to be honest, it wasn't easy to spot I had to read it a few times myself

    dop2000 give you a really good advice and very important one, it will make your life easier Debugging things

    Btw dop2000 Nice addicting game congrats

  • AndreasR

    if I remember correctly the Pin behavior is the same as Every Thick set position, so wouldn't be easier to do?

    Every Thick: object1 >>Set position to (base_object) image point 1

    like this doesn't matter where you place the image point in different animations as long that animation has the image point will be placed on the correct spot

  • DiabloOvermind

    Are the (Rocket_Projectile.UID) and (Towers) the same object??

    If not How do you link them?? I refer to the event 7 because the Rocket_Projectile when are created can have different UID unless you link them somewhere else that's the only thing I can see that doesn't make sense

    I see that in event 3 you pick up the instance variable from the bullet but on the Event 7 you pick up the UID of the Rocket_Projectile.UID which is a completely different thing, I think you meant to pick the Rocket_Projectile.(Instance Variable) and you picked up the UID by mistake

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • atmas

    This it may help you to get some ideas for Trafic Ai is pretty basic I'm sure is not what you want but I will leave it just in case you find something useful

    https://www.dropbox.com/s/sgrr2of0okr2s9e/GTA%20San%20Andreas%20Light%20%29.capx?dl=0