Freddy33's Recent Forum Activity

  • Thanks Ribis.

    So I set that event first as a condition?

    Is that an interger?

  • Cheers plinkie/bad Mario.

    But why does that piece of code work. What and how is it doing exactly?

    Sorry to be a laymen. Also why is not player.x, player .y? Why player.x, player.x?

    Thanks

  • Hello, Thanks for the help with this one. I have been at this for hours and getting really fed up with it.

    Basically, when the player is 70 pixels or further, I want the zombie to walk to the player. Also when the player is to the right of the zombie, I want the zombie to walk to him.

    I have an issue with the whole event,i have done something similar on a training game before and it worked. But not this time. The first capx is the game in question. The second cap was the game where it actually worked.

    I have no clue what I am doing and trial and error is not working. I think this a knowledge gap or inexperience with events. Any help would be appreciated. Enemy AI is going to be a big part of the game, so I want to be doing things right in the first instance.

    Ta

  • Hello, Thanks for the help with this one. I have been at this for hours and getting really fed up with it.

    Basically, when the player is 70 pixels or further, I want the zombie to walk to the player. Also when the player is to the right of the zombie, I want the zombie to walk to him.

    I have an issue with the whole event,i have done something similar on a training game before and it worked. But not this time. The first capx is the game in question. The second cap was the game where it actually worked.

    I have no clue what I am doing and trial and error is not working. I think this a knowledge gap or inexperience with events. Any help would be appreciated. Enemy AI is going to be a big part of the game, so I want to be doing things right in the first instance.

    Ta

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello, I got this code from you tube. I have also seen it on here somewhere. Whats the point in it? The enemy seems to behave the same, even without this event.

    Also what is state? I know what Boolean and the number variable does. With state you can write in a box, but it dosent seem to do anything if I write idle or run ect?

    Thanks for the help.

  • id go with statements or variables/booleans or in C2 way when something happens, switch a variable to some value different than 0 then if that variable is not 0 play surtain animation.

    Hi Buddy,

    Ok, I have worked it out. Not sure if its the best way to do this, but it seems to work well..

    Any thoughts?

    ta

  • Hi Buddy,

    Happy new year! Well you never know, Elon musk is making progress. Although a flying hoverBoard would do me!

    Thanks for the advice, I had a feeling I would run into this problem again. Shooting wont work, unless i disable the top three, I have tried for about an hour to get it to work, but I think this is a knowledge gap. Any ideas?

    Thanks for the help!

  • Hello and happy new year.

    My main player will have about 8 or 9 animations, like idle, run, shoot, jump, roll, etc.

    From my experience, using events alone can sometimes cause problems. Should I use states or variables for each animation?

    You see, the player will be performing these animations frequently, so every thing needs to be smooth. Any direction will help me decide the best way and I should be able to put it all together.

    Many thanks

  • Thanks buddy,

    sorry for the late reply. I see, that's actually really handy (the parameter part. I think I have been avoiding funtions so I am going to spend a day and create a simple game where I can practice with functions and get a full understanding of how and where to use them in the event sheet)

    Offset parmeter i see alot in the kiwi game, like if player is against wall, set offset to x-32, y, -122. I assume its just used as position for the player.

    Thanks mate, have a fab new year :-)

  • > However would this still work if one of the enemy's required more damage to get destroyed? Would you just add another instance variable?

    >

    If you talking about just General "Health" without displaying the Health Animation Percentage then you could do it in many ways, the simplest one will be to create an Instance Variable "Health" then you can do.

    On collision With Object

    ====>>>>Susstract 1 from "Health"

    =========>>>>>>>Health <= 0: Destroy

    And if you need to display the Health bar Progress then I leave you for you to figure it out as they are many ways to do it, you will have to find the one that suits your needs, they are many Tutorials that you could use.

    ====================================

    > I have tried loads with image points, but no joy. I think its because a ball perhaps? I tried replacing the ball with a stick man and it worked perfect.

    >

    Set Position to Image Points it should work if you set up everything correctly unless is a bug.

    The Shape of the objects doesn't affect in any way, the two important Factors here are:

    When you set Object A Position to Object B ImagenPoint(X)

    Object A:

    Check the Imagen Point = 0

    As this is the Default Coordinates of any Object that Constructs use to Position the objects on the Grid

    ===============

    Object B:

    Check ImagenPoint(X) if the Image Point its placed in the right Location where Object A you need it to be

    And then when you compare Both Image Points you will easily see if they gonna be positioned like you need to be and if not adjust the image Points as you need.

    However, If you think that both have the Image Points in the Right Places, then without seeing a simple capx example will be hard for anyone to help you as it could be many things:

    I would start from checking if Both Objects are in the same Layer or if they are on different Layers make sure that both have the same Parallax as if you place one of them in another Layer that has Example (Parallax = 0 ) you will have to translate the Coordinates from Layer To Layer

    Hi Buddy,

    Adding a health bar is fine. I ment specifically in your example. You have the blocks in black and the green health bar attached. What if one of those black blocks had a higher health limit? Because the uid is linked, is it possible to increase the health of a chosen black block?

    Regarding the pin. I found a solution. If I changed the ball to a circle collision polygone it worked, but because of physics the ball jumped around. I created a new ball and it worked fine :-). I downloaded the sprite and had somthing weird happen in the pass. No sure what causes it but only ever had a few "glitches" with this sprite!

    Again, thanks for all the help. If I don't here from you have a great new year dude.

  • Thank you for explaining this again and taking your time.

    I understand, its quite a clever way of linking the UID, through the variables. That is defiantly an eye opener and can see why and how it is better doing it that way. You could save all this and create a tutorial, I am sure you would help many people.

    Its new to me so it took a while before it really made sense. And it does make sense. However would this still work if one of the enemy's required more damage to get destroyed? Would you just add another instance variable?

    I have tried loads with image points, but no joy. I think its because a ball perhaps? I tried replacing the ball with a stick man and it worked perfect.

    Thanks buddy

  • Hi Tarek.

    Thanks very much for such a detailed example. I appreciate it.

    Even though im still very much a beginner, your example made sense straight away. The way its laid out for sure. Its a really good example. Im just sussing out why it all works together with the events. I do understand somewhat though. I think its the expressions within the events that confuse me the most.

    I learnt not only about uids, but pinning as well. I knew how to pin, but never used the position on a pinbox like this.

    Just going to study this so I know the ins and outs.

    Thanks dude.

Freddy33's avatar

Freddy33

Member since 7 Aug, 2018

None one is following Freddy33 yet!

Trophy Case

  • 6-Year Club
  • Forum Contributor Made 100 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

9/44
How to earn trophies