Spawning Stuff, For Dummies

Post your tutorials here.

Spawning Stuff, For Dummies

Postby niffirg1 » Tue Sep 29, 2009 5:50 am

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
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.
User avatar
niffirg1
 
Posts: 376
Joined: Mon Aug 31, 2009 10:31 pm
Location: The Great American South!

Re: Spawning Stuff, For Dummies

Postby Sonic » Tue Sep 29, 2009 5:39 pm

Here's a good example for circle spawning:
Rating: rated 6.5
Filesize: 64.18 kB
Comments: 5
Ratings: 4
download
I do stuff and break things. You know how it is.
Image
User avatar
Sonic
 
Posts: 1467
Joined: Tue Sep 01, 2009 6:18 pm
Location: America!!!

Re: Spawning Stuff, For Dummies

Postby Sniperkasa » Tue Sep 29, 2009 6:00 pm

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 :)
User avatar
Sniperkasa
 
Posts: 493
Joined: Tue Sep 01, 2009 5:34 pm
Location: The bottom of a lake.

Re: Spawning Stuff, For Dummies

Postby KarateBrot » Tue Sep 29, 2009 8:47 pm

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
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: Spawning Stuff, For Dummies

Postby standardtoaster » Tue Sep 29, 2009 8:58 pm

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.
Rating: rated 7.2
Filesize: 6.39 kB
Comments: 6
Ratings: 7
download
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Spawning Stuff, For Dummies

Postby niffirg1 » Tue Sep 29, 2009 11:06 pm

I will Add some more stuff like Polygon Hold on
User avatar
niffirg1
 
Posts: 376
Joined: Mon Aug 31, 2009 10:31 pm
Location: The Great American South!

Re: Spawning Stuff, For Dummies

Postby Sniperkasa » Wed Sep 30, 2009 7:21 am

:thumbup:
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 :D
If you have a question, have a dollar and call somebody that cares.
No really just PM me if you have a problem :)
User avatar
Sniperkasa
 
Posts: 493
Joined: Tue Sep 01, 2009 5:34 pm
Location: The bottom of a lake.

Re: Spawning Stuff, For Dummies

Postby Mystery » Wed Sep 30, 2009 12:59 pm

I love it :D
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.
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: Spawning Stuff, For Dummies

Postby Dezzeron » Mon Oct 05, 2009 8:24 pm

Mystery wrote:I love it :D
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! :lol:
Check out my stuff HERE!
MY WEB SITE HERE!

Image
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.
User avatar
Dezzeron
 
Posts: 296
Joined: Tue Sep 01, 2009 12:45 am
Location: Dark Side Of The Moon

Re: Spawning Stuff, For Dummies

Postby simey j dude » Fri Oct 16, 2009 5:42 pm

how do you change the collision menu of the thing that your spawning?
User avatar
simey j dude
 
Posts: 61
Joined: Sat Sep 05, 2009 3:11 am
Location: under your bed!

Re: Spawning Stuff, For Dummies

Postby standardtoaster » Fri Oct 16, 2009 5:46 pm

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.
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Spawning Stuff, For Dummies

Postby simey j dude » Sat Oct 17, 2009 3:56 pm

awesome thanks! :clap:
User avatar
simey j dude
 
Posts: 61
Joined: Sat Sep 05, 2009 3:11 am
Location: under your bed!

Re: Spawning Stuff, For Dummies

Postby davidz40 » Wed Dec 16, 2009 8:06 pm

is there any way to spawn multiple circles/boxes other than copying whole spawn script x times?
Phundamentalist
User avatar
davidz40
 
Posts: 438
Joined: Sun Sep 06, 2009 10:30 am

Re: Spawning Stuff, For Dummies

Postby standardtoaster » Wed Dec 16, 2009 8:13 pm

Type it out instead? Other than that, not really. You could make a function to do it though.
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Spawning Stuff, For Dummies

Postby KarateBrot » Thu Dec 17, 2009 12:58 am

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
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: Spawning Stuff, For Dummies

Postby davidz40 » Thu Dec 17, 2009 4:13 pm

thanks! :)
Phundamentalist
User avatar
davidz40
 
Posts: 438
Joined: Sun Sep 06, 2009 10:30 am

Re: Spawning Stuff, For Dummies

Postby Imaginer1 » Wed Dec 23, 2009 9:11 pm

How can you give the circle different attraction?
Imaginer1
 
Posts: 12
Joined: Tue Dec 01, 2009 11:56 pm

Re: Spawning Stuff, For Dummies

Postby standardtoaster » Wed Dec 23, 2009 9:30 pm

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.
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Spawning Stuff, For Dummies

Postby niffirg1 » Mon Jan 18, 2010 6:48 am

As promised i added stuff to this tutorial. It only took me 4 and 1/2 months to do it.
User avatar
niffirg1
 
Posts: 376
Joined: Mon Aug 31, 2009 10:31 pm
Location: The Great American South!

Re: Spawning Stuff, For Dummies

Postby Rrobba » Fri Feb 19, 2010 8:03 pm

Thanks, helpful.
Image
I don't suffer from insanity. I enjoy every minute of it.
User avatar
Rrobba
[Best Sig 2010]
 
Posts: 1480
Joined: Mon Aug 31, 2009 6:01 pm
Location: Gibraltar

...

Postby simey j dude » Sat May 29, 2010 3:38 am

...
Last edited by simey j dude on Sun May 30, 2010 3:35 am, edited 1 time in total.
User avatar
simey j dude
 
Posts: 61
Joined: Sat Sep 05, 2009 3:11 am
Location: under your bed!

Re: Spawning Stuff, For Dummies

Postby Mystery » Sat May 29, 2010 6:22 am

Dude wtf. You just bumped a three month old topic all all you had to say was
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.
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: Spawning Stuff, For Dummies

Postby jrderksen » Tue Feb 08, 2011 4:14 am

How do you get it so the circles delete themselves after a while?
User avatar
jrderksen
 
Posts: 68
Joined: Wed Dec 22, 2010 4:50 am
Location: British Columbia, Canada

Re: Spawning Stuff, For Dummies

Postby TC42 » Tue Feb 08, 2011 4:51 am

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?
Image
Spambot wrote:Nowadays, memes usually are studied less in the field of biology, but more with the arena of psychology along with sociology. But, the major area of a meme, getting embraced and imitated all the time is what’s at any core connected with any meme.
User avatar
TC42
 
Posts: 984
Joined: Sun Jan 09, 2011 1:53 pm
Location: $ sudo apt get-install sandwich_

Re: Spawning Stuff, For Dummies

Postby jrderksen » Tue Feb 08, 2011 7:54 am

I was wanting them to delete on a timer.
User avatar
jrderksen
 
Posts: 68
Joined: Wed Dec 22, 2010 4:50 am
Location: British Columbia, Canada

Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 2 guests

cron