Math Magic required
BigDave
Member Posts: 2,239
I want to have the particles moving in a circle instead of a fix line direction.
How?
Note: The actor has to remain at its fix position. So math magic within the particle direction expression.
Comments
Unfortunately particles can only move in a straight line.
Although you can fool the eye into seeing things . . . here is a flag example (attached below) the particles are only ever moving in a straight line, but it looks like they following a more complex path, this might be useful for your needs, essentially you would be moving the spawner to make it look like the particles are moving in a nonlinear way.
Another trick you can play around with is to have the particle image up in one corner of the image file (a particle image must always be square) - and when you rotate the particle and it moves at the same time, you introduce some (pseudo) nonlinear movement, attached below is a second file with an example of this - it's some atmosphere particles, I didn't like the linear nature of particles moving in straight lines, so this was an attempt to make them look more organic.
I hope there is something useful in all this !
You could always create your own particle effect using real actors and then have full behavior control over them all. You'd have to be more concerned about lag with this method but I've used it before and if you're careful it can work out really well.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
@Socks The flag demo is really something , didnt know you can do something like that , impressive, although i dont understand a thing with the abs and all the numbers you used Thanks for providing it very useful
thanks guys. My main concern was that the effect has to be following the actor but be apply able on multiple different actors without having to constrain each x/y to a table.
Since Curved paths for particles are not possible.
I do a spiral and just rotate it via particle behaviour
PS: Its a "stunned" indicator above the head of enemies.
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
Could you get the same effect with a frame based animation? Just a few frames might get the effect you need and be very easy on the system.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
@jamie_c
Could but to get a smooth looking spin of spiral you need a couple of frames.
I normally have like 2 frames for my walking animation biggest animations got like 4 frames. Also I would need to paint the effect on all enemy types and get that amount of frames for each.
So particle or self made particle sounds like the way to go
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
Now I wonder how to calculate the lifetime, rotation speed so it makes exactly one 360 degree before doing the next particle
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
Agreed, this sounds like it should be a job for a simple frame based animation.
abs is short for 'absolute'.
It returns the 'absolute' value of something, the absolute value basically takes any number and makes it positive.
abs(22) will give you 22
abs(-22) will give you 22
abs(7.54) will give you 7.54
abs(-800) will give you 800
etc etc . . .
Depending on your needs, could you create a separate actor as only the effect and spawn it over the top of your stunned actor?
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
@jamie_c
but it would not follow the "parent actor"
I could have one with short life duration and keep it respawning from the parent actor. But than why not do that via particle.
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
Yep I know that in general , i try to improve my math everyday and I did , but when it comes to putting it into gamesalad or code in general i just get lost .. so I dont know how you came up with this or the logic behind it, but its impressive.
Why not ?
Thanks guys
i am pretty happy with the spiral particle now.
Image rotated and refreshed every 0.4
fading out to hide the fact that it doesn't rotate perfect circle
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
Looks good, fits the graphic style.
What I was thinking above was that if the character were stunned and not moving you could just spawn the animation above their head. If they were moving you need to move the animation too. Looks like you've got something good though.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
@jamie_c
thanks buddy I appreciate your help a lot
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
haha, whatever you are making looks pretty funny!
www.rossmanbrosgames.com
thanks buddy
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
Looks great
@Socks
thank you!
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de