Lou Bagel's Recent Forum Activity

  • I just found this thread:

    Wonder why I didn't find that through the search function...

    I'm sorry for repeating this question, I'll try your solution and try the solutions from the thread.

    [EDIT: I tried your solution @badmoodtyler, but it keeps turning in a counter-clockwise direction, so it always chooses the second option which actually can't be possible.. > > I'd love to send you a video but my internet won't allow it..]

    One of the angles is probably a negative value which will mess up that equation. I really don't get why it returns or even allows for negative angles— if the angle is -10 why doesn't it just return 350?

    So if you can compensate for that it should fix that, I think, but obviously I don't have a full grasp on this

  • Another simple idea to try, depending on the desired effect:

    Set Angle of Motion to: angle(missile.x, missile.y, target.x, target.y) > missile.angle ? missile.angle + x : missile.angle - x

    Replace X with any number or variable based on how much of a turning radius you want.

    Simply, this is comparing the angle of the missile's movement and angle between missile and target and closing the gap between them. Of course if they are exactly equal I guess it will zig-zag or waiver a bit.

  • You are welcome. the ?: looks confusing at first glance but it is very simple. Type a condition then put a question mark. Then type the result if true, put a colon : and then what the result is if false.

    So to test it out if you have a global variable called SCORE and a textbox, choose the action set text and type:

    Score < 200 ? "Good" : "Great"

    If score is less than 200 the textbox will say good. 200 or more and the texboxt will say great.

    Description from elsewhere:

    [quote:3klt24eh]

    ?: is a conditional operator, which allows you to test conditions in expressions. This is especially useful when used with the comparison operators and logical operators. It takes the form condition ? result_if_true : result_if_false

    e.g. health < 0 | score < 0 ? "Game over!" : "Keep going!".

    The condition counts as true if it is non-zero, and false if it is zero.

  • No, it still picks from what's currently picked. I've used both extensively and they work as expected.

    Ah, yes. I think I was thinking of the pick all

  • Should be easy, you can set their angle to the player's angle

    So just add to that 'every tick' event the action for the movement keys 'set Angle' to 'Player.angle' (I think there may be the action set angle to another objects angle, but either way)

  • If we don't know what you are doing then we don't know what you are doing wrong...

  • [incorrect comment removed so I don't mislead people ]

    ...haven't used it much but that's my understanding from what I've read

  • I don't see the issue with the events you posted, but you said that those aren't the events that were causing the problem, so that doesn't help much.

    Anyway, I've had similar issue, the problem was if you spawn a bullet then change the direction you are fine, but if the bullet gets destroyed before the the angle is set then it picks all the bullets. LOS may be going in and out quickly? not sure, so maybe this doesn't apply.

    Anyway, first thing I would try is 'On Bullet Created' -> set angle to: boss.direction = "right" ? 0 : 180

    (if you don't know the ?: I recommend learning, very useful)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So active this commuity :/

    haha, it was only 1 hour 10 minutes between posts

    ...and usually more people help if you attempt to create it and ask for help when you have issues.

    Wall slide - decrease max fall speed while wall sliding and change animation

    Wall jump - when in contact (wall left/right) with wall and input detected then bump Y vector

    Also, these feature are quite commonplace and if you search you can probably find lots of tutorials and forum posts on these topics. So instead of mocking "the community" help yourself first and others will help.

  • I don't have time to dive into this at the moment but one thing stuck out to me, probably isn't causing the 'hitch' but:

    Both of those 'for each' will occur every tick that the player is overlapping an active spawnTrigger. Even if you disable the spawnTrigger in a subsequent event I would still test that out to see how many times it runs. Maybe a 'trigger only once' would take care of it but would definitely test that out.

  • Can you post screen shots of the events you are referring to?

    I still have a feeling something is more CPU intensive than it has to be

  • Creating a lot of objects at once is intensive. I think you should be able to create around 20 without getting a 'hitch' though. Is 'the hitch' on everything, so lower FPS? Or are you only noticing it affect the new objects?

    One thing I would try is make a txt box (or use console.log) and append text on every part of event ("loop started" "variable checked" "instance created", etc etc, whatever descriptors you need to identify). Then you can see if certain events are running more than necessary. For example, if you used 'on created' -> 'for each' then if you create 20 enemies at a time you are running that loop 20 times when you only need to run it once. If you have 100 spawnSpots to check that is 2000 checks when it should only be 100. That could cause a 'hitch'

Lou Bagel's avatar

Lou Bagel

Member since 7 Sep, 2015

Twitter
Lou Bagel has 3 followers

Connect with Lou Bagel

Trophy Case

  • 10-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
  • x2
    Popular Game One of your games has over 1,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies