Posted By
|
Message
|
Jon C-B I create vaporware
Registered 23/04/2008
Points 237
|
20th April, 2009 at 02:56:15 -
In this game, when you touch a mine, you and the mine get destroyed and a fast loop goes off that makes particles controlled by the pinball movement get created. But when the particle spray happens, all the other mines around it spray too! Any help?
n/a
|
Bibin At least 9001
Registered 01/07/2005
Points 308
|
20th April, 2009 at 03:59:17 -
What I'd do is not destroy the mine right away. Instead, set a flag of the mine to ON. Like flag 0, for example. Then, add a condition to your fastloop event: + Flag 0 of Mine is on. Then, the particles will only appear on mines that have the flag set to on. Also, do the events in this order so the mine is destroyed after the loops have ran.
On collision between mine and player:
-Set mine flag ON
-Run loop [particlespray] x times
-Destroy mine
Edited by Bibin
n/a
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49566
|
20th April, 2009 at 04:15:27 -
I personally wouldn't use a loop at all, I'd just copy and paste the creation code over and over. It may look noobish but it sure uses up less cpu.
n/a
|
MBK
Registered 07/06/2007
Points 1578
|
20th April, 2009 at 10:07:25 -
You could also spread a value in the mines, then when character collides with mine -> set character value to value of the mine
If mine value = character value -> explode mine
Another method is to use Alterable values like how you used the flags.
Or you could say: if x and y specified positions of mine are outside x and y specified positions of character -> explode mine (this one is untested) (you'll need to do some positional comparisons) But, yea .. rather complex for something so simple. Still, it's another option to consider.
Edited by MBK
Click Me! http://www.create-games.com/project.asp?view=main&id=1444
http://www.mediafire.com/download.php?aoo1dnnlq5i
Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?
|
OMC What a goofball
Registered 21/05/2007
Points 3516
|
20th April, 2009 at 13:18:39 -
Originally Posted by UrbanMonk I personally wouldn't use a loop at all, I'd just copy and paste the creation code over and over. It may look noobish but it sure uses up less cpu.
Best option. A nice little use of the "repeat __ times" condition is this.
Edited by OMC
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49566
|
20th April, 2009 at 15:04:26 -
Thanks OMC at least you believe in me
n/a
|
Jon C-B I create vaporware
Registered 23/04/2008
Points 237
|
21st April, 2009 at 01:55:46 -
Originally Posted by Bibin What I'd do is not destroy the mine right away. Instead, set a flag of the mine to ON. Like flag 0, for example. Then, add a condition to your fastloop event: + Flag 0 of Mine is on. Then, the particles will only appear on mines that have the flag set to on. Also, do the events in this order so the mine is destroyed after the loops have ran.
On collision between mine and player:
-Set mine flag ON
-Run loop [particlespray] x times
-Destroy mine
Works great! thanks.
n/a
|
|
|