Author Topic: Event Request: IfGasMask  (Read 3510 times)

You are reading plain text English variable names that are mostly self-explanatory and modifying numbers or short strings of characters. Anyone can do that. I don't know any Torque Script and I can do it.

I scripted in recharging health, if that's anything?

._.

I scripted in recharging health, if that's anything?

._.
You know Torque Script.

Playertypes don't require any scripting knowledge.
this only applies for creating playertypes that are just modifications of other playertypes

more interesting things obviously do indeed require having to know more than how to change stuff

Bump~

Haven't gotten a working event :c

Might I suggest a chemical zone brick?
Where the player must be wearing a gasmask to walk through it safely?
Yes?
Maybe?

I would Code this, but I don't have a lot time this week.

The biggest issue is having it effect more than one player at once.

The biggest issue is having it effect more than one player at once.

zone bricks  :cookieMonster:

That's what I'm thinking- except we need someone who can comprehend zonebricks first.

That's what I'm thinking- except we need someone who can comprehend zonebricks first.

I mean, I don't know much Torquescript, but I'll try.


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

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

that would work, it's much easier.

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: [Select]
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);
}
}
}
}

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 ><

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 ><

I do believe I found a solution,
That is the reason we don't rip code kids!