c13303's Forum Posts

  • Figured out.

    Jpg compression was activated into the sprite (little button just right to the save button in sprite editor)

    :p

  • I don't know if it's relevant but I never had this bug before my last update (I think I had 1.53 before getting this one 2 days ago)

  • Strange fact :

    If I clone the buggy sprite, or if I create a new animation into the buggy sprite, all animations will fail with transparency after export.

    If I start a new sprite, copy / paste animation from buggy sprite, the transparency will export fine.

  • Thanks for the quick answer.

    I'm not sure to get exactly what you mean so here what I tried (without success)

    The sprite was actually over a transparent background in the layout (I've made a blank layout as a sprite library. Other sprites are in this layout too and have no problems with transparency after export though)

    So I put a colored background behind, and tried to export again.

    But it's still converting the transparency into black on the exported .png.

    :/

    Changing index.html CSS won't change anything since the .png actually has a black background and CSS has no influence on it.

    Re-edit .png after export may be a dirty solution, and such a pain in the ass since this sprite has many animations, with many frames ....

  • I made it work using "repeat 10 times" instead of "for"

    And got the "foreach" loop out of the "start of layout" , trigged by keyboard key instead.

    This way, I got the expected results

  • Hi everyone !

    Here's a little "bug" I got ...

    I'm using many sprites with transparency, everything is OK when working in construct 2. (latest version 158.2 64-bits, standard licence. )

    Then after export as HTML5 website, my main sprite (the hero character) suddenly has a black background instead of transparency. Other sprites are doing Ok, though.

    I tried different png compression, and no recompression, but the sprite still appear with black background, and only after export.

    This is very surprising considering that some weeks ago it was exporting fine.

    I checked the .png files after export : they got the black background.

    I checked the .png files before export : they don't.

    So the export process is filling the transparency with black, on this particular sprite for some reason.

    This is very strange.

    Tried to redo many times, many tests, refill with alpha 0 paint : it's not better.

    Now I can't think about any new direction to check, so any help will be very very apreciated !

  • okay thanks. I've seen families are made to host different sprites that would share some common behavior but your technique seems good as well to separate the same sprites yes !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks. It's a good idea and I figured out that my problem was also related to a bad use of "pick nearest"

    I have to make conditions, then a sub event with just "pick nearest" to make it work.

  • I'm trying to tell in another way:

    Foreach Insect :

    • If Insect.hungry = 1
    • - Pick Up the Nearest Insect (who is not the same, and fit to its taste)

    So far : it's good, I got Insect (the victim) and Insect(0) (the predator)

    PROBLEM:

    How do I update the predator ?

    If I make some changes to Insect, that will use the victim.

    If I pick up the predator by UID, it doesn't work, probably because i'm in the Loop "foreach Insect" ..

    There's a basic thing I don't get, if someone can tell me any method to do what I'm trying to do, it will be greatly appreciated.

    BONUS SUGGESTION : that would be awesome to get some aliases, like in mysql, like :

    • Pick up Insect.hungry = 1 as Predator
    • - Pick up nearest Insecte (not me, etc) as Victim

    Predator.target_uid = Victim.uid

    What do you think ?

    Cheers

    Charles

  • Hi,

    I got this : scirra.com/forum/pin-one-sprite-to-another-of-the-same-type_topic46515_post291421.html

    This is working. But here's a particular case I don't get, and since it's happening very often, there must be something I don't get !

    A screenshot of the case :

    <img src="http://ardkor.info/uploaded/C2.jpg" border="0" />

    As you can see, I got 2 instances of "Insecte", first one is chasing the other.

    So far, I can have Insecte(0) and Insecte(1), displaying correct UID.

    But for some reason, once I've reach Insecte(1), I can't change values from Insecte(0).

    I've tried another approched (the disabled code in the end) with an external value to pick up the Instance but it doesn't work ...

    Can you help me ?

    Thanks a lot

  • Maybe this can help ? scirra.com/manual/163/line-of-sight

  • " I would like to prevent enemies from overlapping each other when they attack the Player."

    I currently have a similar problem ! I tried to set them as "solid" as well but it doesnt work, they don't "bounce" or avoid each other and they overlap.

  • thanks for your answer. Actually it makes the problem unsolvable (at 6FPS there will be a slide effect if we can't put movement at same framerate) so we decided to change the whole animation method and have a 25FPS+ animation.

  • Hi there,

    Still on my point'n'click, working with a graphic designer.

    We're using fancy graphics with basic traditionnal animation.

    We're using 6 fps animation.

    Problem now, is that the movement of my game appears to be 60fps so it makes a wrong slide movement when walking.

    I'm using Pathfinder for the movement, I've read tons of stuff on Delta Time but I can't figure out how I can limit the movement to 6FPS since I can only tweak its speed.

    Is there a way to cap the whole project to 6 FPS ?

    Thanks for helping me.

    Charles

  • Yes that should work thanks