| Blockland Forums > Modification Help |
| Event: onPlayerFirstSpawn not working |
| << < (3/6) > >> |
| Slicks555:
I recommend you don't do something like this. There's just too many possible abuses. I recommend a spawn point with a short fall then a plate below that does whatever you want onTouch, then teleports them to play area. It's not as visually pleasing, but it's a hell of a lot easier and less abuse prone. |
| phflack:
try replacing --- Code: ---%brick.processInputEvent(onPlayerFirstSpawn,%client); --- End code --- with --- Code: ---for(%a = 0; %a < MainBrickGroup.getCount(); %a++) for(%b = 0; %b < MainBrickGroup.getObject(%a).getCount(); %b++) MainBrickGroup.getObject(%a).getObject(%b).processInputEvent(onPlayerFirstSpawn, %client); --- End code --- assuming that your processInputEvent(); is correct, which i have no idea about but that code should get each brick in the server and call the function |
| elm:
--- Quote from: phflack on May 06, 2012, 02:05:21 AM ---try replacing --- Code: ---%brick.processInputEvent(onPlayerFirstSpawn,%client); --- End code --- with --- Code: ---for(%a = 0; %a < MainBrickGroup.getCount(); %a++) for(%b = 0; %b < MainBrickGroup.getObject(%a).getCount(); %b++) MainBrickGroup.getObject(%a).getObject(%b).processInputEvent(onPlayerFirstSpawn, %client); --- End code --- assuming that your processInputEvent(); is correct, which i have no idea about but that code should get each brick in the server and call the function --- End quote --- No, with a lot of bricks that'll be disasterous. Just do what jookia said.. |
| Greek2me:
Stop suggesting that he should loop through every single brick in the server. Servers often have over a hundred thousand bricks. Do what xXBeibsFan119Xx (Jookia) said and simply make a tab-delimited list of every brick containing the event, then loop through that list and call the event on each of the bricks in it. |
| Ipquarx:
--- Quote from: Greek2me on May 06, 2012, 09:27:08 AM ---Stop suggesting that he should loop through every single brick in the server. --- End quote --- So much this. |
| Navigation |
| Message Index |
| Next page |
| Previous page |