Add custom achievements
Co-Authored-By: Vlad Loktionov <13555921+VladWinner@users.noreply.github.com>
This commit is contained in:
21
data/cdata/scripts/ending/achievements.gsc
Normal file
21
data/cdata/scripts/ending/achievements.gsc
Normal 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");
|
||||
}
|
||||
}
|
25
data/cdata/scripts/gulag/achievements.gsc
Normal file
25
data/cdata/scripts/gulag/achievements.gsc
Normal 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");
|
||||
}
|
@ -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
|
||||
|
|
BIN
data/zonetool/h2_mod_ui/images/trophy_51.dds
Normal file
BIN
data/zonetool/h2_mod_ui/images/trophy_51.dds
Normal file
Binary file not shown.
BIN
data/zonetool/h2_mod_ui/images/trophy_52.dds
Normal file
BIN
data/zonetool/h2_mod_ui/images/trophy_52.dds
Normal file
Binary file not shown.
26
data/zonetool/h2_mod_ui/materials/trophy_51.json
Normal file
26
data/zonetool/h2_mod_ui/materials/trophy_51.json
Normal 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
|
||||
}
|
||||
]
|
||||
}
|
26
data/zonetool/h2_mod_ui/materials/trophy_52.json
Normal file
26
data/zonetool/h2_mod_ui/materials/trophy_52.json
Normal 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
|
||||
}
|
||||
]
|
||||
}
|
@ -227,5 +227,9 @@
|
||||
"ACHIEVEMENT_NAME_49": "Clown in Training",
|
||||
"ACHIEVEMENT_DETAIL_49": "The U.S. Army Rangers ain’t 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'"
|
||||
}
|
||||
|
Reference in New Issue
Block a user