Blockland Forums > Suggestions & Requests
Event Request: IfGasMask
¥ola:
My problem so far is that in your 'example' your using two inputs.
OnActivate -> IfGasMaskOn -> Self | this is impossible
What about something like
OnEnterZone -> Player -> CheckGasMask
OnGasMaskTrue ->Player -> blablabla
Cookiez664:
--- Quote from: ¥ola on June 15, 2012, 10:36:13 AM ---My problem so far is that in your 'example' your using two inputs.
OnActivate -> IfGasMaskOn -> Self | this is impossible
What about something like
OnEnterZone -> Player -> CheckGasMask
OnGasMaskTrue ->Player -> blablabla
--- End quote ---
that would work, it's much easier.
¥ola:
Anyone see a major problem with this?
I'm pretty sure I set it up correctly, but the events are not showing the the menu
--- Code: ---registerOutputEvent(fxDtsBrick, "checkMask", "", 1);
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 = %this;
$inputTarget_client = %client;
$inputTarget_player = %client.player;
$inputTarget_miniGame = getMiniGameFromObject(%this);
%this.processInputEvent("VariableTrue", %client);
}
function fxDTSBrick::onMaskFalse(%this, %obj, %client)
{
$inputTarget_self = %this;
$inputTarget_client = %client;
$inputTarget_player = %client.player;
$inputTarget_miniGame = getMiniGameFromObject(%this);
%this.processInputEvent("VariableFalse", %client);
}
function fxDTSBrick::checkMask(%this, %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 ---
Kniaz:
We tried something like my example, before moving to VCE- which showed the problem of it only effecting a single player at once.
Also, that seems pretty good...
Thank you so much!
Hopefully the showing up thingo gets fixed ><
¥ola:
--- Quote from: Kniaz on June 15, 2012, 11:20:19 AM ---We tried something like my example, before moving to VCE- which showed the problem of it only effecting a single player at once.
Also, that seems pretty good...
Thank you so much!
Hopefully the showing up thingo gets fixed ><
--- End quote ---
I do believe I found a solution,
That is the reason we don't rip code kids!