ArcadEd's Recent Forum Activity

  • It is a Construct thing yes with picking. When you pick the first sprite by var=1 it narrows the pool of sprites to pick from to that one only, so it won't find the other sprite in that same event.

    There is a way to do it in the same event but it can sound a little convoluted, after picking sprite.var=1 has 0 health, in the next sub event you can use 'pick all sprites' again to open up the pool of sprites to all, then in the next sub event you can pick sprite.var=2 has 0 health as well so then when you hit this end condition I think you will have what you wanted.

    Also an important thing, I don't think it will work anyway with system conditions for picking instances. Use the actual sprite object conditions and not system.

    That makes sense and it worked. I simply did this:

    - System -> Pick sprite by evalutating sprite.actorID = 1

    --- System -> sprite.health <= 0

    ----- System -> Pick All sprite

    ------- System -> Pick sprite by evaluating sprite.actorID = 2

    --------- System sprite.health <= 0 -----> Browser Alert "Game Over"

  • Sometimes I run into snags like this in C3 where I feel like my code should be working and isn't. I usually come to find out it's something with how C3 works that I didnt' understand.

    Anyway, I have 2 players on screen. Using the same sprites, but they have an instance variable I use to perform checks. This is the first time I have run into an issue as I want to check if both players health are equal to or less than 0. Here is my code that doesn't work.

    - System -> Pick sprite by evalutating sprite.actorID = 1

    --- System -> sprite.health <= 0

    ----- System -> Pick sprite by evaluating sprite.actorID = 2

    ------- System sprite.health <= 0 -----> Browser Alert "Game Over"

    In my mind it's picking the sprite for actor 1, checking if it's health is <= 0, if it is, it's then check the same for actor2. If that is also 0, game over.

    Thanks.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for adding this to the latest beta version.

    I have been looking at this and I realise I misunderstood your first post.

    In that case, it's working as it has always worked. The On Start trigger is executed when ever the timeline starts playing, there is no distinction between starting from the beginning or being resumed.

    I think I will add a parameter to be able to decide if it should be triggered at any time, only from resume or only from the beginning.

    Can you make that file you shared public? I would like to take a look at it.

  • Bingo! Thank you.

    "Is visible" condition should be above "Pick random". You want to first pick all visible instances, and then pick a random among them.

  • I tried that, getting the same results. I did double check that spawners are in fact visible to start.

    The problem is that objects are not destroyed instantly. So the loop can still pick the spawner instance which has been destroyed. A simple solution is to check another condition, say make destroyed spawners invisible and pick only among visible instances.

    > +Repeat NumberToGenerate times
    ++Spawner Is Visible
    ++Pick a Random Spawner Instance
    Spawner: Spawn EnemyBase
    Spawner: Set invisible
    Spawner: Destroy 
    
  • OK, I have been using C2/C3 for over a decade and every once in a while I seem to run into this same issue and I just can't wrap my ahead around why it doesn't work. If someone can explain to me what I am not understanding about Repeat.

    On function GenerateBases (Param: NumberToGenerate)

    +Repeat NumberToGenerate times

    ++Pick a Random Spawner Instance

    Spawner: Spawn EnemyBase

    Spawner: Destroy

    I will still get EnemyBases being spawned on the same location. I know it's user error and I am not understanding Repeat. Help appreciated.

  • Working on top down shooter where you are flying in the sky, but there is land below. I don't believe the lighting system in C3 is capable of doing shadows and lights in this way, but figured I would ask.

    For example showing the shadow of my Plane on the land below. I may end up just needing to use a sprite, but I wanted to check.

    Thanks,

  • I have been looking at this and I realise I misunderstood your first post.

    In that case, it's working as it has always worked. The On Start trigger is executed when ever the timeline starts playing, there is no distinction between starting from the beginning or being resumed.

    I think I will add a parameter to be able to decide if it should be triggered at any time, only from resume or only from the beginning.

    Can you make that file you shared public? I would like to take a look at it.

    It should be public, it's just on my dropbox. Will it not let you download it?

    I zipped it up and put it on my ftp.

    arcadeinabox.com/timeline.zip

    And that is excellent news. Thank you

  • You could replace the drag drop behavior with the car behavior and just disable it on all the instances but the head. Or just set the head instance (sprite.i=0) position to the car.

    Also currently it just pulls objects together if they are farther than 32 pixels apart. You can also make it push the objects apart if you remove the max from the move at an angle equation. I think that’s what you meant by squish together when braking.

    Thanks, I'll try that.

  • Here's a behaviorless way to do it.

    First chain tries to replicate the stretch from pinning to pinned objects.

    The rest order from head to tail with an adjustable stretch stiffness.

    https://www.dropbox.com/scl/fi/yzrr05uk5ch8fex2hrqrv/chain_stiffness.c3p?rlkey=zrmf55xltlcqht67inff5ic27&st=yuj5hlku

    Might be useful or give some ideas.

    Both are great options. It looks so smooth right now as it is, I hate to mess with it. haha. But I may need to resort to one of these two options.

    R0J0hound Very elegant solution, I would need to figure out how to make it work with the car behavior as the head and the other pieces trailing behind like it does when dragging. Also make it "squish" past default when decelerating. But a great starting point. Thanks.

  • The "stretch" effect with Pin behavior is not intentional, it's basically a bug. Check out my comments in this post:

    https://www.construct.net/en/forum/construct-3/general-discussion-7/pinning-issues-147318

    Oh, well that stinks because it's exactly what I want to happen. If that bug ever gets fixed, I have no idea how to achieve it. Kind of wish there was a "Bungie" option for pin to go along with Rope and Bar.

    Maybe introducing Heirarchy fixed this bug. But there is no way to get that same effect with Heirarchy that I can find.

  • I'm working on a project that pins several parts together. Similar to a snake, where the head controls movement and each additional part is pinned.

    When doing this, there is an inherent "Stretch" effect that happens when speeding up and slowing down. It looks great, but my question is, is there a way to control that?

    Can I adjust how much stretch/pull I get when speeding up and slowing down?

    Thanks.

ArcadEd's avatar

ArcadEd

Early Adopter

Member since 3 Jul, 2012

Twitter
ArcadEd has 7 followers

Connect with ArcadEd

Trophy Case

  • 13-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x10
    Coach One of your tutorials has over 1,000 readers
  • x2
    Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

22/44
How to earn trophies