Program to Program Coding - Is it Possible ?
Using ClickTeam Products, Is it possible to make a Chameleon Code of sorts, that would take on the properties of the Main Character of another TGF or MMF game ?
Basically meaning that it would read the code related to the character, then Act in the same manner, and place the new character in that game or maybe even another ? It would have to be generic code, that works in the same manner for each game, i know, but is there a way to do this ?
Instead of having to copy and paste lines of code into every new game you want to put the characters in, you could just use this method if there is a way of doing it.
I was wondering, because if this is possible, then it would make porting one character of a game, able to be moved easily to another game, without extra coding.
Character Portability.
Thank you for reading. Please let me know if there is a way.
Re: Program to Program Coding - Is it Possible ?
Behaviors..
in the properties of an active object, edit those, make events.
If you copy the character into a new frame the behaviour stays with it.
Re: Program to Program Coding - Is it Possible ?
Ok, but I mean is there a way for it to read the events and act accordingly, without copying anything ... a mimickry .. like monkey see - monkey do ?
For one program to look at another and make an active that acts like the other program's active.
If there's not a way to do this, Could someone make an Extension to accomplish this ? Or is it just not possible ?
Re: Program to Program Coding - Is it Possible ?
Do u mean like making a game that could somehow imitate movement concepts from other click games, that were not made by you? Like having Mia from Eternal Daughter in your game? Could be cool for a fight game or something.
In theory, anything's *possible*, but it'd require so much work that you might as well design your own movements. And it's hard to think of how it would work with absolutely no human input.
It would have been easier with TGF, cos there was almost no encryption/compression in the .gam format - you could read almost anything you wanted from a TGF game, even events.
But to do so with MMF, well, I dunno how the cca file is built into the exe, or whether it's ever extracted to the hard disk like MIDI files are. If it stays built in, you'd have to hope the events chunk isn't compressed in any way, and the same with object properties.
Then, assuming that's okay, you'd have to find which object is the player object (not easy). Then you'd have to read the details of any movements assigned to that object (you could possibly use this as a hint to find the player object. An object with 'Player 1' movement assigned would be a hint, LOL!).
Then, after reading any details about built-in-movements that are assigned to it, you'd then have to scan the whole event list for any references to this object.
But that wouldn't work if it was a custom movement, since that would require detectors, and there'd not be an easy way to test for that by reading events.
And of course, you'd have to be checking the right frame. Cos the first few frames may well be menu options, and there's no way to tell.
Basically, give up :)
Re: Program to Program Coding - Is it Possible ?
Well, actually, NO. I want to have one of MY OWN games be able to Read the events of Another of MY OWN games, and use that to make a Series of games that use Characters' Animations I Premade in another file, ...
It's basically an Organizational thing. I don't see how it could be used any other way. I'm not talking about breaking someone's encrypted code, if that's what you thought, sorry. I don't like most other's coding style anyways, although I would like to be able to do everything that everyone else can do, put together.
But I want one of my own to read another of my own.
Is there a mode of some sort I can set to let one program access the other ? ..
Is it possible ?
Re: Program to Program Coding - Is it Possible ?
Lol, soz mate, I missunderstood :)
Fraid I can't think of anything at the mo, but if I do, I'll let you know.
What kind of game/thing were you planning on using it for?
One thing you can certainly do is bind the Shared Data Object to a game's movement - so you can have another application change the movement variables as your game runs (so you could teleport your character, or super-enhance his jumps).
Re: Program to Program Coding - Is it Possible ?
Quote:
Behaviors..
in the properties of an active object, edit those, make events.
If you copy the character into a new frame the behaviour stays with it.
So you're saying Behaviours are attached to the object, otherwise they're attached to the frame?
Re: Program to Program Coding - Is it Possible ?
Hmm, kewl Dines ... that sounds like a Game Genie or a GameShark though .. lol, that would give a reason for wanting to access others files if that's where I was going (it wasn't)... but it would be interesting to have a ClickTeam GameEnhancer .. hmm, I could have an MBK GameShark, :oP could call it a gameSlayer :OP
yea, MBK's GameSlayer .. lol
But, I was thinking more on the lines of those code-bar games ... where you can scan the card and it puts the character in the game ... sorta like that, only with my own stuff, and without the need to scan anything.
Re: Program to Program Coding - Is it Possible ?
I really don't understand what you want us to tell you to do? I thought behaviours might have been the answer, but could you give us a specific example of what you are trying to do any maybe then we can help?
And are you talking about 'importing characters' at runtime or when you're making the game in the frame editor?
Re: Program to Program Coding - Is it Possible ?
Quote:
Originally Posted by netninja
I really don't understand what you want us to tell you to do? I thought behaviours might have been the answer, but could you give us a specific example of what you are trying to do any maybe then we can help?
And are you talking about 'importing characters' at runtime or when you're making the game in the frame editor?
I think he means that if an exacutable, internet application or screen save application doesn't come with the .mfa he wants to get certian sprites from them in runtime and/or the frame editor of his application.
Re: Program to Program Coding - Is it Possible ?
If you want an object to do the same things without copying and pasting, put the events in the object's behavior. I find that the inability to use qualifiers in behaviors makes this more or less worthless, though, and that same limitation is likely to thwart any attempts at what you're doing. If you could just set up a bunch of qualifier-based behaviors, you could get your character to react to enemies without knowing them beforehand just by making sure the enemies all had the same qualifier. However, while you can copy and paste qualifiers into behaviors, it often leads to Bad Things [tm].
There is one workaround I have found to qualifier vs. behavior issues. If you can create a sub-object that applies to all of your enemies (or whatever) and parent them to those enemies, you can have your object react to those sub-objects.
So, say you want your character to shoot at any enemy, regardless of which game it's in. You make an object called "EnemyTargeter."
In your character's behavior, you tell him to shoot at EnemyTargeters. In each game, you write code to make sure that each enemy has an EnemyTargeter object following them around at all times.
You can pull similar tricks for other behaviors, and so long as all of your games have the necessary sub-objects, any character should work with them.
If what you mean is more along the lines of wanting to give all the events from one active object to another, there is a "Replace by another object" command in the Event Editor that is accessible by right-clicking on the object's icon at the top of the events screen. This cannot be automated, however.
This is about as close as MMF can get, at least as far as I understand your question.
Re: Program to Program Coding - Is it Possible ?
LUA scripts could come useful. Each character could use it's own script file (which is basically just a string - you can swap it at runtime). Then you "only" have to build a very generic engine around it that fully integrates the script. Voilą.
Re: Program to Program Coding - Is it Possible ?
" I find that the inability to use qualifiers in behaviors makes this more or less worthless,"
I hear this alot, but its not true!
If you just make an event using a qualifier in the event editor and copy it you can use it in behaviors.
It works in 1.5 anyway.
(by the way i've been lurking around here for a while but I just registered now...)
Re: Program to Program Coding - Is it Possible ?
Have you ever used it to success? There must be a reason why you can't just create events with qualifiers in the behavior itself..
Re: Program to Program Coding - Is it Possible ?
It was a "bug" in 1.5 that you were able to do that... CT removed it in MMF2. Now it is impossible to have qualifiers mixed with either behaviors or global events---which makes behaviors and global events basically useless for anything serious.
There have been posts about this before... I'd really like to see it fixed.
Re: Program to Program Coding - Is it Possible ?
I don't think it's going to be, the whole problem was that a qualifier gets split up depending on what type of object it's for, and in behaviours and global events there is simply no way of knowing what kind of object the qualifier is attached to.
Re: Program to Program Coding - Is it Possible ?
Quote:
Originally Posted by Dynasoft
the whole problem was that a qualifier gets split up depending on what type of object it's for
Well that's just plain stupid there.
Re: Program to Program Coding - Is it Possible ?
Well no, because the actions for an active object don't exist in a counter for example.
Re: Program to Program Coding - Is it Possible ?
It shouldn't matter. Why can't we just specify the type of object the qualifier uses? Easy. That's how other languages do it.
Besides I never before used something else than an AO in a qualifier and probably never will.
In my opinion qualifiers need a major overhaul (MMF 2.5 *hinthint*).. they need to be nameable and "typed". So you can only qualify objects of the same kind and then be able to use them in global events and behaviors.
Re: Program to Program Coding - Is it Possible ?
But as you said, that would be a major overhaul, not something that they could do for the next build.
Re: Program to Program Coding - Is it Possible ?
Indeed. From what I heard it changes the file structure or something along that line and that'll be a bigger thing to do.