Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* string array for holding names of flavor pickup sounds; [class][gender][sound] */
- str flav_pickup_s[2][2][7] = { { /* [0][0][#} */ { "melflavpickup/Pistol", "melflavpickup/ZekeShotgun", "melflavpickup/Crossbow", "melflavpickup/Ammobox50", "melflavpickup/RocketNailgunLauncher", "NULL", "melflavpickup/RocketLauncher1" },
- /* [0][1][#} */ { "melflavpickuprobo/Pistol", "melflavpickuprobo/ZekeShotgun", "melflavpickuprobo/Crossbow", "melflavpickuprobo/Ammobox50", "melflavpickuprobo/RocketNailgunLauncher", "NULL", "melflavpickuprobo/RocketLauncher1" } },
- { /* [1][0][#} */ { "vexflavpickup/Pistol", "vexflavpickup/ZekeShotgun", "vexflavpickup/Crossbow", "vexflavpickup/Ammobox50", "vexflavpickup/RocketNailgunLauncher", "NULL", "vexflavpickup/RocketLauncher1" },
- /* [1][1][#} */ { "vexflavpickuprobo/Pistol", "vexflavpickuprobo/ZekeShotgun", "vexflavpickuprobo/Crossbow", "vexflavpickuprobo/Ammobox50", "vexflavpickuprobo/RocketNailgunLauncher", "NULL", "vexflavpickuprobo/RocketLauncher1" } } };
- /* if you make the pickup sound names smaller I can organize this like a regular 3d array instead of sqeezing them in like this */
- /* array for holding delays for flavor pickup sounds; [class][gender][sound] */
- int flav_pickup_i[2][2][7] = { { /* [0][0][#} */ { 41, 49, 35, 123, 67, 0, 67 },
- /* [0][1][#} */ { 46, 60, 53, 144, 69, 0, 69 }, },
- { /* [1][0][#} */ { 41, 49, 35, 123, 67, 0, 67 },
- /* [1][1][#} */ { 46, 60, 53, 144, 69, 0, 69 } } };
- /* scrip to play flavor pickup sounds */
- script "TSPPickupSounds" (int which) /* which weapon the sound is being played for */
- {
- int gender, class; /* gender group of player, class of player */
- if(CheckInventory("PlayingPickupSound") > 0){ terminate; } /* if another pickup sound is playing, terminate */
- GiveInventory("PlayingPickupSound", 1); /* give dummy item that tells other scripts that pickup sound is currently playing */
- if(CheckActorClass(0,"Vexler")){ class = 1; } /* check actor class, if vexler set to corresponding array value */
- /* note that we don't check for mel's class, this is because class is initialized at 0 and mel value is 0 */
- /* we would need to check if there were more than these two classes, however */
- /* and if there were enough, we might even put class names into an array and loop through those to find the class */
- if(GetPlayerInfo(PlayerNumber(),PLAYERINFO_GENDER) == 2){ /* if the player has their gender set to OTHER */
- gender = 1; } /* set the gender group to the corresponding array value */
- /* now using the above, play the sound */
- LocalAmbientSound(flav_pickup_s[class][gender][which],127);
- /* and now delay for number of tics corresponding to sound */
- Delay(flav_pickup_i[class][gender][which]);
- /* and now take from player all possible copies of the dummy item that tells scripts that pickup sound is currently playing */
- TakeInventory("PlayingPickupSound", MAX_SIGNED_LONG);
- }
- script "TSPHUDHealthNumberColor" ENTER
- {
- if(GetActorProperty( 0, APROP_Health) >= 101){ GiveInventory("Over100Health",1); }
- else{ TakeInventory("Over100Health",1); }
- Delay(6);
- Restart;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement