How to make a beacon
7 posts • Page 1 of 1
How to make a beacon
A beacon is an object that is constantly updating a script such as positions.
Make two boxes, one right next to the other. Make sure that the right box collides with B. Make a circle with a center hinge and place it slightly inside both boxes like so:
To make sure that the beacon can stay together as one object we will make a box behind it and connect everything to it.
In the script of the left box put:
In the script of the right box put:
Put your script that you want to be updated constantly in the circle. Now you're done! It's actually very easy to do this. You can also do this with lasers!
Make sure that the object that the laser is hitting collides with A and B. You can also use this same laser method to change the collideSet of an object. Just replace all parts that say laser with geom.
Make two boxes, one right next to the other. Make sure that the right box collides with B. Make a circle with a center hinge and place it slightly inside both boxes like so:
To make sure that the beacon can stay together as one object we will make a box behind it and connect everything to it.
In the script of the left box put:
- Code: Select all
e.other.collideSet = 2
In the script of the right box put:
- Code: Select all
e.other.collideSet = 1
Put your script that you want to be updated constantly in the circle. Now you're done! It's actually very easy to do this. You can also do this with lasers!
- Code: Select all
onLaserHit = (e)=>{e.laser.collideSet == 1 ? {e.laser.collideSet = 2} : {e.laser.collideSet == 2 ? {e.laser.collideSet = 1} : {}}}
Make sure that the object that the laser is hitting collides with A and B. You can also use this same laser method to change the collideSet of an object. Just replace all parts that say laser with geom.
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: How to make a beacon
cool, but what kind of script would be updated constantly? oh and i thought this was about making bacon!
I am Alpha and Omega, the beggining and the end.
-
StephenAlverez - Posts: 164
- Joined: Wed Sep 30, 2009 2:46 am
- Location: Vermont
Re: How to make a beacon
A script that could be updated constantly could be a timer that uses the controllerAcc.
Get it?
- Code: Select all
sim.time - e.this.controllerAcc >= 5 ? {print("true")} : {print("false")}
Get it?
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: How to make a beacon
or I saw one that constantly updated its angle for some active suspension
[/post]
Paradigm 29 wrote:I've been trying to figure out why people even buy hummers ever since I found out that they don't have machine guns.
-
izacque - Posts: 483
- Joined: Mon Sep 14, 2009 11:14 am
Re: How to make a beacon
Hey, what do you thinc
or
- Code: Select all
oncollide=(e)=>{colllideset=3-collideset}
or
- Code: Select all
oncollide=(e)=>{colllideset=10-collideset}
-
Nait - Posts: 224
- Joined: Fri Oct 30, 2009 1:56 am
- Location: Eastern Russia, Vladivostok
Re: How to make a beacon
The first one is good but I would suggest doing it the way I described above just because it seems easier to read and understand. Which one is easier to understand for you? e.this.collideSet = 2 or e.this.collideSet = 3 - e.this.collideSet? Whichever way is easier for you works. The second one you posted makes it change from A to A and D.
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
7 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 10 guests