Maako's Forum Posts

  • Yes thank you this is exactly how I want the objects to behave

    I think I understand how to do what I want now and will try to do it.

    Thanks a lot for the help

  • here's a capx

    https://ufile.io/joh49

    I would like to make it so that I could change the position of the blue object to be closer or farther away, but still behave as though it was attached in this way.

  • I think what you need is Pin behavior.

    Set Object2 position, then pin it to Object1 as "Position and Angle".

    Hey thanks for the response

    This would work if it allowed me to change the distance between the 2 objects.

    So far I don't see any options with the pin behavior that would allow me to do that.

  • It's kind of hard to explain but what I want to do is basically: Set Object1 to Object2's X position + 50. But if Object 2 rotates, I want Object1 to rotate as if it was attached to Object2.

    I can't just move an image point either because the distance will vary a lot.

    I also can't use the "Move at angle" command either for other reasons. It has to be Set Position.

    I remember back when I used MMF2 I found an equation online that used tan(?) or something like that. I know very little about math when it comes to angles but I'm sure it is possible.

    Can anybody help me out?

    Thanks for any input

  • Ok I see. I'm pretty sure I understand that now.

    Programming has never been my strong suit so things like this aren't always easy for me.

    I very much appreciate the help though. The solution is working perfectly

  • Ok I see, thanks, both these solutions will work fine.

    I was trying to use the "else" condition earlier but couldn't figure out how to implement it, this makes sense though.

    I don't understand how the second solution works though. Setting a value to (itself=0) ? It works but I don't understand how lol.

    Thanks again for the help

  • I feel like there is a simple answer here but I am flustered and can't figure it out right now.

    The 2 basic conditions I used were

    If Q pressed --- Set Value to 1

    Value = 0

    If Q pressed --- Set Value to 0

    Value = 1

    I'm pretty sure I understand why this doesn't work, but can't think of a way around it. Am I missing something?

    Thanks for any input

  • Oh wait I think I see.

    I was looking at the NAME of the layers, which I never changed from "Layer 1" and so on. So by moving the layer, it affects everything coded to that layer's actual number, not the title.

    I understand now. I can't check at this time but I'm sure that's what the problem is.

    Thanks for the help everyone. I'll come back if I'm wrong but this surely must be the problem.

  • Hi 99Instances. Thanks for the response.

    Currently, my enemies and their health bars share the same layer, and the platforms/floors are on a layer below them.

    Both of these layers are at parallax 100,100.

    The only layers that have different parallax values are the one with the HUD (0,0), and the background (5,5)

    I've been doing some testing, and it seems as though for some reason, if I move this new layer below the other layers, that seems to be causing problems, even if I don't alter it's parallax values.

    For example, if I move this layer down, objects that are being created on another layer are appearing BEHIND objects when they should be appearing in front.

    The problem seems to be coming from moving the layer down below other layers?

    I have been trying to recreate this problem in a new project but so far no luck.

    Anybody know what might be happening?

    Thanks

  • Hey thanks for the response.

    I feel a little weird posting the capx because of how much progress I've made on the game.

    I was hoping there were some known issues.

    I think I'll try some more testing and if I can't find anything I'll have to post the capx.

    Thanks again.

  • I'm making a platformer game. I use parallax 0 for a basic HUD, and Parallax 5,5 for a pretty large but very simple background.

    I tried to add a second, closer background, and when I changed it's parallax to 50,50 it caused major lag issues along with enemies falling through floors and their health bars flying all over the place.

    Also, for some reason, if I move this layer to the top of the layers, there is no problem.

    My layout is pretty big at 6000/2000 pixels and I have a giant sprite as the background that's prallax is 5,5. I thought it had something to do with that but if I turn off the parallax/delete the backrgound sprite i get the same problem.

    Are there any known issues with parallax causing problems? I checked google but couldnt find anything.

    Thanks for any help

  • This seems a bit simple and might work for you but did you try combining trigger once and destroying the projectile if it hits even one enemy?

    Hey Destitute, thanks for the response.

    I should have mentioned that the "Fireball" object is supposed to be like an explosion, that stays on the screen for a few seconds, and damages any enemies that touch it.

    I think I've found a solution.

    What I've done is every time a "Fireball" is created, I create an Array with an "ID" variable that is set to that Fireball's UID.

    Then if an enemy touches it, it deals damage then adds the enemy's UID to it's array and won't damage it again if that UID is on it's array.

    Then when the fireball is destroyed, so is it's array.

    So far it seems to be working and I haven't found anything wrong with it.

  • Hey thanks for the response. I've never really used any of these functions before and am looking them up trying to figure it out.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm trying to make it so that:

    If Fireball collides with Enemy - reduce Enemy health by 10

    If the Enemy stops touching the Fireball, and then touches it again, I do NOT want the damage to happen again.

    The only thing I can think of is to add a variable to the Enemy that becomes the UID of the Fireball when they collide, and then preventing damage from happening if the variable is the same as the UID.

    However this would be inconvenient because I plan on having a large number of these types of abilities, and I don't want to make a new variable for each one.

    I feel like I'm missing something simple but I can't figure it out.

    ::EDIT:: I forgot to mention that I need this to work if it overlaps multiple enemies at the same time. I tried to store the enemy UIDs in a List but the list won't accept them. Is there a way to store multiple UIDs in a list and then reference them somehow?

    Thanks for any input

  • Hey thanks a lot this does the job