Shindoh's Recent Forum Activity

  • Not quite Shindoh, I think he only wanted the attack to count when the enemy was at the end of a punch, and when it was going forward right ChromeGadget?But even then, if I understand You right, then he could also just check if the last frame of animation is playing, and if any enemy collides with it.

    Or if the enemy is colliding with the last frame.right side plus/minus offset to increase the area for hit detection.

    Or alternatively just create a hitbox sprite at the desired area; easily with an image point, while the last frame of animation is shown, or for every frame of animation at the fist area.

  • I'm a little confused. The way You do did it sounds so complicated. In theory all You had to do was make the sprite animation frame by frame. Then play that animation, and check if any enemy object overlaps it.

  • I think what You want is this: "Save" & 'numberVariable'

    For example if You want to name Your save file "Save 5", and 5 is inside the global variable numberVariable, then You write the name of the save file as: "Save " & global('numberVariable')

    EDIT:

    I just saw You want the number value from the .INI file.

    Then You would basically write it the same; just replace the global variable with the .INI file value: "Save " & INI.ItemValue(Group, Item)

  • tulamide I haven't used function alias' before so I did some tests and looked at the source to see what it does.

    Isolated/inline act the same as calling a function with forget/remember picking. Any picking done by the alias is forgotten when the alias returns (I initially thought that "inline" would change the SOL of the event that called the alias, but it's not the case).

    Example of use:

    + Function: On Alias "isValue"

    -> Sprite: Rotate 45 degrees clockwise

    //// all the sprites are rotated

    + Sprite: Pick one at random

    + Function: "isValue" (Isolated)

    ////only one is rotated

    + Sprite: Pick one at random

    + Function: "isValue" (Inline)

    Shindoh

    Here is another method using two conditions.

    + Sprite: Value 'test' Equal to 0

    + System: CountMatching(Sprite.OID) Equal to Sprite.Count

    Thanks for the great help, everyone.

    Rojohound, that is definetely what I was looking for. :)

  • How would I go about doing this? There must be a really easy way I can't think of right now. Check if at any moment the variable value of all instances of an object are equal to a certain value.

  • > Something like this:

    >

    > + If (Family) "Letters" Clicked:

    > > RecordLetterVar.Add: Letters.ObjectName

    >

    > Imagine Letters contains objects like A, B, C etc. .

    > It would be tedious to manually write an 'On Click' Event for every letter object separately.Yes, it would be tedious. Why not having a family pv and adding that to RecordLetterVar ?

    + MouseKeyboard: On Left Clicked on Blue

    -> System: Add Blue('name') to global variable 'letters'

    + System: Always (every tick)

    -> output: Set text to global('letters')

    'letters' here being a global text var and 'name' a family text var

    Thanks for Your help Tulamide.

    Yes, I thought about that too. That seems to be the only way. Then I would however still have to set every variable by hand to the respective objects name.

    Don't You think it would be more easy to have access to the object's name? I mean it seems like it would be such a simple thing.

    Anyway, it's not that much of a big deal. Just a small annoyance, I guess. lol

    By the way, it's nice to see You're still around. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The purpose is being able to automatically write an object's name within a Family into a variable.

    Something like this:

    + If (Family) "Letters" Clicked:

    RecordLetterVar.Add: Letters.ObjectName

    Imagine Letters contains objects like A, B, C etc. .

    It would be tedious to manually write an 'On Click' Event for every letter object separately.

    Of course I know what You said Tulamide, lol; but thank You for being there. :)

  • Is it possible to access an object's name?

    Like in an expression Object.ObjectName.

    There doesn't seem to be a way.

    Thank You in advance.

  • That's not quite the actual problem here. The "on collision"-condition will select any two instances involved in a collision, not every instance. For example, if you have two sprites, "red" and "blue", and both sprites both have 10 instances, and you create the following event:

    + Blue: On collision between Blue and Red

    -> Red: Flash for 1 seconds with 0.1 seconds interval

    -> Blue: Flash for 1 seconds with 0.1 seconds interval

    then only those instances who are currently colliding, will flash. If only one blue instance collides with one red instance, only those two will flash.

    However, in event 21 of Thijsku's image you can see that not the snowman and the snowblock, but a third sprite and the snowblock are tested for collision, so only those two are picked and not a snowman. The right snowman instance has to be picked manually in addition. For example by using

    ++ Snowman: Pick closest to: Sightsnowpop.X, Sightsnowpop.Y

    --> (paste actions from event 21 here)

    but that depends on what purpose Sightsnowpop serves.

    Yeah, You're absolutely right. I forgot, that the collision event already filters the instances. But I also couldn't see the image he posted, again because almost every foreign image hoster is blocked here (China), unless I unblock them (on a side note, lol).

  • All You need to do is filter the "picked" instances of the snowman object.

    The "For Each Object" loop is very helpful here.

    It will check for each of the snowman objects individually and in its current check only apply to the current picked snowman instance in the loop.

    So if You did something like:

    + For Each Object("snowman")

    + Snowman: On Collision with ("snowblock"?:

    -> Do whatever You want that particular snowman, who is currently colliding to do.

    You need to remember, that the Events will filter the picked instances of any object.

    Then the Actions next to the Event will only be executed on the Objects/Instances filtered/mentioned by the Events.

  • Do You know, that You don't have to put the animations into sub-animation folders? Then You can just change the animation to Object.Animation("AnimationName"), depending on what Event You directly want to trigger it with.

  • Actually I already told You how to solve the problem, which has to do with the picking of the bullet instances, so the other bullets won't be affected, but only the one currently at Samus' imagepoint.

Shindoh's avatar

Shindoh

Member since 24 May, 2011

None one is following Shindoh yet!

Trophy Case

  • 13-Year Club

Progress

13/44
How to earn trophies