Author Topic: Auto Falling Plates code not making plates fall.  (Read 2250 times)

optomized code is better for released addons, while if you're helping somebody learn something like this, it's easier to read the way i posted it
so, no there isn't
Sorry to disagree with you, but it's just as easy to understand if you set variables instead of calling the function over and over. It's also good practice, you really should optimize any code, anywhere

What's wrong with you and your loops

Wrench the plate and call it Plate_red

Put

_Plate_red.fireinputevent("fall");

In script

//done

What's wrong with you and your loops

Wrench the plate and call it Plate_red

Put

_Plate_red.fireinputevent("fall");

In script

//done

What if you have multiple bricks named _Plate_red?

What if you have multiple bricks named _Plate_red?
Then you're forgeted and have to do

_Plate_red.fireinputevent("fall");
for(%i=1;isobject(_Plate_red_[%i]);%i++)
{
    _Plate_red_[%i].fireinputevent("fall");
}

I wasn't aware all the named bricks were defined in an array?

Then you're forgeted and have to do

_Plate_red.fireinputevent("fall");
for(%i=1;isobject(_Plate_red_[%i]);%i++)
{
    _Plate_red_[%i].fireinputevent("fall");
}

You can't use the [] append syntax in object names. Just have them all named the same thing and use brickgroup variables.

Sorry for my fail logic, I was half-asleep when I wrote this code.
« Last Edit: June 05, 2012, 05:10:53 PM by adam savage »

Sorry for my fail logic, I was half-asleep when I wrote this code.
Then you should know that and not post it. Enough with all these excuses everywhere, god

You can't use the [] append syntax in object names. Just have them all named the same thing and use brickgroup variables.
D:



RERAIL

I just need someone to tell me why it is not working!

RERAIL

I just need someone to tell me why it is not working!
Did you even change anything since the OP?