-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
// $sw4_health_display stores health bar in original game. Safe to use, except if "Ghetto Drive By" mission is in progress | ||
const screenCounter = $sw4_health_display // global variable safe to use, unless "Ghetto Drive By" mission is in progress | ||
|
||
set_onscreen_counter_flash_when_first_displayed {var_counter} $sw4_health_display {state} true | ||
set_onscreen_counter_flash_when_first_displayed {var_counter} screenCounter {state} true | ||
|
||
display_onscreen_counter_with_string {var_counter} $sw4_health_display {display} CounterDisplay.Bar {text} 'DEAD' // WASTED | ||
$sw4_health_display = 10 // start with 10% | ||
display_onscreen_counter_with_string {var_counter} screenCounter {display} CounterDisplay.Bar {text} 'DEAD' // WASTED | ||
screenCounter = 10 // start with 10% | ||
|
||
// animate the bar | ||
while $sw4_health_display < 100 | ||
$sw4_health_display += 1 | ||
while screenCounter < 100 | ||
screenCounter += 1 | ||
wait 100 | ||
end | ||
|
||
// display for one more second | ||
wait 1000 | ||
|
||
// cleanup | ||
clear_onscreen_counter {var_counter} $sw4_health_display | ||
clear_onscreen_counter {var_counter} screenCounter |