Blockland Forums > Modification Help

Event Help

Pages: << < (3/5) > >>

Lugnut:


--- Quote from: Lugnut1206 on June 15, 2012, 12:30:07 PM ---
--- End quote ---
click that

¥ola:


--- Quote from: Lugnut1206 on June 15, 2012, 12:36:13 PM ---click that

--- End quote ---
Well stuff.  It still doesn't work.


--- Code: ---registerOutputEvent(fxDTSBrick, checkMask);
registerInputEvent(fxDTSBrick, "onMaskTrue", "Self fxDtsBrick\tPlayer Player\tClient GameConnection\tMinigame Minigame");
registerInputEvent(fxDTSBrick, "onMaskFalse", "Self fxDtsBrick\tPlayer Player\tClient GameConnection\tMinigame Minigame");

function fxDTSBrick::onMaskTrue(%this, %obj, %client)
{
$InputTarget_["Self"] = %obj;
$InputTarget_["Player"] = %client.player;
$InputTarget_["Client"] = %client;

if($Server::LAN)
   {
      $InputTarget_["MiniGame"] = getMiniGameFromObject(%client);
   }
   else
   {
      if(getMiniGameFromObject(%obj) == getMiniGameFromObject(%client))
         $InputTarget_["MiniGame"] = getMiniGameFromObject(%obj);
      else
         $InputTarget_["MiniGame"] = 0;
   }
%this.processInputEvent("onMaskTrue", %client);
}

function fxDTSBrick::onMaskFalse(%this, %obj, %client)
{
$InputTarget_["Self"] = %obj;
$InputTarget_["Player"] = %client.player;
$InputTarget_["Client"] = %client;

if($Server::LAN)
   {
      $InputTarget_["MiniGame"] = getMiniGameFromObject(%client);
   }
   else
   {
      if(getMiniGameFromObject(%obj) == getMiniGameFromObject(%client))
         $InputTarget_["MiniGame"] = getMiniGameFromObject(%obj);
      else
         $InputTarget_["MiniGame"] = 0;
   }
%this.processInputEvent("onMaskFalse", %client);
}

function fxDTSBrick::checkMask(%obj,%client)
{
if(%obj.client.Gasmask == 0)
{
%this.onMaskFalse(%client);
}
else
{
%this.onMaskTrue(%client);
}
}
--- End code ---


Port:

Use %client.Gasmask, not %obj.client.Gasmask. %obj is the brick.

Lugnut:

registerOutputEvent(fxDTSBrick, checkMask);

becomes

registerOutputEvent(fxDTSBrick, "checkMask", "", 1);


--- Quote from: Port on June 15, 2012, 12:43:04 PM ---Use %client.Gasmask, not %obj.client.Gasmask. %obj is the brick.

--- End quote ---
not as clean, but his way works.
edit: sorta, ok no, it doesn't

¥ola:


--- Quote from: Lugnut1206 on June 15, 2012, 12:43:48 PM ---registerOutputEvent(fxDTSBrick, checkMask);

becomes

registerOutputEvent(fxDTSBrick, "checkMask", "", 1);
not as clean, but his way works.
edit: sorta, ok no, it doesn't

--- End quote ---

Well.
I still haven't got it to work.

Pages: << < (3/5) > >>

Go to full version