particles

0 favourites
From the Asset Store
Particles support animations, collisions, effects and etc.
  • is it possible to pin particles to sprites

  • Yes.

  • Yes.

    hi I'm new to construct and making my first game/project, I'm trying to pin a particle to a player sprite. I'm looking to trigger the particle effect ive got, when colliding with enemy ai.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • On collision with enemy > set Particle position to Player.X, Player.Y.

  • On collision with enemy > set Particle position to Player.X, Player.Y.

    thanks it sort of works. when the player is hit its starts the particle effect but is not pinned. when I pin it with on collisions it doesn't appear and its stopping my health value from decreasing. **** games get complicated fast lol

  • If you add the "pin" behavior to the particles and position the particles object on top of the sprite in the editor, you can then add a "start of layout" event to your event sheet and add a action to pin the particles to the sprite. Then from that point on the particles will go wherever the sprite goes.

    https://www.scirra.com/manual/99/pin

  • jamiek

    I don't know how exactly you've set up the damage and how long you want to be hit for and for the particle to be displayed etc but you can use :

    Every tick > set particle position to Player.X, Player.Y.

    This would set it to player position constantly (give the effect of pinning) until destroyed.

    A possible destroy event might be after the particle hit effects have shown for a few seconds then you can say:

    On particle created > wait 3 seconds > destroy.

    It will obviously require some tweaking if you want to stop particle effects during certain scenarios. It all depends on what exactly what you want but it will all be possible in C2

  • R0J0hound

    are you sure that works? I've seen this issue come up before where particles don't actually pin. I remember having to simulate it with position. Not a huge problem though I guess.

  • R0J0hound

    ok sorry I'm going to have to talk to two of you in the one post, I had the sprite pinned but was stopping the health bar and going constantly. then I had it pinned the way the tutorial says but like plinkie it wont work its just pinned to where ever the default player starts.

    I'm sorry I can share more with you but my event page barley makes sense as it is with the rest whenever that comes. got few bugs to work out.

  • R0J0hound

    are you sure that works? I've seen this issue come up before where particles don't actually pin. I remember having to simulate it with position. Not a huge problem though I guess.

    yeah they only pin to where the player is at that exact time it wont pin as far as I can see

  • Yeah I don't think they pin (unless you change particle settings to something I'm unaware of). What you're seeing is probably the particles in their original position not moving, right? If you use the info I provided above, the particles will follow the player. As for the health bar, this sounds like a separate issue.

  • > R0J0hound

    >

    > are you sure that works? I've seen this issue come up before where particles don't actually pin. I remember having to simulate it with position. Not a huge problem though I guess.

    >

    yeah they only pin to where the player is at that exact time it wont pin as far as I can see

    I just tried to change the settings to one shot and can see anything I don't know about the particles property's well enough to know whats causing that

  • jamiek

    For future reference - there is no need to report yourself to delete your own double post.

    You are allowed to delete your own post using the 'X'.

  • One shot means it will play the particle anim once then you won't see anything after that.

    Is there another issue you are having here besides the ability to pin to player position? (note: the info above will do this).

  • Yeah I don't think they pin (unless you change particle settings to something I'm unaware of). What you're seeing is probably the particles in their original position not moving, right? If you use the info I provided above, the particles will follow the player. As for the health bar, this sounds like a separate issue.

    fixed the health again until I add something else lol. its appearing properly but just wont pin. I have the particle outside the layout

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)