motor fail (need help for SIMPLE script)

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

motor fail (need help for SIMPLE script)

Postby francky380a380 » Sat Mar 22, 2014 2:01 pm

Hi, i try to make a motor with onCollide script but it doesn't works !! So i made it with laser and it works.

But i want to fix my onCollide motor, can you help me. When it collides a billion of circle spawn whereas I only want one, I try to change every layers but nothing changed.


My scene is in the post (press Enter to "start" engine)
Attachments
motor fail.phz
(14.63 KiB) Downloaded 69 times
francky380a380
 
Posts: 48
Joined: Tue Dec 17, 2013 8:12 pm

Re: motor fail (need help for SIMPLE script)

Postby Kilinich » Sat Mar 22, 2014 8:35 pm

1) don't forget to put : before =
2) add heteroCollide := false to prevent circles from colliding each other.
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: motor fail (need help for SIMPLE script)

Postby francky380a380 » Sun Mar 23, 2014 12:15 am

THANK YOU !!!

what did resolve the problem? The ":" of the collideset or the heteroCollide or the both ??

Why do i have to put ":=" and not "=" ? I have to wright this every time or only on spawn object ?
francky380a380
 
Posts: 48
Joined: Tue Dec 17, 2013 8:12 pm

Re: motor fail (need help for SIMPLE script)

Postby Kilinich » Sun Mar 23, 2014 3:29 pm

use = for already existing variables
use := for creating new variables/objects

heteroCollide is the same checkbox as "No self collision", collideSet is collision group. So set it as you need.
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: motor fail (need help for SIMPLE script)

Postby pnvv » Thu Aug 28, 2014 7:40 pm

I had this problem too and I found the cause was the spawned circles collided with the scripted circle. Adding HeteroCollide := false fixed all this.
Image

(/)(°,,,°)(/)
User avatar
pnvv
 
Posts: 670
Joined: Tue Aug 26, 2014 11:46 pm
Location: Disunited States of America


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 6 guests