| Blockland Forums > Modification Help |
| Auto Falling Plates code not making plates fall. |
| << < (4/6) > >> |
| Treynolds416:
--- Quote from: phflack on June 04, 2012, 10:26:26 PM ---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 --- End quote --- 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 |
| Mold:
What's wrong with you and your loops Wrench the plate and call it Plate_red Put _Plate_red.fireinputevent("fall"); In script //done |
| Port:
--- Quote from: Mold on June 05, 2012, 02:27:35 PM ---What's wrong with you and your loops Wrench the plate and call it Plate_red Put _Plate_red.fireinputevent("fall"); In script //done --- End quote --- What if you have multiple bricks named _Plate_red? |
| Mold:
--- Quote from: Port on June 05, 2012, 02:33:39 PM ---What if you have multiple bricks named _Plate_red? --- End quote --- 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"); } |
| Lugnut:
I wasn't aware all the named bricks were defined in an array? |
| Navigation |
| Message Index |
| Next page |
| Previous page |