Can I clone or store a thing with THYME?
11 posts • Page 1 of 1
Can I clone or store a thing with THYME?
(e)=>{
scene.addciecle(e.this);
pos = [0, 0]
}
but it didn't work.
If I use (e)=>{u=e;} and let u global,when I attempt to see it,Algodoo crashes.
scene.addciecle(e.this);
pos = [0, 0]
}
but it didn't work.
If I use (e)=>{u=e;} and let u global,when I attempt to see it,Algodoo crashes.
- l4m2
- Posts: 42
- Joined: Fri Jun 27, 2014 6:21 am
Re: Can I clone or store a thing with THYME?
scene.cloneEntityTo(entity,pos)
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Can I clone or store a thing with THYME?
Kilinich wrote:scene.cloneEntityTo(entity,pos)
It did work, but is it necessary to find a place far away to store them if i just want to use it later ?
- l4m2
- Posts: 42
- Joined: Fri Jun 27, 2014 6:21 am
Re: Can I clone or store a thing with THYME?
l4m2 wrote:Kilinich wrote:scene.cloneEntityTo(entity,pos)
It did work, but is it necessary to find a place far away to store them if i just want to use it later ?
Iknownow.A thing in my can be used too. Thank you!
- l4m2
- Posts: 42
- Joined: Fri Jun 27, 2014 6:21 am
Re: Can I clone or store a thing with THYME?
But this shows no effect:
I want to make Pokemon balls.
- Code: Select all
(e)=>{
(e.geom.timetolive > 0) ? {
scene.addcircle({
pos := e.geom.pos;
a := e.geom;
radius := 0.1;
collideset := 2;
drawcake := false;
color := [1, 0, 0, 1];
oncollide := (e)=>{
e.other.materialName == "Floor" ? {
scene.cloneEntityTo(a, pos);
timetolive = -1
} : {}
}
});
e.geom.timetolive = -1
} : {}
}
I want to make Pokemon balls.
- l4m2
- Posts: 42
- Joined: Fri Jun 27, 2014 6:21 am
Re: Can I clone or store a thing with THYME?
l4m2 wrote:But this shows no effect:
- Code: Select all
(e)=>{
(e.geom.timetolive > 0) ? {
scene.addcircle({
pos := e.geom.pos;
a := e.geom;
radius := 0.1;
collideset := 2;
drawcake := false;
color := [1, 0, 0, 1];
oncollide := (e)=>{
e.other.materialName == "Floor" ? {
scene.cloneEntityTo(a, pos);
timetolive = -1
} : {}
}
});
e.geom.timetolive = -1
} : {}
}
I want to make Pokemon balls.
Tested i found a not definded.Why?
- l4m2
- Posts: 42
- Joined: Fri Jun 27, 2014 6:21 am
Re: Can I clone or store a thing with THYME?
I don't know what is pockemon balls but your code is bad)
What do you want to do?
Why check ttl? Object could not exist with negative ttl.
Why set it to -1? There is function scene.removeEntity().
Wtere is no "a" defined in onCollide then objcet call it, you should use e.this, e.this.pos in onCollide.
What do you want to do?
Why check ttl? Object could not exist with negative ttl.
Why set it to -1? There is function scene.removeEntity().
Wtere is no "a" defined in onCollide then objcet call it, you should use e.this, e.this.pos in onCollide.
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Can I clone or store a thing with THYME?
Kilinich wrote:I don't know what is pockemon balls but your code is bad)
What do you want to do?
Why check ttl? Object could not exist with negative ttl.
Why set it to -1? There is function scene.removeEntity().
Wtere is no "a" defined in onCollide then objcet call it, you should use e.this, e.this.pos in onCollide.
1.If not checked, a tick with two laser hitting on it(to make it good looking) make the code happened twice.
2.I don't know this command.
3.In Onlaserhit e.geom is used correctly. Byt no variable name can be used to store this.
- l4m2
- Posts: 42
- Joined: Fri Jun 27, 2014 6:21 am
Re: Can I clone or store a thing with THYME?
Kilinich wrote:I don't know what is pockemon balls but your code is bad)
What do you want to do?
Why check ttl? Object could not exist with negative ttl.
Why set it to -1? There is function scene.removeEntity().
Wtere is no "a" defined in onCollide then objcet call it, you should use e.this, e.this.pos in onCollide.
I know what you mean in the last sentence now. Yet it in fact mean nothing.
- l4m2
- Posts: 42
- Joined: Fri Jun 27, 2014 6:21 am
Re: Can I clone or store a thing with THYME?
I simplified the code as
However there's still no a in the circle.
- Code: Select all
scene.addcircle({pos:=[0,0];a:=0;})
However there's still no a in the circle.
- l4m2
- Posts: 42
- Joined: Fri Jun 27, 2014 6:21 am
Re: Can I clone or store a thing with THYME?
I made it. Necessary to use my.
- l4m2
- Posts: 42
- Joined: Fri Jun 27, 2014 6:21 am
11 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests



