39 lines
895 B
Plaintext
39 lines
895 B
Plaintext
|
scn EBxOnControlUp
|
||
|
|
||
|
int iControl
|
||
|
ref rSource
|
||
|
string_var sPrompt
|
||
|
|
||
|
begin function { iControl }
|
||
|
|
||
|
SetGameMainLoopCallback EBxOnCrosshairTracker 0
|
||
|
|
||
|
SetOnControlUpEventHandler EBxOnControlUp 0 5
|
||
|
EnableControl 5
|
||
|
|
||
|
let rSource := GetCrosshairRef
|
||
|
|
||
|
call EBxFillFromObject rSource
|
||
|
|
||
|
if GetCrosshairWater
|
||
|
let sPrompt := playerRef.AuxiliaryVariableGetString "*sDrinkPrompt"
|
||
|
elseif eval (sPrompt := rSource.GetActivatorPrompt) == ""
|
||
|
let sPrompt := playerRef.AuxiliaryVariableGetString "*sActivatePrompt"
|
||
|
endif
|
||
|
|
||
|
if GetUIFloat "HUDMainMenu\_DUIF3" > 0 ; DarnUI
|
||
|
SetUIStringAlt "HUDMainMenu/InfoWrap/Info/justify_center_hotrect/string" $sPrompt
|
||
|
else
|
||
|
SetUIStringAlt "HUDMainMenu/Info/justify_center_hotrect/string" $sPrompt
|
||
|
endif
|
||
|
|
||
|
sv_destruct sPrompt
|
||
|
|
||
|
if IsFormValid rSource
|
||
|
if rSource.HasScriptBlock 2
|
||
|
rSource.Activate playerRef 1
|
||
|
endif
|
||
|
endif
|
||
|
|
||
|
end
|