Sup with that?'s Recent Forum Activity

  • You might be better off grouping said objects in a family and building around that. Behaviors that rely on solid state don't really make exceptions IIRC.

  • I'm guessing no solution? Darn it I was hoping someone knew some trick

  • Can two layers with different blend modes be made to interact in a similar fashion to two objects on the same layer? E.g. Layer 1 = "Normal", Layer 2 = "Source atop" --> objects on layer 2 interact with objects on layer 1 according to their respective blend modes.

    Premise:

    Imagine a scrolling top-down shooter game set in space. Sometimes there are large objects in the background, like asteroids, space stations, etc. When foreground objects like spaceships fly over said background objects, they cast a shadow on the surface below. However, they don't cast a shadow when they're flying over the void of space.

    I can simulate this easily enough if I place the shadow objects on the same layer as the background objects, and give them "source atop" blend mode. But there's a catch - the shadows, as you might assume, are translucent, and when two or more shadows overlap they create darker spots which look weird. Normally my solution to this would be to make the shadows opaque and then put them all on one layer, then adjust the opacity of the layer itself. So therein lies the problem, I either have all my shadows on one transparent layer (i.e. shadows don't overlap, but can't use blend modes) or have the shadows on the same layer as the background objects (i.e. shadows overlap, but can use blend modes).

    Of course, if there's a different solution to the problem I'm all ears.

  • Aha, now I can do away with all the convoluted angle checks I was using. Thanks!

  • Is there such a function?

    I believe Physics behavior has this, but I'm not using that. Basically I want a sprite to play different animations when it's rotating clockwise and counterclockwise (think a car where its front wheels turn to steer). A player-controlled sprite can do this easily by relying on player input, what's a simple way to reproduce the same for an AI-controlled sprite?

    Caveat: AI uses "rotate towards position" action, so I don't have separate AI turns right/AI turns left actions I can stick this into.

  • That's just because eventually the period becomes a negative number and starts "increasing" again in the eyes of Sine behavior. As I said, it's a really simple example.

    You can just put in a condition to prevent it from going below 0.1 or something to make sure it doesn't slow down again.

  • https://www.dropbox.com/s/qa5ak3rqfqjkplz/SineEg.capx?dl=0

    It's the absolute basics so you'll have to tweak it to your needs.

  • If you decrease the Sine's period parameter it will cycle faster, so just use a timer to periodically decrease it, or use dt to decrease it steadily over time or somesuch.

    E.g.

    [Set timer behavior to 5 sec repeating]

    [On timer] --> Set period to CurrentPeriod - 5

    or

    [Every tick] --> Set period to CurrentPeriod - dt

  • You do not have permission to view this post

  • Why not use a regular function to the same effect? Am I understanding this incorrectly?

    [Object takes damage] --> run function "Damage Taken"

    [Function "Damage Taken] --> play animation, subtract health, build more pylons, etc.

  • Welp, guess we're stuck with the current abomination. I had such hopes of ye, image editor.

  • Nah. I'm effectively using C2 as a one-man team to try and cobble out a game, by the time I finish AND if I manage to make any profit from it I'll probably have paid the equivalent of a C2 business license if not more. I don't think subscription is for hobbyists.

    That and I'm still disgruntled with C2 in some ways, such as the god-awful sprite image editor. For now C3 looks to be pretty much the same in those aspects so I don't see much point in switching.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Sup with that?'s avatar

Sup with that?

Member since 30 Aug, 2010

None one is following Sup with that? yet!

Trophy Case

  • 14-Year Club
  • Forum Contributor Made 100 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies