Hi everybody, I'm back! and with a question!

Posted By: anonymous_alcoho

Hi everybody, I'm back! and with a question! - 03/19/07 16:24

So, my computer crashed about 4 months ago. I lost everything I had on it and had to get it replaced. Luckily, I had my project on a flash drive.

And then I misplaced that before I put everything on my new computer. After failing to find it and not wanting to start all over again on my RTS game, I sort of gave up on it.

But 4 months later, I found my drive and I'm ready to start where I left off.

So I have a question that I need an answer to before I begin programming again, (in C-Script, I see that Lite-C, or some version of it, appears to be out, but I don't want to rewrite what I have started). Suppose I have three entities with the following action:

Code:

action someAct
{
doSomething();
}



do all the entities with that action use the same instance of the function doSomething() or do they use their own copy, independent of other entities with the same action?
Posted By: xXxGuitar511

Re: Hi everybody, I'm back! and with a question! - 03/19/07 16:28

their own copy, as far as i can see what your asking.

Such as if inside the action, you defined a local variable,
action this
{
var localvar;
}


Each entity would have their own copy of this variable, they wouldn't share it...


BTW: Welcome back...
Posted By: anonymous_alcoho

Re: Hi everybody, I'm back! and with a question! - 03/19/07 16:29

Thank you. that answered my question.
© 2024 lite-C Forums