gruppe-adler / grad-passport

Adds ID cards / passports to the game that can be checked/shown with ACE Interaction.
2 stars 0 forks source link

raise CBA event on showing passport #1

Closed nomisum closed 5 years ago

nomisum commented 5 years ago

allows hooking in other modules

McDiod commented 5 years ago

fn_showPassport or fn_receiveShowPassport might be better suited. Will investigate tomorrow.

McDiod commented 5 years ago

Okay so there are three different modes a passport might be viewed.

  1. unit showing their passport to other unit 1.1 other unit looks at the passport 1.2 other unit is busy and can't look at the passport
  2. unit checking the passport of a dead, surrendered or captive unit
  3. unit checking own passport

Which of these do you need the event for?

nomisum commented 5 years ago

1.1

Use case: AI checks passport on borderCrossing, needs to decide what to do. https://github.com/gruppe-adler/a_st_borderCrossing.VR/blob/master/grad-borderCrossing/functions/fn_init.sqf#L3

McDiod commented 5 years ago

I guess it's the right function then, because it's the only one that actually knows whether the target is looking at the passport or not.

However it's not only executed whenever a unit shows their passport, but also when the recipient is busy or stops looking at the passport (function updates dialog below). So I'd call the event showStateChanged or something. User can then check the _state param to determine what is happening (0 == target is looking at passport).

20181124153748_1

McDiod commented 5 years ago

renamed it