Spawning Stuff, For Dummies
28 posts • Page 1 of 2 • 1, 2
Spawning Stuff, For Dummies
Since Dez already made a tutorial about Water spawning. This is about Circle Boxs Exc.
Circle Spawning
-Create a Box
-In the Oncollide Menu of that box type something like
-That will spawn a balll with forward motion
-By the Way the E.normal means that it will spawn the ball with the velocity of the objest that hit it (In Short it is just forward Motion
Box Spawning
-Create another box
-In the oncollide menu of the Box type something like
-This will spawn a box that is black and is 2 by 1 or something
spawning Pens
- First off you need to have one of the Spawner above first
- in the script of the original Spawner Type the code that will come out to say
-That will Spawn a ball with a tracer attached
Spawning Lasers
-Okay so you can type this into a script menu (oncollide) of a Box or something
-That spawns a Laser that is a cutter.
I am Going to add more later
Circle Spawning
-Create a Box
-In the Oncollide Menu of that box type something like
- Code: Select all
Scene.addcircle({pos := e.pos; Color := [0,0,0,1]; radius := 0.1; vel := e.normal * 50})
-That will spawn a balll with forward motion
-By the Way the E.normal means that it will spawn the ball with the velocity of the objest that hit it (In Short it is just forward Motion
Box Spawning
-Create another box
-In the oncollide menu of the Box type something like
- Code: Select all
Scene.addbox({size := [1,2]; pos := e.pos; color := [0,0,0,1]})
-This will spawn a box that is black and is 2 by 1 or something
spawning Pens
- First off you need to have one of the Spawner above first
- in the script of the original Spawner Type the code that will come out to say
- Code: Select all
Scene.addcircle({pos := e.pos; Color := [0,0,0,1]; radius := 0.1; vel := e.normal * 50}); scene.addpen ({pos := e.pos; color := [0,0,0,1]; size := 0.9})
-That will Spawn a ball with a tracer attached
Spawning Lasers
-Okay so you can type this into a script menu (oncollide) of a Box or something
- Code: Select all
scene.addlaserpen({pos := e.pos; Size := 1; color := [1,1,1,1]; Cutter := true})
-That spawns a Laser that is a cutter.
I am Going to add more later
Last edited by niffirg1 on Mon Jan 18, 2010 6:47 am, edited 1 time in total.
-
niffirg1 - Posts: 376
- Joined: Mon Aug 31, 2009 10:31 pm
- Location: The Great American South!
Re: Spawning Stuff, For Dummies
Here's a good example for circle spawning:
-
Sonic - Posts: 1467
- Joined: Tue Sep 01, 2009 6:18 pm
- Location: America!!!
Re: Spawning Stuff, For Dummies
What 'bout polygon spawning ( I know how its done but all may not )
If you have a question, have a dollar and call somebody that cares.
No really just PM me if you have a problem
No really just PM me if you have a problem
-
Sniperkasa - Posts: 493
- Joined: Tue Sep 01, 2009 5:34 pm
- Location: The bottom of a lake.
Re: Spawning Stuff, For Dummies
Sniperkasa wrote:( I know how its done but all may not )
i know it too
a lot of people know this i guess. but for newbies it would be cool to post a polygon spawning tut
-
KarateBrot - Posts: 825
- Joined: Mon Aug 31, 2009 7:32 pm
- Location: Germany
Re: Spawning Stuff, For Dummies
To spawn a polygon you have to give it all of the vertexes it needs. IMHO It's easiest to see what I'm talking about by looking at this scene and studying the scripts.
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: Spawning Stuff, For Dummies
I will Add some more stuff like Polygon Hold on
-
niffirg1 - Posts: 376
- Joined: Mon Aug 31, 2009 10:31 pm
- Location: The Great American South!
Re: Spawning Stuff, For Dummies
Hope you manage to do an good one on polygons, cause it took me a few hours figuring it out myself without a proper guide
If you have a question, have a dollar and call somebody that cares.
No really just PM me if you have a problem
No really just PM me if you have a problem
-
Sniperkasa - Posts: 493
- Joined: Tue Sep 01, 2009 5:34 pm
- Location: The bottom of a lake.
Re: Spawning Stuff, For Dummies
I love it
But now your kind of taking away a ton of dezzeron's thunder. Well at least its nice to see some for dummies tut's coming about.
But now your kind of taking away a ton of dezzeron's thunder. Well at least its nice to see some for dummies tut's coming about.
-
Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
Re: Spawning Stuff, For Dummies
Mystery wrote:I love it
But now your kind of taking away a ton of dezzeron's thunder. Well at least its nice to see some for dummies tut's coming about.
Oh, well. I still have my lightning!
Check out my stuff HERE!
MY WEB SITE HERE!
Sorry, I just had to.
Phundamentalist!
MY WEB SITE HERE!
Sorry, I just had to.
Phundamentalist!
Mystery wrote:I'm convinced that dezzerons scenes are all epic. He's one of the biggest underdogs of algobox.
-
Dezzeron - Posts: 296
- Joined: Tue Sep 01, 2009 12:45 am
- Location: Dark Side Of The Moon
Re: Spawning Stuff, For Dummies
how do you change the collision menu of the thing that your spawning?
-
simey j dude - Posts: 61
- Joined: Sat Sep 05, 2009 3:11 am
- Location: under your bed!
Re: Spawning Stuff, For Dummies
when spawning it put collideSet := number you want
A = 1
B = 2
C = 4
D = 8
E = 16
F = 32
G = 64
Play around with the numbers. Add them together to get different collision layers.
A = 1
B = 2
C = 4
D = 8
E = 16
F = 32
G = 64
Play around with the numbers. Add them together to get different collision layers.
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: Spawning Stuff, For Dummies
awesome thanks!
-
simey j dude - Posts: 61
- Joined: Sat Sep 05, 2009 3:11 am
- Location: under your bed!
Re: Spawning Stuff, For Dummies
is there any way to spawn multiple circles/boxes other than copying whole spawn script x times?
Phundamentalist
-
davidz40 - Posts: 438
- Joined: Sun Sep 06, 2009 10:30 am
Re: Spawning Stuff, For Dummies
Type it out instead? Other than that, not really. You could make a function to do it though.
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: Spawning Stuff, For Dummies
davidz40 wrote:is there any way to spawn multiple circles/boxes other than copying whole spawn script x times?
yes there is.
- Code: Select all
for(20, (i)=>{ your spawn script here })
this example loops the script 20 times. 48 times is the limit (and only about 40 times for big scripts) but you can chain for-functions for example:
- Code: Select all
for(5, (i)=>{ for(20, (i)=>{ your spawn script here }) })
this chain loops your script 5*20 = 100 times
-
KarateBrot - Posts: 825
- Joined: Mon Aug 31, 2009 7:32 pm
- Location: Germany
Re: Spawning Stuff, For Dummies
How can you give the circle different attraction?
- Imaginer1
- Posts: 12
- Joined: Tue Dec 01, 2009 11:56 pm
Re: Spawning Stuff, For Dummies
When spawning it put attraction := x, where "x" is any number you want, whether it be negative or positive. By default it is set to zero when spawned.
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: Spawning Stuff, For Dummies
As promised i added stuff to this tutorial. It only took me 4 and 1/2 months to do it.
-
niffirg1 - Posts: 376
- Joined: Mon Aug 31, 2009 10:31 pm
- Location: The Great American South!
Re: Spawning Stuff, For Dummies
Thanks, helpful.
I don't suffer from insanity. I enjoy every minute of it.
-
Rrobba - [Best Sig 2010]
- Posts: 1480
- Joined: Mon Aug 31, 2009 6:01 pm
- Location: Gibraltar
-
simey j dude - Posts: 61
- Joined: Sat Sep 05, 2009 3:11 am
- Location: under your bed!
Re: Spawning Stuff, For Dummies
Dude wtf. You just bumped a three month old topic all all you had to say was
Even if this was't 3 months old that is still against the rules, if you not going to contribute anything to to topic don't post at all.
simey j dude wrote::thumbup:
Even if this was't 3 months old that is still against the rules, if you not going to contribute anything to to topic don't post at all.
-
Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
Re: Spawning Stuff, For Dummies
How do you get it so the circles delete themselves after a while?
-
jrderksen - Posts: 68
- Joined: Wed Dec 22, 2010 4:50 am
- Location: British Columbia, Canada
Re: Spawning Stuff, For Dummies
jrderksen wrote:How do you get it so the circles delete themselves after a while?
Depends. Do you want them to delete on one collide? On two collides? Or do you want them to delete on a timer, so they don't have to collide with anything?
Also, does anyone know how to spawn distant-hinges?
-
TC42 - Posts: 984
- Joined: Sun Jan 09, 2011 1:53 pm
- Location: $ sudo apt get-install sandwich_
Re: Spawning Stuff, For Dummies
I was wanting them to delete on a timer.
-
jrderksen - Posts: 68
- Joined: Wed Dec 22, 2010 4:50 am
- Location: British Columbia, Canada
28 posts • Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 0 guests