Support #11270

Poor man revive feature request

Added by columdrum about 5 years ago. Updated over 4 years ago.

Status:Closed Start date:06/15/2010
Priority:Normal Due date:
Assignee:Sickboy % Done:

100%

Category:-
Target version:1.7
Component:sys_wounds Affected Version:
Close Reason:

Description

Well first of all, i know that this part of A.C.E.2 is not prioritary because it's not related wiht realism at all, but would be aprecciated :P. I have done a script to control the number of times that you get the countdown(and when you get out of lives you enter spectator), its already done and working but i want to optimice it a bit and that's why i'm making this ticket.

Well returning to the topic, my request is to add a event or code(like the ace_wounds_rcode1) to be executed when someone gets "killed" and the countdown starts*. I think that it should be as easy as add 3 lines to the code and it would help a lot :). This will make more easy scripts for counting lives, because by now the only way that i encountered to monitor when someone gets killed and had entered in the countdown, it's consulting the "ace_w_revive" unit variable with a active wait:

While {((player getVariable "ace_w_revive") <  0)&& (alive player)} do {sleep 5;};

OR
 waitUntil {(player getVariable "ace_w_revive") >  0};

It would be more readable and more optimized if there is a event or code that gets executed when someone "dies". And if possible, it would be perfect that this event or code get's as parameter the unit of the killer when available, this should help to generate teamkill messages when necesary ^. I don't know if this last part is easy or not but would be really usefull ^.

Associated revisions

Revision f9d09766
Added by Sickboy over 4 years ago

~ ADDED: "ace_sys_wounds_rev" event when wounds PMR is enabled. Triggers when killed and countdown starts. closes #11270

~ CHANGED: former ace_wounds_rcode1 can now be multiplexed by using "ace_sys_wounds_rev2" event.

History

Updated by rocko about 5 years ago

  • Target version set to Planned (Needs Contributors)

Updated by Evil_Echo about 5 years ago

This might be considered to be a request for a new class of custom events, per-mod vs from BIS. Could CBA support such a thing?

Updated by columdrum about 5 years ago

Well, by now, with a "ace_wounds_rcode2" that get executed when someone get's killed and starts the poorman countdown i will be totally happy :P.

Updated by rocko almost 5 years ago

  • Assignee set to Xeno

Updated by Xeno almost 5 years ago

  • Assignee deleted (Xeno)

Updated by rocko almost 5 years ago

  • Tracker changed from Feature to Support

Updated by rocko almost 5 years ago

  • Target version deleted (Planned (Needs Contributors))

Updated by Sickboy over 4 years ago

  • Status changed from New to Feedback
  • Target version set to Planned (Needs Contributors)

What about _unit addEventHandler ["Killed", { do stuff}] ?

Updated by columdrum over 4 years ago

When you get "killed" and the revive feature it's enabled(ace_wounds_prevtime = XXXX) you are still alive so "killed" eventhandler isn't executed ^^. So thats why i wanted a event or some code that gets executed in that moment to avoid to be constanly pooling the player variable > 0};) to see if he got "killed".

It was just for a script that i have done to limit the number of times that you can die until you die definitively and enter spectator mode, and some other features similar to norrin revive but with ACE wounding :P.

Updated by Sickboy over 4 years ago

  • Status changed from Feedback to Resolved
  • % Done changed from 0 to 100

Updated by Sickboy over 4 years ago

  • Assignee set to Sickboy
  • Target version changed from Planned (Needs Contributors) to 1.7
  • Component set to sys_wounds
["ace_sys_wounds_rev", {
    // This code will be executed when PMR enabled, and killed (but can still be revived), countdown starting
    // _this select 0  contains the unit
}] call CBA_fnc_addEventhandler;
["ace_sys_wounds_rev2", {
    // This code will be executed when PMR enabled, and killed (countdown ended)
    // _this select 0  contains the unit
}] call CBA_fnc_addEventhandler;

Both events are fully multiplexible, so you can keep adding Eventhandlers as you wish, and they will not override eachother, but all be called.
Both events, like the old rcode1 are only triggered where the unit is local.

rev2 is a replacement for the old rcode1, but of course for backwards compatibility, rcode1 will still be executed as well.

Updated by Sickboy over 4 years ago

  • Status changed from Resolved to Closed

Should be available in the about to be released 1.6 Update 3.

Updated by columdrum over 4 years ago

Awesome, thanks :)

Also available in: Atom PDF