Blockland Forums > Suggestions & Requests
Event Request: IfGasMask
Lugnut:
post it.
¥ola:
--- Quote from: Lugnut1206 on June 15, 2012, 12:27:21 PM ---post it.
--- End quote ---
--- 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)
{
if(%obj.getType() & $TypeMasks::PlayerObjectType && %obj.getState() !$= "Dead")
{
%db = %obj.getDatablock();
if(!%obj.isPlayer)
{
%this.onMaskFalse(%client);
}
else
{
%this.onMaskTrue(%client);
}
}
}
}
--- End code ---
Lugnut:
see: your coding help thread
also see ports post above mine
Kniaz:
Bump~
Still no event :c
¥ola:
--- Quote from: Kniaz on June 19, 2012, 10:03:16 AM ---Bump~
Still no event :c
--- End quote ---
I haven't forgotten.
I'm trying to learn more about Torquescripts syntax and such.