need script help!!
5 posts • Page 1 of 1
need script help!!
hi i am making a car that has a laser and if that laser collides it has to get towards the car
i want to do that with a spring? so i want to spawn a spring between scene.my.hit1 (thats the car) and scene.my.hit2 (that's where the laser hits) it may look like this?:
(e)=>{scene.addspring({pos:=scene.my.hit2,scene.my.hit2; length := 0 (bacause it has to move the object towards the car); damp:= 2})}
could you guys give me the right code?
i want to do that with a spring? so i want to spawn a spring between scene.my.hit1 (thats the car) and scene.my.hit2 (that's where the laser hits) it may look like this?:
(e)=>{scene.addspring({pos:=scene.my.hit2,scene.my.hit2; length := 0 (bacause it has to move the object towards the car); damp:= 2})}
could you guys give me the right code?
- jessebax129
- Posts: 34
- Joined: Tue Jan 05, 2010 6:32 pm
Re: need script help!!
I think it would actually be easier to use attraction instead of a spring.
TheWinkits wrote:They both looks of cuking amazing
-
Chronos - [Most Active Member 2010]
- Posts: 4457
- Joined: Mon Aug 31, 2009 6:00 pm
- Location: Californania
Re: need script help!!
no that will not work chronos
- jessebax129
- Posts: 34
- Joined: Tue Jan 05, 2010 6:32 pm
Re: need script help!!
the problem is you need a geomID within the car to spawn the spring off and you also probably want to be able to release the spring so to kill 2 girls with 1 cup i would make a container to hold a spawned box which would hold on to the spawned spring, scripted for the holding container(you need a seperate laser to trigger)
to release just kill the spawned box
- Code: Select all
scene.addbox({pos:=e.pos; geomID:=1; size:=[1,1]}); scene.addspring({geom0:=0; geom1:=1; world0pos:=scene.my.hit2; world1pos:=e.pos; length:=0;})
to release just kill the spawned box
- Mr_Stabby
- Posts: 155
- Joined: Wed Dec 16, 2009 12:16 am
Re: need script help!!
Mr_Stabby wrote:the problem is you need a geomID within the car to spawn the spring off and you also probably want to be able to release the spring so to kill 2 girls with 1 cup i would make a container to hold a spawned box which would hold on to the spawned spring, scripted for the holding container(you need a seperate laser to trigger)
- Code: Select all
scene.addbox({pos:=e.pos; geomID:=1; size:=[1,1]}); scene.addspring({geom0:=0; geom1:=1; world0pos:=scene.my.hit2; world1pos:=e.pos; length:=0;})
to release just kill the spawned box
I hate you just a little bit less now .
-
Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
5 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests