Greaver's Recent Forum Activity

  • I've made a complicated input system before.

    The basic idea, at least behind how I did it, is that you record inputs (e.g. in a queue) and every X seconds, read those inputs and have an action occur because of it.

    The input window should probably be around .10-.15, if it's too small then what happens is, let's say you need to press A and B at the same time, or Down on a control stick and the X button at the same time, if they aren't on the EXACT same frame and you just do a check, it won't work.

    If you do stuff like wait commands, it can get a bit messy when people press multiple buttons at once, among other scenarios... maybe it can work but I don't think I even tried, I couldn't really imagine how it would.

    For reading inputs, you probably need to differentiate between directions and buttons. So you don't just want to say "what was the last button pressed", but more like, "what were the last 3/4 directional inputs, and the last 2/3 button inputs, and in what order".

    That way you can see, okay, they did down, down-right, and right, in that order, this is a quarter-circle forward, and then they pressed B and A, well A was the last input so we take that one. Or maybe you want them to press two buttons at once, so you can read that, or maybe you only take their first input. There are lots of different possibilities.

    Rather than a wait command, I would start a Timer whenever an input is received (again, for maybe .10 seconds, it means there is a small delay on the inputs but it's almost unnoticeable and even professional games can have small delays like these), and then once the timer is done, you read the inputs.

    Another thing is that, instead of doing:

    "on press A, do this"

    "on press left and A, do this"

    "on press right and A, do this"

    "on press B, do this"

    "on press left and B, do this"

    "on press right and B, do this"

    you now have

    "on press A, record A"

    "on press B, record B"

    "on press left, record left"

    "on press right, record right"

    Read/execute input one time.

    You see how I reduced 6 checks (redundant left/right input checks) to just 4? And the more you have the more the reductions add up. Then you only need to check for each button input once, and you just have an I/O-like system to do things based on the inputs.

    Coding it can be a bit difficult but it's part of game development/programming in general (C2 might not be script-based but programming knowledge is still extremely useful, if not basically required IMO, at least for more complicated things), action/fighting games can be especially hard in this sense, so yeah. Good luck if you choose to try it.

    So this will be harder than what we had thought xD

  • Haha, I learned how to fix the timing.

    RyuCommand > 0 -> Wait 1.5 seconds -> set RyuCommand to 0

    I just learned about the System's Wait action, very handy.

    Again, I'm not experienced so this may be a bad way to do it. And of course you wouldn't be able to make a big roster of fighters using events like this when you're limited to 100 events. But hopefully you can work with this.

    EDIT: Just noticed that Hadouken still spawns a slow bullet too, because the condition for bullet is "On P pressed". So I also added the condition "RyuCommand smaller or equal to 1".

    I see, thanks for the response ^_^

  • Hey there! ^_^

    So you know the fighting games where u input 'down down, forward and X' to perform a special ability?

    Is that possible in C2? And how to do it?

  • scirra.com/forum/effect-outline_t75574

    Hey there, sorry that doesnt work, the files cant be opened by construct2 - thanks for trying anyway ^_^

  • Is it possible to add a line around objects? In pixels? ^_^ At a chosen color?

  • Hello, i tried following some tutorials here, but whenever i upload the exported files into google drive, all i see is a bunch of files, pictures and stuff i did in C2. None of it is playable. Help?

    Yes i exported it as HTMl. All i get is a bunch of files once i upload it into google drive.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, you should add the health variable to the family. Then place your mages on the layout and change the health variable to whatever you want for each mage.

    Aaaaah i see!! Thanks alot!! Worked perfectly!! ^_^

  • I assume you added the instance variables on the family. In this case, substract 5 from health does exactly what you need. Instance variables are for each instance of the family, not the whole family.

    Should i not add the instance 'Health' variable to the family? I do not want all the members of the family to have the same Health.

    And if i try to add it individually, it says 'Health variable is already taken!' - due to it being on the family.

    EDIT: You got it backwards btw, i want each individual of the family to have their own health.

  • Greetings! ^_^

    So, i am not sure if this can be done in an easy way, but here we go. Sample;

    Family 1 - 'Mage Enemies'

    Member 1: Tiny mage (100 hp)

    Member 2: Sorcerer (200 hp)

    Member 3: Wizard (250 hp)

    And well, they are in the 'mage' family. So when they take damage, can we somehow make it accordingly to their individual HP, or must the entire family have the same HP, that is addding 'Health' string in the 'Mage Enemies' family instance?

    'Mage Enemies collision with bullet - Subtract 5 from health' <- i want this to go to individual enemy rather than family.

    Is this possible? Or must the entire family have the same HP value?

    Thanks

  • In that case you just have to use pick by comparison like I said in the post above.

    Here is a capx that shows how it is done:

    https://cdn.discordapp.com/attachments/ ... ision.capx

    Pick my comparison worked, thank you. ^_^

    In any case, the 'cat' has 8 direction and bullet state, which makes it not possible to remove the solid bumps without turning of collision, am i correct? It seems, it comes automatically inbuilt with the 8 direction/bullet behaviour.

  • It is not an action it is an event. So create a new event and select system-compare two values

    I know its an event. It doesnt work. There is more than 1 cat on screen, when reveresed (say cat distance to hero is less than 50) then all cats on screen die and not just the 1.

  • Use system --> compare two values

    Yes i did, there is only distance traveled.

Greaver's avatar

Greaver

Member since 5 Apr, 2013

None one is following Greaver yet!

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Email Verified

Progress

14/44
How to earn trophies