Expandability

Suggest changes and improvements to Algodoo.

Expandability

Postby ags131 » Wed Nov 18, 2009 3:33 pm

I would like to see a way for us to be able to write DLL's in VB, C, or some other language and be able to use them in thyme. And thyme needs a way to split strings! Similar to the left(), right(), and mid() commands in VB.
ags131
 
Posts: 71
Joined: Thu Oct 29, 2009 4:14 pm

Re: Expandability

Postby link0007 » Wed Nov 18, 2009 3:46 pm

Program the string splitting yourself.. you can access strings like char arrays.
Link: "Surely somebody hates Walter Cronkite.."
Sonic: "Probably.. But somebody hates everyone."
:D
User avatar
link0007
 
Posts: 408
Joined: Thu Jun 11, 2009 2:45 pm

Re: Expandability

Postby standardtoaster » Wed Nov 18, 2009 4:36 pm

Can you tell us how you would access strings like an array?
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Expandability

Postby link0007 » Wed Nov 18, 2009 11:47 pm

Hm, thought you could do that. but don't see how anymore.
Link: "Surely somebody hates Walter Cronkite.."
Sonic: "Probably.. But somebody hates everyone."
:D
User avatar
link0007
 
Posts: 408
Joined: Thu Jun 11, 2009 2:45 pm

Re: Expandability

Postby RA2lover » Fri Nov 20, 2009 7:02 pm

you could make the string an array with quotes for that.
then you could remove the quotes and voila!
Jrv wrote:
TC42 wrote:Quite honestly, I didn't think anyone on 4chan has that good a use of grammar, spelling, usage, mechanics, ect.
But I've never been there, so I may be wrong.


GTFO newfgt
User avatar
RA2lover
 
Posts: 607
Joined: Mon Aug 31, 2009 8:43 pm
Location: Brazil

Re: Expandability

Postby standardtoaster » Fri Nov 20, 2009 7:18 pm

And how would you remove the quotes? :| If it's a string such as "a" and you remove the quotes you are going to get a. Algodoo will then try and find a and it won't be able to and return an error. But I do get what you're saying.
Code: Select all
scene.my.text=["t", "e", "s", "t"]
scene.my.text(0) = "t"
scene.my.text(1) = "e"
scene.my.text(2) = "s"
scene.my.text(3) = "t"
User avatar
standardtoaster
 
Posts: 606
Joined: Mon Aug 31, 2009 7:57 pm

Re: Expandability

Postby ags131 » Sat Nov 21, 2009 12:29 am

But how do you turn a normal string into an array without recoding an entire scene?
ags131
 
Posts: 71
Joined: Thu Oct 29, 2009 4:14 pm

Re: Expandability

Postby RA2lover » Sun Nov 29, 2009 7:46 pm

Dunno, but algodoo still has some helpful functions for that

math.tofloat - transforms a boolean or a string into a float value(ex: "112.62" would turn 112.62)
math.tobool - transforms integers(0 and 1) and strings into boolean values(ex: 1 or "true" becomes true)
math.tostring - transforms booleans, integers and floats into strings(ex: 1 would become "1", true would become "true")
Jrv wrote:
TC42 wrote:Quite honestly, I didn't think anyone on 4chan has that good a use of grammar, spelling, usage, mechanics, ect.
But I've never been there, so I may be wrong.


GTFO newfgt
User avatar
RA2lover
 
Posts: 607
Joined: Mon Aug 31, 2009 8:43 pm
Location: Brazil


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests