Jump to content
Sign in to follow this  
roguetrooper

Define MP score in description.ext

Recommended Posts

There should be a variable to define whether a death in MP causes negative score (addscore -1). Currently the deaths are not counted for a player's scoring.

When a unit has killed 5 other units and got killed 3 times, he has nevertheless 5 instead of 2 points.

At the moment you need a workaround to "fix" this. By triggers (if !(alive unit) then { unit addscore -1 }) or by something else. It would be fine do be able to define that negative scoring in the description.ext (instead of creating 64 triggers for a map with 64 playable units...)

Such as these variables:

Debriefing = 1;

RespawnDialog = 1;

AIKills = 1;

DisabledAI = 0;

there might be

CountDeaths = 1;

Share this post


Link to post
Share on other sites

It doesn't need 64 triggers for 64 playable units, it needs simply a eventhandler assigned in the init.sqf.

Share this post


Link to post
Share on other sites

And how do you create those eventhandlers for the 63 remaining AI units (for as long as they are not played by JIP'ing humans) without 63 triggers or other 63 means that would have to be compatible with presence from start, JIP'ing, locality and all that.

However, the suggestion is legit and would add automated convenience to mapping although it concerns only a detail of subordinate relevance in comparison to other tickets. You wouldn't have to worry about a missing detail in 64+ init lines or wherever. You'd just have to add a single line consisting of a few letters in a single file that covers all occurances and cases. And since (+)scoring is automated without the necessity of further scripting, why shouldn't (-)scoring also be?

Share this post


Link to post
Share on other sites

In your init.sqf

player addEventHandler ["killed", {(_this select 0) addscore -1}]; ?

untested, but I would expect it to work.

-k

Share this post


Link to post
Share on other sites
In your init.sqf

player addEventHandler ["killed", {(_this select 0) addscore -1}]; ?

untested, but I would expect it to work.

-k

That is exactly the same what Myke suggested. Got it already the first time (no offense, thank you for the hint :) )

But as I stated meanwhile, this single line in the file init.sqs attaches that EH only the local player and not to playable/respawning AI units.

This method does NOT work for JIP'ing players playing a unit that has not been present as AI before:

in init-LINE: this addEventHandler ["Killed", {(_this select 0) addscore -1}];

Those methods don't count -score at all or add to many -score at once:

in init-LINE: this addMPEventHandler ["MPKilled", {(_this select 0) addscore -1}];
in init-LINE: this addMPEventHandler ["MPKilled", {if (isServer) then {(_this select 0) addscore -1}}];
in init-LINE: this addMPEventHandler ["MPKilled", {if (local (_this select 0)) then {(_this select 0) addscore -1}}];

The only method I found so far that works reliably under ALL circumstances as desired is to create x different

triggers for x playable units with

repeatable
condition !(alive playerX)
activation playerX addscore -1;

This works for

* playable (i.e. respawing) AI

* hosting player

* client player who already joined in lobby before map runs

* JIP'ing client player

OK, even creating 64 triggers with slightly different content takes only about three minutes with copy and paste (triggers and content).

I just thought a simple description-definition would just be fine, such as "CountDeaths = 1" (or 0)

Share this post


Link to post
Share on other sites

Wait a moment. Are you tracking the score of currently unoccupied AI units as well? What for?

Surely a trigger, or script, that activates when a player connects, no matter the current state of the mission, would always trigger?

eg,

cond: local player

act: player addeve.. blah blah

Share this post


Link to post
Share on other sites

Mkay, this thread is going into the wrong direction.

I just suggested (in this thread you are allowed to suggest things that do not exist already ingame) a description-variable, that allows to adjust an automated minus scoring, a counterpart to the already existing description.ext-variable AIKills = 1;, that simply works for both players and AI. Almost everything can done in a clumsier way. BIS countinously adds new bigger or smaller commands/functions that make mapping and scripting easier. The results those new commands provide (at least partially) mostly could have been achieved by clumsier workarounds before. Nevertheless BIS added them for convenience.

That's all. Suggestion forum. Not scripting forum. BIS may read this. BIS may ignore or schedule it.

Just suggesting a simple-command-counterpart for "AIKills = 0/1". Done.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×