how to add an variable when colliding?

If you have problems installing or running Algodoo, have found a bug or need in-game help - this is it!

how to add an variable when colliding?

Postby faytree » Thu Jan 24, 2013 1:50 pm

i mean like when the circle for example collides a box,the box will add a variable.I know it's impossible but if you have an idea how to add an variable?
Attachments
example.phz
(null)
(6.41 KiB) Downloaded 17 times
waiting for semester break to come...
User avatar
faytree
 
Posts: 947
Joined: Mon Nov 05, 2012 1:37 pm
Location: Selangor, Malaysia

Re: how to add an variable when colliding?

Postby Kilinich » Thu Jan 24, 2013 2:02 pm

onCollide = (e) => {e.this._newVar := 0}

this will work too:
onCollide = (e) => {e.this._newVar = 0}
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: how to add an variable when colliding?

Postby faytree » Fri Jan 25, 2013 12:14 am

Thanks kilinich! :thumbup:
waiting for semester break to come...
User avatar
faytree
 
Posts: 947
Joined: Mon Nov 05, 2012 1:37 pm
Location: Selangor, Malaysia


Return to Help / Bug reports

Who is online

Users browsing this forum: No registered users and 4 guests