Add custom achievements

Co-Authored-By: Vlad Loktionov <13555921+VladWinner@users.noreply.github.com>
This commit is contained in:
fed
2023-04-14 18:43:31 +02:00
parent 73fdf79321
commit e43ae321c0
11 changed files with 118 additions and 17 deletions

View File

@ -0,0 +1,21 @@
main()
{
replacefunc(maps\char_museum::ramirez_jukebox, ::ramirez_jukebox);
}
ramirez_jukebox()
{
common_scripts\utility::flag_wait("museum_ready");
wait 4;
jukebox = getent("ramirez_jukebox", "targetname");
jukebox makeusable();
for (;;)
{
jukebox waittill("trigger");
index = randomint(37);
jukebox maps\_utility::play_sound_on_entity("museum_ramirez_ee_" + index);
maps\_utility::giveachievement_wrapper("RAMIREZ");
}
}

View File

@ -0,0 +1,25 @@
main()
{
replacefunc(maps\gulag_code::surprise, ::surprise);
}
surprise()
{
level endon("cancel_surprise");
tv = getent("surprise_tv", "script_noteworthy");
tv thread maps\gulag_code::surprise_tv();
common_scripts\utility::flag_wait("player_nears_cell_door3");
maps\gulag_code::surprise_damage_trigger();
maps\gulag_code::surprise_flag_touching();
tv thread maps\_utility::play_sound_on_entity("h2_zombie_easter_egg");
tv.screen = spawn("script_model", tv.origin);
tv.screen.angles = tv.angles;
tv.screen setmodel("com_tv1_pho_zombie");
wait 3.3;
tv.screen delete();
maps\_utility::giveachievement_wrapper("BRAINS");
}

View File

@ -88,5 +88,7 @@ material,trophy_47
material,trophy_48
material,trophy_49
material,trophy_50
material,trophy_51
material,trophy_52
localize,english
sound,ui_achievement_unlocked

1 material h2_ui_featured_pip_focused
88 material trophy_50
89 localize material english trophy_51
90 sound material ui_achievement_unlocked trophy_52
91 localize english
92 sound ui_achievement_unlocked
93
94

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,26 @@
{
"name": "trophy_51",
"techniqueSet->name": "2d",
"gameFlags": 0,
"sortKey": 60,
"renderFlags": 0,
"textureAtlasRowCount": 1,
"textureAtlasColumnCount": 1,
"textureAtlasFrameBlend": 0,
"textureAtlasAsArray": 0,
"surfaceTypeBits": 0,
"cameraRegion": 12,
"materialType": 0,
"assetFlags": 0,
"constantTable": null,
"textureTable": [
{
"image": "trophy_51",
"semantic": 0,
"samplerState": 226,
"lastCharacter": 112,
"firstCharacter": 99,
"typeHash": 2695565377
}
]
}

View File

@ -0,0 +1,26 @@
{
"name": "trophy_52",
"techniqueSet->name": "2d",
"gameFlags": 0,
"sortKey": 60,
"renderFlags": 0,
"textureAtlasRowCount": 1,
"textureAtlasColumnCount": 1,
"textureAtlasFrameBlend": 0,
"textureAtlasAsArray": 0,
"surfaceTypeBits": 0,
"cameraRegion": 12,
"materialType": 0,
"assetFlags": 0,
"constantTable": null,
"textureTable": [
{
"image": "trophy_52",
"semantic": 0,
"samplerState": 226,
"lastCharacter": 112,
"firstCharacter": 99,
"typeHash": 2695565377
}
]
}

View File

@ -227,5 +227,9 @@
"ACHIEVEMENT_NAME_49": "Clown in Training",
"ACHIEVEMENT_DETAIL_49": "The U.S. Army Rangers aint no place for clowns.",
"ACHIEVEMENT_NAME_50": "Headbanger",
"ACHIEVEMENT_DETAIL_50": "Kill an enemy with the impact damage from a frag grenade to the head."
"ACHIEVEMENT_DETAIL_50": "Kill an enemy with the impact damage from a frag grenade to the head.",
"ACHIEVEMENT_NAME_51": "BRAAAINS...",
"ACHIEVEMENT_DETAIL_51": "Check out Prisoner 227's cell in 'The Gulag'",
"ACHIEVEMENT_NAME_52": "Ramirez!",
"ACHIEVEMENT_DETAIL_52": "Turn on the radio in 'Museum'"
}