kidswithcrowns's Forum Posts

  • Hi kidswithcrowns I guess I'm not that smart to figure this out,

    As I explained my problem is that my logic on paper is SUPER EASY for me to understand but as soon as I try to translate it to C3 code... it's a total mess.

    Here is what I tried to do following your instructions, which is not working because I probably didn't get it right... again:

    DOWNLOAD - Another Failed Try C3 file

    Thanks ahead for any help! :)

    You're definitely smart enough Alon! You just have to mess around more until you figure it out

    I looked at your example. Great work, you're on the right track

    Take a look at this part:

    "Created_Object is NOT DragDrop Dragging" almost works but you have to remember it will still pick all the Created_Objects that are not currently being dragged, even if there is one that IS being dragged! So you need some sort of method of being able to check if ANY of the Created_Objects are currently being dragged

    I recommend 3 things to try playing around with to make this happen:

    On DragDrop Start >

    On DragDrop End >

    Global Instance Variable (Boolean)

    Good luck!

  • I have an array with the name of the items

    array {"sword","shield","bow"...)

    how can i remove an item by his name

    Example remove bow

    array {"sword","shield"...}

    This should help

    construct.net/en/make-games/manuals/construct-3/plugin-reference/array

  • I'm guessing you're setting the enemy angle towards the player when they're created

    So the right-facing enemy on the right side of the screen is rotating a full 180~ degrees and ends up upside-down

  • Alon

    Here's your problem:

    you want to make an outline for the currently hovered-over top instance of an object BUT only when another object is NOT being dragged

    So I would take the code that handles making an outline (the one I showed you) and add some sort of condition that means "only when another object somewhere is NOT being dragged" so that the code has boundaries of when to activate and when not to activate. This will be your "I'm not dragging anything" outline code

    And then you can make separate "I am dragging something" outline code

  • > Not unless you use different layers.

    Yeah, I guess there is no other light solution to this, but thanks for helping I appreciate it! :)

    You could make it so each object has a slightly bigger, different color copy of itself behind itself that scales/rotates/etc along with it. This would look like an outline as long as the opacity of the main Object doesnt go less than 100

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can also disable collisions for the Critter once it's "destroyed" so bullets stop colliding with it :)

  • > So I mean add a condition, which appear on the left (press C), to the on collision event. The condition should be critter opacity=100. This means when the bullet collides that the critter object opacity must be 100 for it to do the actions i.e. it is not fading. So you can only hit it one time with that condition.

    Sorry for misunderstanding, I'm still new to this and often get the terms mixed up. I've tried adding another condition but can't find the "set opacity" option. The closest I can find is "compare opacity".

    Yup, that's the one!

  • System: Set Layout Angle

  • Why use For Each here?

    Imagine you're running your code on a stack of paper. 100 sheets.

    For Each: You pick up the stack and select a single sheet of paper. This is the sheet you're going to run the rest of the code on. (You will do this for every single sheet of paper in the stack, one at a time. This is what For Each means)

    Pick Top Instance: You look at the sheet of paper in your hand and check to see, out of all the sheet(s) of paper in your hand, which one is on top. Since you only have one sheet in your hand, the top instance is automatically the one in your hand. This is why your code doesn't seem to care about what's on top and what isn't. To your code, every single sheet is on top because it's only being compared against itself

    Here is one way you could do what you're trying to do:

    This basically deselects ALL objects every tick, and then only selects objects that are both:

    1. Being hovered over by the mouse

    and

    2. Are at the top of the stack being hovered over by the mouse

    Let me know if you have any questions!

  • All you need to do is add an event that sets the X and Y of the character to the X and Y of the mouse (make sure you add the Mouse object to your project first)

  • Yes there is an easy way.

    Animation.speed = -20

    Basically just have a negative speed, it will animate in reversed.

    Oh, nevermind then. Good to know!

  • There's no easy way to play an animation in reverse. Your best bet is what you said, to make a separate animation. This doesn't take up any extra memory since the images are the same :)

  • Alon Here is an example of how you would do it with UID and functions ufile.io/sj12iisk

    If you use Object.UID it will give you the UID of whatever object is currently 'picked'. In this case it's whatever object your cursor is over

  • I'm trying to convert all my individual Instances events to one general Family for more efficiency and less events.

    For example I have an event that whenever the Mouse Cursor is over instance it will Flash (using the Flash Behavior).

    When I tried to convert it to a Family to affect other objects instances I found out that... there is no Flash Behavior for Families.

    So I made a simple Function to make the Flash-Effect, but again.. with or without "For Each" I can't get this to work right.

    Can somebody explain? or if it's confusing (for noobs like myself) add an example file or screenshot?

    Thanks ahead!

    Work in Progress so far:

    The Function "FLASH ME" doesn't know which object you want to flash. Try adding a number parameter to the function called UID which passes through the UID of the object you would like to flash, and then add a "Pick by UID" condition to the function to pick the family object with the UID that has been passed through

  • Angles are weird, I think C3 will read "is between 345 and 65 degrees" backwards because it likes you to put the smaller angle before the larger one

    I'm not sure if that's why this is happening but I would change that and also add an 'else' to each condition checking the angle

    so

    Is between angle a and b

    ELSE

    is between angle b and c

    ELSE

    is between angle c and d

    etc