TwinSix's Forum Posts

  • Now that I have that, how would I go about making spr's bounce off each other? They bounce off the walls, and they bounce when I click them, but when I add a BULLET behavior and enable BOUNCE, it does nothing. I enabled the collisions for the PLATFORM behavior, but I do not know what to add to make them bounce off one another. Google shows nothing but a pong tutorial and some other 10+ years old stuff that I don't know would apply.

  • Regardless, man, I did not mean for you to do the whole thing for me, but your corrections have the game doing almost exactly what I need it to. THANK YOU! I have been looking at the edited event sheet (yours) and I can mostly follow what you did, although I think I do have a couple questions with some of the actions. I am trying to read and comprehend the Family and Copy Picked stuff you mentioned in the manual.

  • I updated your project so you can compare it against the old one to see what all of that means in practice!

    https://drive.google.com/file/d/1KdU6BY1cOFQhfmTXYRcza5LlmWTvcGz1/view?usp=sharing

    I felt that making those changes was a little bit clunky, so maybe we will fix that in the future.

    HOW DID YOU GET THE SET VECTOR Y AND TWEEN TO SHOW ON THE FAMILY ACTIONS!? I would have done what you did (somewhat), but when I would use the family as a my object, there was no "Set Vector Y/X" available. It is so frustrating! Not to mention "Tween" does not even show up on my family (in MY file, not the one you corrected). What am I doing wrong?

  • I'm getting sidetracked. Apologies. I will wrangle this back to my original question: I have a green square (spr) that is the main sprite image for my game. I want one "spr" to fall after every 10ish seconds, and each time I press on one spr, I want only that one spr to squish. How would I set up the spr's to be affected individually on screen, when they will all share most of the same attributes. There could be up to 50 spr's on screen, and I don't want to make 50 different sprite references using the same image graphic. I know there is a way to do this, I just do not know how.

  • Instead of a function, I recommend using a custom action. It works almost identical to a function but the function doesn't pick an instance, so it just applies to all of them. The custom action only applies to whatever instance was picked. In your case, the Fam_Ducks which are being touched.

    Btw you also don't need every tick inside a function. It does nothing.

    When you say custom action, I set one up, but I cannot set my squishFactors, nor my OriginalWidths / OriginalHeights. How would I set up a Tween, and "squishy" thing using a custom action? Do you know of any tutorial that shows this?

  • "On any touch" only triggers when you start the touch

    Then Func_Squish is only called if Touch Is touching Fam_spr

    So the code in the function only runs once per touch

    "Every tick" does nothing - you can just delete it

    Your squishFactor will still be randomised every time the function is called

    Note that you NEVER actually need "Every tick"! If the trigger/condition column is empty, the actions will always run every tick.

    Events can either be "Conditions" which are checked every tick or "Triggers" which only fire when something happens.

    More details here:

    https://www.construct.net/en/make-games/manuals/construct-3/project-primitives/events/how-events-work

    Oh! Ok, I deleted the "Every Tick" under the Function and the "localNumber=SquishFactor"; I thought I always had to have some kind of structure to every action; I thought they were always supposed to be formed like

    affectThisThing->whenThisHappens->byDoingThisThing. I don't really understand, but I think I do a little bit. Thank you.

  • There's a few things:

    For some reason that I don't understand, "Touch - Is touching Fam_spr" picks all the spr's rather than just the one that being touched.

    To solve that, replace Fam_spr with spr

    But that still doesn't work because the function resets the picking list and will pick all spr's again. To solve that, edit the function and enable "copy picked" - this will copy the list of spr's picked in the event that calls the function and pass it to the function.

    Also, you don't need "Every tick" in that function.

    Let me start with your last tip first: you say I don't need "Every Tick" in the function... so what do I place in that spot? I need the System Action, and I need something in there. Does this function not need to take place every tick? And if not... WHEN?

    NOTE: the reason I have the System-> Every TIck is my local variable = "SquishFactor" which sets the initial state of the spr. When the spr falls, its initial state is "SquishFactor=0", but then when I press the spr, I wanted a randomness to the "squishyness" of the spr.

  • NOTE: I am not a programmer, and not good at this, thank you for your patience in advance.

    I am trying to set up a mobile game, where after clicking one sprite for a couple seconds, a second one falls (from a random location along the X axis). Then, after a couple seconds, another one falls etc. I have a "Func_Squish" function that "squishes" the spr "on Touched" (when I touch it on the screen). However, when the subsequent spr's fall, they all "squish" when I click one of the spr's and I only one want the spr that I touch to do the squishing. I have been trying to get help from Grok for a bunch of my issues, but now, he keeps saying to add a Family (which I did), but then to reuse "set vector y" action, however, a family will not let me do the "set vector Y" on the spr within the family. AT this point, I not only frustrated, but confused.

    Does anyone have any idea how to not have every one of my spr's "squish" when I press just one of them? I would appreciate the help, and trust me, I'll be back. I am functionally dumb, so please be kind of explanatory, if you don't mind. I do not know lingo and other stuff.

    I have attached screenshots, and here is a link to the project file, if that helps.

    https://drive.google.com/file/d/1Dqa0ph_38B6PJWCOlL6SUsr-pYgQ7iBA/view?usp=sharing

  • Omg, thank you. I knew it was something stupid, and I apologize if you feel I wasted your time, but I could not figure this out - whether I should change the LAYOUT field, or the EDITOR field, or both, or if I had to set up a camera in the meantime. Ugh. Thank you.

  • I have seen posts about zooming, and camera, and whatnot, and I apologize, I have not gotten that far into trying to set up my game. I am trying to prototype out a platformer like the Pico8, so I have 8x8 sprites, and for right now, I would like a 128x128 display, ultimately 640x480. However, when I press my Preview button, the game works, but man, is it zoomed out. I do not have any camera functions created or anything, this is just the default view it gave me when I ran my Preview. What is the method to get the Preview camera to be closer to the character? My Layout Editor zoom is fine, it is just the Preview that is too small.

    Thank you for your time!

  • How about this:

    1. The bird does it's thing and flies off screen

    2. Instead of destroying it, just suspend it (disable it's behavior, there are various ways to do this: e.g. disable a group, set a boolean to false or a state machine) use the timer behavior to start a two second timer on the bird

    3. On timer, reset & enable the behavior of the bird again (as in give it back the rock) and set its position to Y = whatever height you want it to patrol and X = player.X + screen width/2 + some offset so it starts off-screen

    4. This would also be the place were you can test if the bird spawns outside of its patrol area (if player.X + screen width/2 + some offset > rightWall.X) If that's the case, you can instead just start the timer again, which would mean every 2 seconds the bird will check if the player is in the right position for the bird to spawn inside the patrol area.

    Ok, I tried to follow what you said, and I'm sure it is nothing like you intended, but I got the bird's functionality to work.

    HOWEVER, when the bird repositions (restarts its patrol behavior), the bird drops low, to the player's Y level (even though I do not have that specified), and tehn sometimes even lower. Why is this?

    Here are screenshots of my events, and a new link to the capx, if you want to take a look.

    My initial "patrol" group - this works

    My other functions and behaviors (it's sloppy, I know)

    link to the project file

    https://drive.google.com/file/d/1ipmMMb-Pu6uckvWgsj9nb6XORwq7TwuF/view?usp=drive_link

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello, thanks in advance. Not sure (again) how to properly phrase this question for later reference, but I would like a similar functionality with the birds in Castlevania NES, Stage 11.

    Youtube link for reference -

    https://youtu.be/mOTUVXrAOE8?si=pRDrHPKVWSGydxJB&t=814

    I have a bird enemy that patrols the air:

    - fly from right to left, hit wall, fly to right.

    And when he has line of sight to the player:

    - drops a rock, and then flies away and up (out of layout, whereupon it is destroyed).

    When the bird leaves the layout, and is destroyed, I would like another bird to spawn in after approx. 2 seconds, from the right side of the screen, and perform the same actions:

    - fly from right to left, if LoS with player, drop rock, fly off screen (and repeat until the player gets beyond a certain point (I have a tall invisible collision wall boundary set).

    I have the functionality of the first bird working, and everything is fine, but I cannot figure out how to get another bird to spawn in at a further point to the right of the layout.

    As in the reference video above, notice how the birds spawn in, drop the "flea man" enemy, and then leave the screen, and a moment later, another enemy comes in and repeats.

    Here are some screen shots:

    Basic look of screen

    Layout - I set two invisible collision walls to act as a patrol barrier for the bird

    My event sheet for the bird

    Here is the Capx file:

    https://drive.google.com/file/d/1ipmMMb-Pu6uckvWgsj9nb6XORwq7TwuF/view?usp=sharing

    Thank you for your help!

  • Oh wow, this is perfect! I have not tried (even thought of) states, much less did I expect you to do anything.

    THANK YOU!

    I admit, I would never have thought of this, either, so thank you for letting me see this code. This alone helps me with nearly every other enemy idea I have for the game.

    Thank you again!

  • Any suggestions on how or what I might do to achieve that? I tried pathfinding (to much frustration), but that does not solve my problem of telling the bee "when you see the player: attack; when you do not see the player, or if the player leaves your line of sight, return to doing what you were doing, in the spot you were doing it".

  • I set the direction events as subevents (Pic #1), but I will go ahead and apologize - this wording is confusing me.

    However, it produces some interesting results - close to what I am looking for, but not quite. Under the event sheet picture, I will show some example pictures of what I mean.

    Pic #1 - Sub Events

    For instance, when I stay away, the enemy behavior is fine. When I approach, the enemy comes at me, but he starts to "fly" upward, for some reason.

    Pic:

    Or maybe it is how I set up his behavior, but when I leave his LoS, his normal patrol pattern is broken. Is there a better way to set up his patrol behavior?