LoS and n of angles

This forum is currently in read-only mode.
  • Two quick question.

    1. Why LoS behavior don't work with my settings? I only have few solid objects, but still - with obstacles set to solids or custom, my platforms - objects with LoS behave like they in sea of solids objects, they blind.

    2. I don't know how to "lock" animation angles. I mean graphic vise is ok, my "ene1" sprite set angle toward "gracz" sprite without rotating (well, is humanoid that stand on the ground), but my "ene1" spawn some objects on frame 15 and one of them have bullet behavior - "ene1pocisk" (bullet) don't travel with straight line, just like original spawn point ("ene1" sprite) is still rotating. I don't know what to do. I tried almost everything I can imagine, but still with no luck, so... how to "lock" angles to "left" and "right"? Everything about "ene1" is in "ene1" group.

    Here is quite big .cap and little NSFW - dl.dropboxusercontent.com/u/16947862/hd.cap

  • For the love of pixels - help me

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So, just to clarify, when "ene1" fires a "ene1pocisk" (which has the bullet behavior) you want this "ene1pocisk" to travel horizontally (in a straight line) from it's starting position?

    I have your project open, it looks awesome by the way, so I'll try help if I can. It's been quite a while since I used CC, but I have a soft spot for it so I decided to get it working again.

    Also, regarding your first question, which object is using the LOS behavior? What are you using the LOS behavior to do?

  • I will upload newest .cap because I messed stuff pretty badly. MagicCam in not very friendly plugin. Or I'm just stupid.

    And yes, I think what straight line for bullets is better for evading them on something like stage 1,2,3, but I simply can't do that.

    So, "gracz" (is player) has LoS, and there is test, hm, vase on second platform. When obstacle is set to "custom" (so, none obstacles) the particle above vase spawn particles, but when I put collision set to "solid" nothing happens. Same for ene1, he actually have LoS behavior (when it see player it start shooting) and its working when obstacles set to custom, but when "solids" is selected... you know, don't work.

    Give me a hour and I upload "newest" .cap. Even bigger mess <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";-)" title="Wink" />

    And thanks!


    Here is stuff:

    • cap file



    • my plugins and effects folder for compatibility sake



    • data folder with audio if you wanna see/ hear full power (place data folder in same directory as .cap)



    Like I said before. Ene1 is broken, LoS for Ene1 and gracz is broken ( ene2 use system by other guy from CC forum, its use "distance" expression, dunno about it...but it looks like is something like LoS, almost) and there is other things, maybe simple to fix, maybe not, dunno.

    1. When you press Z, ggracz (its graphic for gracz) play animation szut. Long story short: sometimes randomly system spawn two attacks from animation. Totally dunno why. Everything about movement is in group "ruchy", and attack itself is in group "atak1". Actually is quit cool that sometimes you spawn two attacks (for cost of two attacks unfortunately ) but I don't like when something just happens without any control over it. Can you help me with that? With audio files you can ever here two thunders....

    2. Now I have very, very basic life system. When last life is gone, system goes to another layout with "you died" graphics and when you press something it should go back to layout with game (well, is mostly test level, but...), but when system go back to layout with game everything is black for time that player will lost one life. I don't know is this a Magicam fault or my stupidity. Can you help with that too?


    Crap, I can't post links :/ Try tiny URL.

  • I didn't get a chance to check out your cap file yet, but if you want another method of line-of-sight that works a bit faster try this out: https://dl.dropboxusercontent.com/u/471 ... tomLOS.cap

    As for locking rotation angle, just do this formula:

    angle = floor(angle / division) * division

    eg: Sprite.Angle = floor(Sprite.Angle / 45) * 45

    That should always rotate to the lowest (eg: 46 is rounded down to 45, and 89 is rounded down to 45) 45 degree angle (so 0, 45, 90, etc)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)