Laser data sending
5 posts • Page 1 of 1
Laser data sending
So, I've noticed that a couple of scenes have a data variable in the laser, so that it can send data to the receiving object. I couldn't figure out a way to do that myself, so could you guys tell me how it works?
http://www.algodoo.com/algobox/details.php?id=41564
^ an example of scene having a data sender in laser
http://www.algodoo.com/algobox/details.php?id=41564
^ an example of scene having a data sender in laser
- LeeviON
- Posts: 4
- Joined: Sun Nov 28, 2010 9:38 pm
Re: Laser data sending
e.laser.<1> = <2>
1 = The name of the new variable
2 = The data to be contained the variable
1 = The name of the new variable
2 = The data to be contained the variable
When asking for help, READ THE STICKIES!
- electronicboy
- Posts: 1694
- Joined: Mon Aug 31, 2009 6:18 pm
Re: Laser data sending
It just puts out an error saying something like "Can't find identifier 'e' in [ROOT]"
- LeeviON
- Posts: 4
- Joined: Sun Nov 28, 2010 9:38 pm
Re: Laser data sending
electronicboy wrote:e.laser.<1> = <2>
1 = The name of the new variable
2 = The data to be contained the variable
The code has to be in the (e)=>{}
so for example, if i wanted a variable called data with a variable of 10.
The onlaserhit code would be
- Code: Select all
(e)=>{e.laser.data = 10}
Hope that helps.
When asking for help, READ THE STICKIES!
- electronicboy
- Posts: 1694
- Joined: Mon Aug 31, 2009 6:18 pm
5 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 9 guests



