SwatHound's Recent Forum Activity

  • Ok i looked it up, the fancy math way is

    Every tick set text.text to (angle(0,0,Gamepad.Axis(0, 0), Gamepad.Axis(0, 1)) % 360 + 360) % 360

    that gives you a value of the gamepad thumbstick axis between 0-360

    but the rectangle method as described above is easier to wrap your head around probably

    That seems super nifty keen.

    How exactly did you "Look it up" ? Did you go to google and search radial selection or something along those lines?

    (Don't mind this next question, I would just appreciate it if someone would humor me - Humor me as in, I have little idea of whats going on and would like to know more)

    So.. Why the % 360 + 360 ) % 360 ...... Why the 720 in total? What exactly does this mean? - It's probably one of those situations where "Don't worry about it just copy it down and know that this does this" But I'm curious as to how this is broken down.

  • Hello community, I am bad at math!

    I remember from when I was in school, it was something something 100 over a number? Haha, that's irrelevant right now...

    Basically, uh. How do I type into string percentages?

    How do I get the system to evaluate a number and give me the closest percent to that, and then of course "round" up or down?

    I'm reading https://www.scirra.com/manual/126/system-expressions and also viewtopic.php?t=72716&start=0 as I wait for one of you lovely people to save me from my ineptitude of all things math.

    Final question, what is the difference between the "Beginner's Questions" and "How do I" forum?

  • Hello community, I am bad at math!

    I remember from when I was in school, it was something something 100 over a number? Haha, that's irrelevant right now...

    Basically, uh. How do I type into string percentages?

    How do I get the system to evaluate a number and give me the closest percent to that, and then of course "round" up or down?

    I'm reading https://www.scirra.com/manual/126/system-expressions and also viewtopic.php?t=72716&start=0 as I wait for one of you lovely people to save me from my ineptitude of all things math.

    Final question, what is the difference between the "Beginner's Questions" and "How do I" forum?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks RamPackWobble , that definitely was interesting to watch, pretty mesmerizing.

    I think this is pretty damn close to exactly what I needed, reading over your notes now, thanks a lot!

  • Ah, yes thank you, but I was hoping more for a way to set the angle of motion by mouse click to the target who's UID is whichever the one that the system holds in it's global variable at the moment.

    Basically I have this bullet and I need it to collide with the sprite but the bullet is launched at the target who has the same UID as the Global UID Variable - is what I would like to happen.

    The pick by unique id would require me to memorize each sprites id, or atleast check in the layout sheet each time I would have to change it, and with constantly spawning and destroyed sprites I don't think I could manage that all too well.

    I was more hoping for a lesson on "This is what you should be typing in" if what I wanted is even possible.

    I am able to have the system pick by comparison, the sprite's UID = GlobalVarUID, yes, but I don't know how if at all possible to make the bullet angle towards that very same UID.

    I thought by having that condition, the following action "Set bullet angle towards sprite.x, sprite.y", the sprite in question would be the same one that the condition picked.

  • I wan't to set the angle of a bullet to a specific sprite who's variables match up with a specific global variable. is there a way I can control this in a string?

    I have "Bullet angle of motion = (sprite.x, sprite.y) degrees,

    but is there a way I can incorporate a specific sprite?

    What I mean is, in the condition I have

    "System = Pick sprite where sprite = GlobalVarUID" But I assume this does not exactly help, since the bullet angle does not go to the sprite who's UID is equal to the Global Variable UID.

    Is there a way I can type out "sprite.UID=GlobalVarUID.x" or something along those lines?

    https://www.dropbox.com/s/rrljw4fp7ri8y ... .capx?dl=0

  • Select your event (not on top, on left side) right click and choose Make 'Or' block

    Yeah, this definitely is something I wish I knew when I started using C2.

    Clicking the far left has a difference than clicking slightly to the right of the far left.

    Learning that has definitely improved my workflow.

  • Have you done many tutorials before making a game?

    I think if you just have the character finish climbing, and disable controls for half a second after finish climbing, just make his first animation play 'getting up', and then give him regular controls.

  • It would just been easier if you would post the actual capx with a precise explanation of where the issue is instead of "let's say I'm using sheep"...

    With a precise issue and precise code that causes the issue it will be easier to give precise answers.

    Thanks for the response.

    I was more hoping for a "yes this is completely possible, check your code" or a "that is not possible". By the sounds of things it seems that yes, this should be completely possible.

    I'll try and recreate the problem in a fresh capx and if the problem persists, will post said capx where someone will hopefully be kind enough to point out my error.

    I would post the capx I'm working on now but its over 100 events and I'm afraid that my code is held together with duct tape, gum, and rubberbands, so "trimming it" scares me.

    Thank you again, I'll try it in a new capx and will post my findings later.

  • Yes, honestly, I'm not sure, but I would not be surprised if I accidentally jammed something and now it wont ever work until I figure it out...

    But I could not get the system to count all my sheep per each ... oh. wait. You see. the issue is these sheep are not ON THE LAYOUT.

    I have them "stored" in local variables is why. So maybe thats why it would not work? of course if they were on the layout visibly I have no doubt that this would work.

    But my issue is, I'm trying to calculate a local variable that each individual unit has and I want them all updating to the same "total variable". But I had to rely on my janked weird rigging where I hand feed the code +1 and -1 here and there.

    Oh and to be clear - I have no problem of setting the text to the variable, my issue is - I need the sum of all local variables to be added into a global variable, but I can't seem to find a way to automate this process, except by always adding "+1" to the global variable wherever I see fit.

    I was hoping there was a "System, detect change in local variable, adjust as necessary".

  • Ah thank you for your response. I guess it is that easy, but I have an interesting problem.

    My issue is that I have multiple units spawning multiple.. lets say "sheep".

    I have set to every tick, every time a unit produces a sheep, to add to the entire variable.

    The issue with "every tick" is that, I can't seem to "every tick, calculate how many sheep you have IN TOTAL"

    When I tried using every tick in the past, it would only calculate the sheep for the first unit with the lowest id first.

    So I had to resort to "For every unit, add their sheep to the total value"

    So now I had to run around and do, for every sheep loss, minus from the total value.

    But I'll try and make a new capx and see if some thing is mucking up the "every tick - set variable of total sheep"

SwatHound's avatar

SwatHound

Member since 9 May, 2014

None one is following SwatHound yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies