XP Custom functions - How to?


#1

Hi. Can you write custom functions in the latest XP? What is the correct syntax?

Or maybe some other way to organize code and apply it to a bunch of objects? maybe multiple instances of XP? custom channels? I’m really confused at this point. I am trying to organize how to go about this project I’m doing, which uses some basic code from an old flash project I did using actionscript 2. I think even actionscript 1 had custom functions.

Am I missing something really obvious?

Thanks


#2

well that was a pretty vague list of questions you just rattled off. I dont know if people will be of help with the way you asked what you were trying to do.
Im no pro with writing xpressions in EIAS so maybe its not as vague as Im reading it?
Mike Fitz


#3

Can you write custom functions in XPressionist is a pretty direct, to the point question.

I am no programming expert either but maybe I am sounding like one? Lol


#4

what I mean is, you might get a better response if you tell us what you are trying to do.
As far as I know, you can write an expression for an indiviual object(for most of the attributes). But if you make other objects children of this one object, you could probably control multiple objects like you ask. But I would think that people may want to know what you are trying to do so they can figure the scenario through before replying.

Mike Fitz
www.3dartz.com


#5

I’m trying to reuse code I wrote in flash (actionscript 2) for a cartoon bug animation that came out nicely. To get the same moves and that same 2D animation feel that I liked, I was thinking I cpuld do it in EIAS 8 and XP, just not cartoon like this time.

In flash (this was years ago) I wrote a simple function to animate the various parts of one bug. the function controlled the movements, placement and colors of the bug. Just a few expressions, or lines of code. I then reused this function, and passed it parameters to basically animate the rest of the bugs, there were a lot of them, and the result was nice and random, all the bugs behaving differently.

I have tried writing “function(){ whatever” syntax in XP but I get errors. I have also tried using “for” loops but I also get errors when I combine it with custom variables. The for loops was in an old version of XP though, EIAS 5.5 XP I think, and this was for another project, similar though, and I ended up using an instance of XP for each “bug” and it was just a nightmare to keep track of.

And again, I feel like I’m missing something obvious somewhere, but, I hope it’s clearer now. Thanks.


#6

Hi Danford,

i think it is also a good idea to post your question at the eitechnologygroup.com site, because as far as i remember BJMonkey has experience in XP scripting and could probably give you an advise. He usually visits the forum there and not to much here.

Regards
Stefan


#7

Danford, if you get some good info/advice/solution over at the eais forum be sure to report back, I’d be curious to know what happens.

thanks!
Mike Fitz


#8

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.