The Daily Click ::. Forums ::. Klik Coding Help ::. Scripting in MMF
 

Post Reply  Post Oekaki 
 

Posted By Message

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
21st February, 2008 at 22:59:06 -

Hmm.. is there an example for making MMF do things by following a script I wrote outside the program? Say I have a text file that says
display text1 "hello"

and in MMF, the string text called text1 is changed to "hello".

I know it's possible, but what's the best way of doing it?

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
22nd February, 2008 at 00:17:28 -

use string parser. friend did this with a game once in tgf. prograbots. he is no longer with us
he's not dead or nothin he just doesnt click no more

http://create-games.com/download.asp?id=5397

oh yea he gave me the open source to the game once. not sure if the download is. and he taught me how to do it. if i ever get ahold of him maybe i can get him to gimme the source and ill make a general example.

Image Edited by the Author.

 
n/a

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
22nd February, 2008 at 00:55:02 -

It's much easier to use a lua object, then you can do:

function hello()
display("text1","hello");
end

Etc. I find this really far more flexible, since I can actually do math in the script e.g: display("hello",STR1 .. STR2); or setx("object",20+VAR);

If you want a less efficient way you could use a list object and just use string parser :\.

Image Edited by the Author.

 
Image
http://bfollington.tumblr.com

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
22nd February, 2008 at 02:07:09 -

What I was doing couldn't use the Lua object, I forgot why, it was on my to-do list last November

cecil:
Sure, if possible, I'd like to have the source. I'll even give you and him some credit if I modify it and make something better out of it. What's his name/nick?

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
22nd February, 2008 at 02:27:23 -

I find it hard to fathom what, I mean Lua is a programming language it should cater to just about every need?

But if your hearts set on not using it, meh.

 
Image
http://bfollington.tumblr.com

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
22nd February, 2008 at 03:12:33 -

his tdc is "JasonDudie"

hmm. i only have his aol screenname. which he is rarely on. "Areallycoolguy14"

we used to do a lot of click stuff together. then he got a job

if you know anything about parsing then it shouldnt be that hard to figure out. i beleive he used a fastloop to loop through a text file with the "programming code" in it. when it parsed a specific term it would then parse the folowing information in a certain way until the end of line delimeter was reached. so something parsed like "color" would go on to parse the next word after which would be the specific color.

so something like

:color green:

would be a line of code that returns green as the color value.

it can become as complex as you want it to, at the expense of numerous events to handle all the parsing.

i have a few ideas on how to make nameable variables using the list object and data store object. like when you initialize a named variabe you have to include its datastore object position, and then save it in the list object so whenever that variable is mentioned it will know where to look in the data store object to find out what is stored in that variable.

i am really interested in stuff like this but its a MAJOR task to take on and would be very time consuming.

i have too much on my hands solving my proffesors problems

my current assignment is on parsing tokens. its quite a fun topic

 
n/a

LIJI

Flava's Smarter Twin

Registered
  29/08/2006
Points
  2032

I like penguins
22nd February, 2008 at 15:32:46 -

http://ext.neatwares.ath.cx/ext/Expression_Evaluator_Object_1.07
Use this object with custom MMF functions and the evaluate actions to make cool stuff.
You can create a simple programming language with it in a few seconds!

 
Service Unavailable

nim



Registered
  17/05/2002
Points
  7234
22nd February, 2008 at 16:16:46 -

Ben, just wondering - does using LUA make it easier to use MMF? For example, does it avoid the need to spread value/fastloop for every object, or even if not, does it make that process any faster? Anything above 80 active object/fastloop events makes my computer complain :/

 
//

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
22nd February, 2008 at 18:01:49 -

Nim - It runs loops about the same speed as MMF fastloops :\. Plus you're still gonna need to process the output on the MMF side, so it doesn't help too much with loops tbh. i.e. You're gonna have to spread values and just have a on function rather than an on loop.

for i=0,5 do
fastloopStuff("woot");
end

That kinda thing, I use Lua for my cutscene system in a little thing I started up. Works like a charm.

 
Image
http://bfollington.tumblr.com

nivram



Registered
  20/07/2006
Points
  171
22nd February, 2008 at 18:14:52 -

Does anyone have the source code for prograbots? I tried to email Areallycoolguy14 on aol, but an error occurs that he is not a member. Does anyone know how to contact him?
Thanks

 
458 MMF2 & CTF 2.5 examples and games

http://www.castles-of-britain.com/mmf2examples.htm

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
22nd February, 2008 at 23:11:03 -

im not sure if case matters for the aim email system. so it would be "areallycoolguy14" with the lowercase 'a'.
but as i said. he's never on. and no. other than him, i think im the only one who would have the source. and i had to beg for it . now i dont have it anymore.

 
n/a

nivram



Registered
  20/07/2006
Points
  171
23rd February, 2008 at 09:26:16 -

Ok, thanks for replying.

 
458 MMF2 & CTF 2.5 examples and games

http://www.castles-of-britain.com/mmf2examples.htm

nim



Registered
  17/05/2002
Points
  7234
24th February, 2008 at 08:05:21 -

OK, thanks Ben

 
//

Jason Dudie



Registered
  23/04/2005
Points
  641
24th March, 2008 at 07:37:15 -

Hey guys. I just stumbled upon this reply using google lol.

The source for prograbots is located here...

http://gelfinatic.sitesled.com/Prograbots2.gam

 
Yo!

nivram



Registered
  20/07/2006
Points
  171
24th March, 2008 at 09:13:21 -

Thanks Jason Dudie. Have you down loaded the source? I have fiber optic Internet with 2Mb per sec down load. I about fainted when the 12Mb source was down loading from SiteSled at 3.8kb a second with 1 hour and 7 minutes remaining on the download time. The down load rate was still dropping when I hit Cancel Down Load.
Marvin

 
458 MMF2 & CTF 2.5 examples and games

http://www.castles-of-britain.com/mmf2examples.htm
   

Post Reply



 



Advertisement

Worth A Click