[SOLVED]Thyme:how to get owner info, inside of IF statement
5 posts • Page 1 of 1
[SOLVED]Thyme:how to get owner info, inside of IF statement
SOLVED: (by tatt61880 on 2012.05.13 21:28)
Solved in 2.0.2b15. Thanks
-Tatt
----Please tell me how to get owner info at inside of {};
The code above returns below.
inside {}:
outside {}: box
I'd like to get box info at inside of {}
Regards,
Tatt
Solved in 2.0.2b15. Thanks
-Tatt
----Please tell me how to get owner info at inside of {};
- Code: Select all
Scene.addBox {
collideSet := {
true ? {print("inside {}: " + owner)} : {};
print("outside {}: " + owner);
1
}
}
The code above returns below.
inside {}:
outside {}: box
I'd like to get box info at inside of {}
Regards,
Tatt
Last edited by tatt61880 on Sun May 13, 2012 2:29 pm, edited 2 times in total.
Reason: Fixed!
Reason: Fixed!
NOTE: I'm not an Algoryx member.
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
-

tatt61880 - [Most Helpful Person 2010]
- Posts: 1150
- Joined: Mon Aug 31, 2009 5:45 pm
- Location: Tokyo, Japan
Re: Thyme: how to get owner info at inside of IF statement
- Code: Select all
{
self := owner;
true ? {print("inside {}: " + self)} : {};
print("outside {}: " + self);
1
}
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: Thyme: how to get owner info at inside of IF statement
Kilinich wrote:
- Code: Select all
{
self := owner;
true ? {print("inside {}: " + self)} : {};
print("outside {}: " + self);
1
}
Wonderful!
Thanks, Kilinich.
Edit:
Hmm, it works when you input code in script-menu, however, next code doesn't work well.
- Code: Select all
Scene.addBox {
self := owner;
collideSet := {
true ? {print("inside {}: " + self)} : {};
print("outside {}: " + owner);
1
}
}
NOTE: I'm not an Algoryx member.
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
-

tatt61880 - [Most Helpful Person 2010]
- Posts: 1150
- Joined: Mon Aug 31, 2009 5:45 pm
- Location: Tokyo, Japan
Re: Thyme: how to get owner info at inside of IF statement
in 2.0.2 b15 I'll be introducing a "entity" keyword that works like this:
Scene.addBox {
text := {
"Pos: [" + entity.pos(0) + "," + entity.pos(1) + "]" + " - " + (entity.pos(1) < 0 ? "low" : "high");
}
}
Scene.addBox {
text := {
"Pos: [" + entity.pos(0) + "," + entity.pos(1) + "]" + " - " + (entity.pos(1) < 0 ? "low" : "high");
}
}
Emil Ernerfeldt, lead developer
- emilk
- Posts: 616
- Joined: Mon Aug 31, 2009 11:01 am
- Location: Umeå, Sweden
Re: Thyme: how to get owner info at inside of IF statement
emilk wrote:in 2.0.2 b15 I'll be introducing a "entity" keyword that works like this:
Scene.addBox {
text := {
"Pos: [" + entity.pos(0) + "," + entity.pos(1) + "]" + " - " + (entity.pos(1) < 0 ? "low" : "high");
}
}
Thanks!
NOTE: I'm not an Algoryx member.
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
Hi, Algodoo lovers. Have you read next topic? Featured scenes suggestions
To translators: English.cfg changelog will be useful (even for me).
-

tatt61880 - [Most Helpful Person 2010]
- Posts: 1150
- Joined: Mon Aug 31, 2009 5:45 pm
- Location: Tokyo, Japan
5 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests



