Tobye's Forum Posts

  • I would suggest just using the timer behaviour. timer(name) <= 0, create timer (name, instance variable).

    on timer(name): Add 1 to "time"

    Effectively does what you're after with less room for trouble and more room for additions.

  • philx - maybe my last post in this topic will help you: scirra.com/forum/how-do-i-get-the-layout-scale_topic79444.html

    I think this method of UI placement is far better than just slapping on an anchored sprite as it will always be exactly the right distance from the edges. Just make the layer they appear on to have parallax 0.

  • distance(startingline.x, 0,player.x,0) ;)

  • No problem :) I think this aspect of game building is very important, but it's not as clearly documented/tutorialised as it should be. I have seen many people asking similar stuff and getting all sorts of conflicting answers.

    For portrait mode, just try to lock the game to landscape using the browser object. Then also try to make all your UI elements use viewports for placement, and if necessary, adjust their width/height scale to the window scale as I previously explained. This will ensure they are always visible on screen, even when the screen is terribly distorted. To see this in action you can try resizing the C2 editor window itself and see how all the panels keep their place, even while the layout space shrinks. Using this method will make sure no essential controls or information is ever inaccessible, regardless of screen sizes and orientations.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No problem! Just have another condition that says 'is CNTRL down', then right-click it and select 'invert'. This means the condition is only true if the CNTRL key is NOT pushed.

  • Yep! Same for any direction you want. Up-right corner is 315 degrees for example.

  • I would also love to know this! I have hacked about by changing the angle of motion in relation to the distance and angle of the target, and while it works, it never works exactly right. I would like to know the formula for this.

  • - The layout scale isn't changing, just your view of it. You are only choosing to display 400x300-odd pixels, but then they are stretched to fit the entire screen.

    You can check viewportRight and viewportBottom values to see the size of the screen. Then divide by the original size. This will give you the value of how scaled it appears. But keep in mind that the exact scale may be off, as the width might be 0.3, whereas the height might be 0.4, so there is no single 'window scale'.

    But I think you are just after another scale mode. Try them all out and see if any work better for you!

  • You can just use 'move at angle'. 180 for left, 0 for right. And always remember to set the amount to move as a multiple of dt! (for example: 'left arrow is down' > 'turret move at angle 180, 260*dt').

  • Tig0r - No problem, glad to help! :) There are ways to make the movement exact, but I haven't done it for a long time so don't remember how to. You can search the forums for many answers on it, but I believe they all take a little work.

  • I would just do 'for each "ghost"'+'"eaten" is playing' + 'trigger once' = find path to ghost home. Or maybe link it to the event that kills the unit. So like: '"ghost" health =< "0"'+'trigger once' = 'find path to ghost home'.

    How you have it now will continue to loop the pathfinding. Even if you add trigger once to what you have, it will still loop because as soon as it finds a path it is no longer finding a path and the animation is still playing.

    If your pathfinding is failing, it could be that you have the cell sizes too large, meaning they can't fit through the gaps. Try lowerig it to something ridiculously small like 2 and see if it works then.

    Also a capx can really help us to debug ;)

  • I see you have 'is calculating path (inverted)' + 'animation "eaten" playing'. This could be your problem, because as soon as it finishes calculating, it is no longer calculating and will keep trying.

    So check to see if they are under a trigger condition (I can see they are a sub-event, but not of what). If not, you should add one like "on animation 'eaten' started".

  • zenox98 - why does it sound so absurd? Sure keyboard is fine, but sometimes you are far away from it and just want to tinker with things. And it's not JUST for being lazy, it's a lot more comfortable to use in many occasions. It's a small improvement for hopefully small effort. I don't see why it should be scoffed at just because it's not a major feature.

  • Hey guys,

    When the day gets a bit long and I'm winding down for bed, I find myself using the mouse almost exclusively while I watch something on another monitor. And I think it would be cool if you could alter the values in the properties tab by clicking on the number and scrolling the wheel up and down. As it is now, it unselects the currently selected value and just scrolls the properties tab up and down.

    It's far from important, but it would be nice and is hopefully not much trouble to implement :)

  • srealist - I just watched a quick video and yeah, it looks great. With lighting a strong possibility and multiplayer apparently on the way I am running out of things to ask for!

    As for particles, I read Ashley once talking about how he couldn't do rotating on particles due to the way particles are optimised. He went on to say that if you want other effects you should just use sprites. So I'm guessing there are similar issues with your stated particle effects. It would be pretty easy to event those effects from sprites, albeit rather heavy in processing.

    I'm really looking forward to seeing what the modules will be like though, that he mentioned in the blog post. Then we could see many various ways to handle custom particles, amongst other things.