Tobye's Recent Forum Activity

  • I am recently having some troubles with LOS too. Shouldn't 'has Line of Sight' pick the object who has LOS without needing to go through a 'for each' loop? Like if you use 'on landed' for platform behaviour, it will only pick the instance that has landed, not all instances of that object.

  • Hey all,

    Recently I've been have a hell of a lot of trouble with picking and inverting conditions. I really don't understand as I have been using C2 for a very long time and never had this trouble before. So, not sure if it's the new build (139) or I've just gone off the rails.

    capx

    vtrix's altered capx

    In that capx the lasers don't all disappear when out of range. Then if you toggle off the section 'Resizes laser' (which runs the for each loop to resize the laser), they won't resize correctly even though the 'creates laser when in range' section should be doing the exact same thing. It's like it's ignoring the inverted 'has laser to' condition and also fails to pick the right orb when adjusting width of the laser.

    I'm having all sorts of issues like this lately, not just with resizing the laser. So I would really appreciate some help on this!

  • Have a 'lastHit' global variable and set it to the object's name on collision with that object. Then you can say 'on collision with cherry + global variable = cherry: play sound'. Then as a sub-event 'set global variable to cherry'. Setting the variable needs to be after checking the variable, or else it will always be true obviously.

    Hope that helps!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey mate,

    The problem is in the 'stones overlapping' group. While the stone is overlapping the those border objects it disables the bullet. So if you just toggle 'set bullet disabled' off you will see the stone continues to drop. Hope that helps!

  • Hey all,

    I have recently been getting some terribly frustrating issues where inverted conditions just simply don't work (like they are completely ignored as a condition).

    I had this with Line of Sight and booleans. It usually fixes though if I add a new LOS behaviour or new boolean and reference that instead. Has anyone else come across this? I am unable to recreate it consistently, it just seems to happen on occasion since the last update.

  • Perhaps you could just as a letter to it in the array (so 'is' and 'isa'), then alter the displayed text. So like: set text to array.at(0), text = 'isa', set text to 'is'.

    There's probably a cleaner way, but this is pretty simple as is.

  • I still use UIDs instead of containers a lot. I can do stuff like destroy the turret but leave the tank alive for a few seconds before also being destroyed. It takes a little extra effort, but I always end up needing that freedom at some point.

    Just make an event that says: 'on tank created > tank spawn turret > set turret variable 'id' to tank 'UID''.

    Then: 'on tank destroyed + turret.id = tank.UID: destroy turret'

    But really if you are just making something simple, use containers.

  • If you post a capx I'll be glad to have a look for you :)

  • Thanks guys, but I'm not really any closer. I can smooth scroll and scale no problem, the main issue I have is getting it so all enemies in LOS are only just within the screen and the view constantly scales to accommodate. I'll keep at it!

  • Hey all,

    I want a game mechanic where when the player has LOS with an enemy, the view stretches out so that the enemy is included in the screen. I want it to stretch to include all enemies you have line of sight with while not stretching the view in a way that areas outside the layout are shown. Also it needs to shrink back when LOS is broken.

    Does anyone have any methods for this? I have a lot of experience with C2, but this is new territory for me and I just can't even seem to get close.

  • Hey mate, I'm interested. I've done quite a bit of testing for professional games companies down here in Melbourne.

    I don't have a large amount of time, but I have been watching for development for a long time now and would like to see how it's turned out, so why not help test it at the same time? :)

  • I always add a linking 'id' variable that is the moving object's UID. So 'enemyBox is moving + enemySprite.id = enemyBox.uid -> Set Animation...'

    Maybe there is an easier way, but I use the id variable for so many things anyway that this is how I manage it.

Tobye's avatar

Tobye

Member since 27 Jul, 2012

None one is following Tobye yet!

Connect with Tobye

Trophy Case

  • 12-Year Club
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies