how to make a particle explosion

Game Editor comments and discussion.

how to make a particle explosion

Postby smoothie » Mon Oct 04, 2010 7:30 am

i have made a bullet and when the bullet collides with the wall a would like to make an explosion with a particle. i have made the particle but i was wondering how to do is so that when the bullet explosdes lots of particles come out not just one.
User avatar
smoothie
 
Posts: 32
Joined: Sat Oct 02, 2010 11:51 am
Score: 0 Give a positive score

Re: how to make a particle explosion

Postby skydereign » Mon Oct 04, 2010 7:34 am

A simple way as follows. You can create smarter particle effects through similar methods, but usually this one will do.

Bullet -> Collision with wall -> Script Editor
Code: Select all
int i;
for(i=0;i<10;i++)
{
    CreateActor("fx", "fx_anim", "(none)", "(none)", 0, 0, false);
}


fx -> Create Actor -> Script Editor
Code: Select all
xvelocity = rand(5)-rand(5);
yvelocity = rand(5)-rand(5);


You'll want to have the fx destroyed after a while, so you can use a timer or animation finish for that.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: how to make a particle explosion

Postby smoothie » Mon Oct 04, 2010 7:36 am

thank you for your awesomeness but instead of it making particles it just made the bullets spread and they just went through the wall but thank you for that having the bullets was a very nice feature. but i would still like to know how to make it so that when the bullets hot the wall particles spread.
User avatar
smoothie
 
Posts: 32
Joined: Sat Oct 02, 2010 11:51 am
Score: 0 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron