Results 1 to 7 of 7

Thread: Define MP score in description.ext

  1. #1

    Define MP score in description.ext

    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;

  2. #2
    Moderator [FRL]Myke's Avatar
    Join Date
    May 27 2007
    Location
    Yay, Rank 34 of 47119 and catching up.
    Posts
    5,699
    It doesn't need 64 triggers for 64 playable units, it needs simply a eventhandler assigned in the init.sqf.

  3. #3
    Gunnery Sergeant RogueTrooper's Avatar
    Join Date
    Dec 19 2007
    Location
    Respawn Screen
    Posts
    495
    Author of the Thread
    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?

  4. #4
    In your init.sqf
    player addEventHandler ["killed", {(_this select 0) addscore -1}]; ?

    untested, but I would expect it to work.

    -k
    ARMA 2 Mission packs:LITE Coop mission package + LIMA coop mission package (ACE + ACRE) + More ACE + ACRE missions. + Aliabad coop Mission Package+ Fireforce Takistan NEW
    ARMA 3 Mission packs:Fourplay Coop Mission Pack NEW
    Kill things, break stuff. Repeat as necessary.

  5. #5
    Gunnery Sergeant RogueTrooper's Avatar
    Join Date
    Dec 19 2007
    Location
    Respawn Screen
    Posts
    495
    Author of the Thread
    Quote Originally Posted by NkEnNy View Post
    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:

    Code:
    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:
    Code:
    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
    Code:
    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)

  6. #6
    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

  7. #7
    Gunnery Sergeant RogueTrooper's Avatar
    Join Date
    Dec 19 2007
    Location
    Respawn Screen
    Posts
    495
    Author of the Thread
    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.

Similar Threads

  1. Where is description.ext?
    By deathsai in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 6
    Last Post: Mar 15 2004, 15:42
  2. Need some description.ext help
    By NEO [PZ] in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 5
    Last Post: Apr 24 2002, 13:05
  3. Description.ext
    By Goodspeed in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 1
    Last Post: Mar 24 2002, 08:19
  4. Description.ext help
    By WaTz in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 2
    Last Post: Mar 18 2002, 06:15
  5. Description.ext
    By boblin in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 1
    Last Post: Feb 27 2002, 11:23

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •