haopl's Recent Forum Activity

  • Hello.

    I have trouble to find an equation that can calculate an oval radius c lenght, while having the leading radius a, radius b and angle alpha.

    If anyone could help, I would appreciate a lot!

    (sorry for my english I hope I am clear).

    Thank you in advance.

  • Yes! It works they way you sugested :-)

    Thank you.

  • Hi.

    I have a problem with understanding "for each" loop. Generally I though I have an idea how it works, but under specific condition it doesn't:

    My code:

    - Mouse | Cursor is over [SPRITE-AAA]
    -- System | varibale1 > variable2
    --- For each | [SPITE-BBB] : Set opacity to 100
    -- System | varibale1 < variable2
    --- For each | [SPITE-BBB] : Set opacity to 0
    

    Please note: SPRITE-AAA and SPRITE-BBB is in the same family (I don't think it matters though).

    When mouse is over SPRITE-AAA, test varibable1 and variable2 and then do the "for each" loop for each of SPRITE-BBB sprites on the layout.

    What am I doing wrong?

    Thanks for any help in advanced!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I understand, this is not an online game?

    If not, then:

    1. create a sprite, an "eye", not Visible.

    2. add a behaviour "SCROLL TO" to the "eye" (not to the character).

    3. EVERY TICK: position the "eye, like this:

    X = player1.X + player2.X / 2

    Y = player1.Y + player2.Y / 2

    It will always center the camera between both players evenly.

  • Maverick1912: It would be a good tip...

    If HERO is ON COLLISION with 1PX-BRICK:

    --- HERO.Positiox.X-1

    (or on any other element collision/tip of gun). The animation is nice and smooth, no glitches.

    Unfortunately, this will not work, until there is no pixel-bricks on the floor at all.

    And I need a character to be able to walk on some lefted over 1pxBricks.

    And also, in my case, the hand with a gun is a seperate spirite, that rotates, so this solution will not work corectly:

    imgur.com/a/HXFQxQd

    (don't mind shooting through the wall, it's just an early stage of this project, it needs to be fixed obviously)

    -----------------------------------------------

    PROBLEM SOLVED.

    The collision polygon was not exact quare. It was skewed 1 pixel. I don't remember, which angled side coused that behaviour, but the lesson is that: always make sure your collision polygon is a perfect rectangle or square.

  • Laura_D: You are right, sorry about that :-)

  • Absolutely :-)

    animated:

    imgur.com/a/XOcj2gj

    still screenshot:

    imgur.com/a/42qBAfz

  • In my retro, pixel art game, I have created a wall, lets say 8x100px, made of 800 1-pixel blocks, placed next to each other.

    The idea was to let the player destroy the wall pixel by pixel.

    But there is a strange behaviour:

    The player can literraly climb on that wall, like spiderman, because a player can walk onto 1px higher stage.

    But, in my opinion, when the plyer climbs on first bottom pixel, should be stopped, because there is no space for him to walk foreward.

    I hope I made myself clear.

    Does anyone struggled with similar issue, and if so, did anyone find some solution?

  • Ok thanks.

  • I would like to edit poligon points, lets say, something like:

    Character is walking - polygon points A

    Character is crawling - polygon points B

    I could make two different animations for a sprite, but I have really a lot of different animations, and this solution will be a huge pain in the ass.

    Or maybe there is another, cunning way to achieve the same effect?

  • I will use the post to add mine question:

    Is there any way in construct to create independedn't canvases with existing behavours for each one (bullet, 8-way etc...)?

    Right now what I am doing is based strictly on math (tilemap based on arrays, and displaying only part of it, with a thick black separator, that hides a row of tiles, before they are fully displayed). But I don't think there is any other way... am I wrong?

  • Sure thanks

    I am building a beat'em up game.

    I want to put all "enemy" characters into one sprite, where number represents an enemy type animation (1-monster, 2-zombie, 3-soldier), like this:

    1_moving

    2_moving

    3_moving

    1_standing

    2_standing

    3_standing

    1_was_killed

    2_was_killed .... etc.

    When "on start of layout" I want to put random sprites on the stage, I make a random number to each instance of an enemy (called "character_type"), and then based on that, I want to use animation based triggers, to do something with the sprite, for example:

    "enemy" On animation "was_killed" finished => do some explosion, or whatever...

    Now, I should be able to have it rather like that:

    "enemy" On animation self.type & "_was_killed" finished => do some explosion, or whatever...

    Why do I do that in a such a twisted way: because that way I can define all behaviours for one sprite. Otherwise, if I create 20 different enemy types I will have to have 20 different actions/interactions defined. And if I have to alter something in their code, I will have to update 20 sprites, not just one.

    I hope it makes sense what I am typing

    Thanks a lot again!

haopl's avatar

haopl

Member since 1 Jun, 2016

Twitter
haopl has 1 followers

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies