ArcadEd's Recent Forum Activity

  • Check it: fileport.io/yxAGNtymVz7h

    Excellent way to do it as well. Thank you both

  • Use an instance variable AngleOffset on wings. Change it with speed, say, from 0 to -45 for the left wing and from 0 to 45 for the right. On every tick set wings angle to jet.angle+self.AngleOffset

    Worked perfect, thank you.

  • Hi all. I'm trying to do something out of my wheelhouse here.

    Picture a Jet with Wings. The Jet Body is one object using the car behavior.

    The wings are individual objects (Left wing, right wing).

    When I speed up, I want both wings to rotate towards the jet, but I want them to lock at a certain angle. Or stop rotating when they get within a certain again of the jet body. The problem is, the jet is also turning, so it's angle is changing as well. It works great when I am just going straight, but when I turn the jet, the wings start getting a little wacky. I've been fighting with this for a few days and finally decided to come for some help.

    I hope that makes sense, I can provide some images if it helps.

    Thanks

  • 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:

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

ArcadEd's avatar

ArcadEd

Early Adopter

Member since 3 Jul, 2012

Twitter
ArcadEd has 7 followers

Connect with ArcadEd

Trophy Case

  • 14-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

23/44
How to earn trophies