Created
October 20, 2016 06:51
-
-
Save xDShot/2d15c25cb17862ead07fab3b1f7c73e5 to your computer and use it in GitHub Desktop.
Unlocks achievements in Deus Ex Revision
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
class PizzaDelivery extends Trigger; | |
function Trigger(Actor Other, Pawn Instigator) | |
{ | |
if (GiveAchievement()) | |
{ | |
Super.Trigger(Other, Instigator); | |
if (bTriggerOnceOnly) | |
Destroy(); | |
} | |
} | |
function Touch(Actor Other) | |
{ | |
if (!IsRelevant(Other)) | |
return; | |
if (GiveAchievement()) | |
if (bTriggerOnceOnly) | |
Destroy(); | |
} | |
function bool GiveAchievement() | |
{ | |
local DeusExPlayer player; | |
player = DeusExPlayer(GetPlayerPawn()); | |
if (player != none) | |
{ | |
log("Pizza delivered", 'Achievements'); | |
player.SetAchievement("ACH_Combat_FriendlyFire"); | |
player.SetAchievement("ACH_Level01_CommanderAlive"); | |
player.SetAchievement("ACH_Combat_Disarmed"); | |
//... | |
player.SetAchievement("ACH_AugFullSpeed"); | |
player.SetAchievement("ACH_Level11_ANewAge"); | |
return True; | |
} | |
else | |
{ | |
log("Error - We couldn't get a player pawn! Aborting.", 'Achievements'); | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment