Author Topic: Question about particles in AGS  (Read 517 times)

Armageddon

  • Posts: 1,443
  • Likes apples and nuts
Question about particles in AGS
« on: 04 Nov 2013, 00:56 »
I'm wanting to make a game that's set in a cold environment and I was curious if/how particles could be done in AGS to create an effect of seeing the player character's breath in the air. I found this http://www.adventuregamestudio.co.uk/forums/index.php?topic=26379.0 but it's obsolete now. Any ideas how it would bee done? I'm thinking something like spawning a sprite at the players head that animates a view but I don't know how to do that. I could also just put it in the idle animation but then wouldn't be able to see it when walking and would cut off if you moved while your breath was dispersing.

Khris

  • Posts: 10,676
  • having to deal with what games are going through
    • Lifetime Achievement Award Winner
    • I can help with play testing
    • I can help with scripting
    • I can help with translating
    • Khris worked on a game that was nominated for an AGS Award!
Re: Question about particles in AGS
« Reply #1 on: 04 Nov 2013, 12:37 »
Yes, spawn a sprite.
In repeatedly_execute, count game frames, turn them into seconds, and each three or four seconds, spawn the breath animation.
The position is easily calculated using the player character's position and their loop (to find out which way they're facing).

Snarky

  • Global Moderator
  • Posts: 6,750
  • Private Insultant
    • I can help with proof reading
    • I can help with translating
Re: Question about particles in AGS
« Reply #2 on: 04 Nov 2013, 16:28 »
... and remembering the scaling factor of where they're standing.