-
-
Save DaZombieKiller/0ad116a649b85013cd330bf8e2a4adcb to your computer and use it in GitHub Desktop.
This file contains hidden or 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 GlobalStates : Weapon | |
| { | |
| static GlobalStates Instance() | |
| { | |
| let p = ThinkerIterator.Create("GlobalStates").Next(); | |
| if (p == null) p = new("GlobalStates"); | |
| return GlobalStates(p); | |
| } | |
| // nullify anything an instance of this could do | |
| override void BeginPlay() {} | |
| override void PostBeginPlay() {} | |
| override void Tick() {} | |
| states | |
| { | |
| LolZScriptBendsToMyWill: | |
| POSS A -1 { | |
| A_Log("this is amazing"); | |
| } | |
| stop; | |
| } | |
| } | |
| class TestItem : CustomInventory | |
| { | |
| states | |
| { | |
| Pickup: | |
| TNT1 A 0 | |
| { | |
| let globalStates = GlobalStates.Instance(); | |
| let state = globalStates.ResolveState("LolZScriptBendsToMyWill"); | |
| // weapons can use these states | |
| player.SetPSprite(PSP_WEAPON + 1, state); | |
| // and so can regular actors | |
| player.mo.SetState(state); | |
| } | |
| stop; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment