Phunlet Import oncollide/onlaserhit

About advanced scenes, and the Thyme scripting language used in Algodoo.

Phunlet Import oncollide/onlaserhit

Postby fox11trot » Wed Dec 16, 2009 7:47 pm

So i want to make a scene that imports phunlets on collide or on laser hit and i know the code is
Code: Select all
scene.importphunlet("name of phunlet")


How would you specify the position of the phunlet spawning? Because it always spawns at mousepos
fox11trot
 
Posts: 62
Joined: Tue Sep 01, 2009 7:25 am

Re: Phunlet Import oncollide/onlaserhit

Postby RA2lover » Thu Dec 17, 2009 1:41 am

phunlets also spawn at mouse position even when importing them the canon way.

still, you could spawn the scene instead of importing it.
Rating: rated 6.1
Filesize: 9.99 kB
Comments: 4
Ratings: 3
download
Jrv wrote:
TC42 wrote:Quite honestly, I didn't think anyone on 4chan has that good a use of grammar, spelling, usage, mechanics, ect.
But I've never been there, so I may be wrong.


GTFO newfgt
User avatar
RA2lover
 
Posts: 607
Joined: Mon Aug 31, 2009 8:43 pm
Location: Brazil

Re: Phunlet Import oncollide/onlaserhit

Postby fox11trot » Thu Dec 17, 2009 1:53 am

well here is my idea:
Since having alot of objects in a scene slows it down, what i want to make is a zombie game where the zombies spawn after a certain ammount of time one by one and as you shoot the zombies in the game, it deletes them so you dont have to slow down your computer so much because the zombies spawn on their own and the scene does not start with like 50 zombies all slowing down your computer.

so i need a way to spawn complex objects at a certain position basically, and importphunlet is very convenient except that i need a way to specify postition
fox11trot
 
Posts: 62
Joined: Tue Sep 01, 2009 7:25 am

Re: Phunlet Import oncollide/onlaserhit

Postby RA2lover » Fri Dec 18, 2009 2:01 pm

it's already done in that scene. hovewer, its just the bullet.

i first save the scene as a pseudophunlet(Copy), then go to notepad++, remove paragraphs and line breaks, remove the "//phunlet created by x y.z", and then put it into the spawn code.

worth mentioning that there will be a offset from the desired position, because of the phunlet offset. so, you could simply place the guy where he should be at spawn moment, then do what was previously said.

removing the "body" variable eliminates the possibility of them sticking together at spawn, at the expense of loosening things with the "glue together" geom option used.
Jrv wrote:
TC42 wrote:Quite honestly, I didn't think anyone on 4chan has that good a use of grammar, spelling, usage, mechanics, ect.
But I've never been there, so I may be wrong.


GTFO newfgt
User avatar
RA2lover
 
Posts: 607
Joined: Mon Aug 31, 2009 8:43 pm
Location: Brazil

Re: Phunlet Import oncollide/onlaserhit

Postby fox11trot » Sun Jan 03, 2010 8:00 pm

ok nice! thanks
fox11trot
 
Posts: 62
Joined: Tue Sep 01, 2009 7:25 am

Re: Phunlet Import oncollide/onlaserhit

Postby 13yrmadman » Sun Jan 03, 2010 9:30 pm

RA2lover wrote:phunlets also spawn at mouse position even when importing them the canon way.

still, you could spawn the scene instead of importing it.
Rating: rated 6.1
Filesize: 9.99 kB
Comments: 4
Ratings: 3
download

that is so much scripting on that scene!
Alpha, Zeta, Eta, Theta, Iota to Omega
Thats Physics for you
User avatar
13yrmadman
 
Posts: 17
Joined: Sun Oct 04, 2009 3:35 am
Location: America

Re: Phunlet Import oncollide/onlaserhit

Postby RA2lover » Sun Jan 03, 2010 9:43 pm

lol.the object only spawns 3 fixates, 2boxes, 2 circles, and one spring.
i once spawned 192 circles with tracers at once.
Jrv wrote:
TC42 wrote:Quite honestly, I didn't think anyone on 4chan has that good a use of grammar, spelling, usage, mechanics, ect.
But I've never been there, so I may be wrong.


GTFO newfgt
User avatar
RA2lover
 
Posts: 607
Joined: Mon Aug 31, 2009 8:43 pm
Location: Brazil


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 2 guests