Saitama's Forum Posts

  • Thanks for answering ! Actually, I've tried that (the every tick + inverting events), but nope, still the same problem.

    The counter is equal to 0 at the beginning.

    I die, the counter is now 1.

    Layout restarts, the counter is 0 again. What the...

    EDIT : Sorry, I was being autistic. There was a "set Deaths to 0" condition in my "On start of layout". WTF was I thinking at the moment. Thanks for the help !

  • I don't know if I'm autistic or something but hell, I thought it would be as simple as something like :

    But no, as soon as the layout restard the text is reset, even tho its content is supposed to be the global variable Deaths. What the hell ?

    Also, if someone know how to print the the time displayed by the Time Manager plugin, that'd be nice. Thank you, I'm curious to know what's wrong

  • Freakin perfect. Thanks a lot alextro, problem solved !

  • Hello people,

    Long story short, my player's sprite can grab some object thanks to the physic behavior, like, when the character is near an object and the cursor is overlapping this object, the player can grab it and move it while pressing the space bar. It works fine but I'd like to add a little effect to it.

    Like, a "link" or "light ray" which connects the character to the object. I mean, kinda like this :

    Also, If possible :

    a) As the object is near the player => The ray/link is large

    b) As the player is moving the object far away from him => The ray become more and more thinner according to the distance between the object and the player

    But that'd be a bonus, if you can already explain me how to create such a visual link between sprites I'll be glad of course. If it appears that you know how to make the previous conditions too, I'll not blame you haha. Thanks for reading, hope you can help !

  • Hello LittleStain thanks for answering

    Well as far as I tested it, with Construct 2 behavior I can only do something like that :

    A hole in the dark. But I just want something like that :

    (for the example only, so some light source which provides an ambient light, not a hole...I know this screen doesn't have a real light it's more like a painting or something. It's just to show you the idea, the master words are ambient light.) I don't know if it's possible. If It's not I'll just fake it by making a glow-thing with Photoshop and use it on my lamps, like that :

    But I would like to have a "real" light.

  • No idea ?

  • Hey people

    The basics of the project I'm working on are done. My dude can move, the physic works like I want it to work, my lamps aren't some dumb and weird snakes anymore and the whole thing starts to be something different than a little piece of sheet. So, now, I have to care about more "graphicals" tasks, like the animations, the background, a parallax, and some light.

    Light.

    Every single tasks evoked above are not very difficut if we have at least some Photoshop or WhateverTheSoftware skills, but making a convincing lighting with Construct 2, however, seems...weird. I mean, basically lights cut a hole in the "darkness", and that's the only thing I can really do, isn't it ? I hope the answer is "no" because I would like to have an ambient light. More diffuse.

    My lamps will be the source light. Any idea ?

  • [quote:vos2g558]In my example I used -1 for "object2 uid". That means just connect to a fixed location on the layout.

    Ok ! I didn't know that, good to know ! Thank you r0j0hound. Now the thing works and I understand why it didn't before.

    Good evening, thanks for the help everyone, I learned some stuff here, that's pretty cool !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I can't even tell which body is "undefined", everything is supposed to be defined already.

  • Rofl, I'm not a smart man. Sorry, of course I can, here's the capx :

    ht*p://www.mediafire.com/download/pdq0v4n8qi1or8u/JoinTest.capx

    As you may notice, it's r0j0hound's example but with a background, which is a sprite on another layout.

  • Yeah I can't post the URL because I'm new, wow, rude (but understable because spams etc)

    Do I have to create a new topic ?

  • In my capx when I use the same technique than in your example

    I don't really understand why. It says "the body is undefined" as soon as I use a background (Tile map or Sprite).

    I tried on the same layout then in another one (wire and lampe on layout A, Background on layout B), the error still occurs

  • Thanks, they are perfect (both of your examples). Just a last thing about yours, R0j0hound. I noticed that your solution results sometimes by a Javascript error "the body is undefined". It's not a real problem because it doesn't concern the place I need to put this lampe, but I still can't figure out why it happens. Any idea ?

  • Okay this was clever, I wasn't. Indeed, it works ! But the thing still swinging now, like if someone just gave it a little push. Is there a way to make it immobile at the beginning ? Thanks for your answer anyway, it really helped me, as easy as it was x)

  • Nobody use Chipmunk physic here ? :/