Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Actor HellfireRevenant : Revenant Replaces BabelRevenant
- {
- Obituary "%o couldn't dodge the Hellfire Revenant's fireball."
- Hitobituary "%o was spooked by a Hellfire Revenant!"
- Species "AAAAA" //Internal name for Revenant species, required for chain/sync system
- Health 400
- Radius 20
- Height 56
- Mass 500
- Speed 12
- Painchance 100
- MONSTER
- +FloorClip
- +MissileMore
- +MISSILEEVENMORE
- +FastMelee
- DamageFactor "SoulBurn", 0 //Lost soul afterimages use this damage type, so ensure all monsters are immune
- States
- {
- Spawn:
- /*
- This is the first important part of making a monster work with Babel.
- Firstly, we have ACS_NamedExecuteWithResult ("fearMonitor", 450, 550, 2, 22);
- This initiates the fear monitoring script so that the monster can register fear from various stimuli
- Arguments are:
- threshold (How much fear to enter a fear state),
- max fear (How high the meter can go),
- fallOff (rough amount of fear to lose per tic. When afraid fear is lost at 4x this rate),
- ignore chance (a percentage to have the meter halve itself and not enter fear once threshold is passed)
- Secondly, we have ACS_NamedExecuteWithResult ("chainAttack", 25);
- This initiates a chain signal monitor, which will cause the monster to skip to its "Missile" state
- when a chain signal is received from another event.
- Argument is:
- chance (percentage value to jump to missile, higher means more chaining)
- If we wanted to make the monster use sync-fire instead (typically used to cause multiple monsters to
- attack at the same time) we could use ACS_NamedExecuteWithResult ("syncAttack", 25). This would cause
- the monster to jump to a "MissileNoSignal" state when a synctoken is received. Argument is the same,
- chance to succeed.
- */
- TNT1 A 0 Nodelay
- {
- ACS_NamedExecuteWithResult ("fearMonitor", 450, 550, 2, 22);
- ACS_NamedExecuteWithResult ("chainAttack", 25);
- }
- Look:
- //This ensures the monitor scripts never re-run.
- GSKL AB 10 A_Look
- Loop
- See:
- /*
- These two lines remove the "Hold State" token (which prevents chaining/syncing when held) and
- jump to "Fear" if the monster is holding an "Afraid" token, which is similar to HoldState but for
- the fear monitor.
- */
- TNT1 A 0 A_TakeInventory("HoldState", 0)
- TNT1 A 0 A_JumpIfInventory("Afraid", 1, "Fear")
- GSKL AABBCCDDEEFF 2 A_Chase
- Loop
- /*
- The Fear state, which is required for fear responses
- */
- Fear:
- GSKL AABBCCDDEEFF 2
- {
- //Firstly, scare the monster
- A_ChangeFlag("FRIGHTENED", TRUE);
- //Add a token to the monster so the fearMonitor knows the monster is afraid
- A_GiveInventory ("Afraid", 1);
- //Typically monsters gain 25% speed boosts (rounded up) while afraid
- A_SetSpeed(13);
- //And lost the ability to shoot
- A_Chase("Melee", "");
- }
- //This will cause the monster to flee until its fear meter is empty
- TNT1 A 0 A_JumpIfInventory("FearToken", 1, "Fear")
- //Once the fear meter is empty, change everything back and go to See.
- TNT1 A 0
- {
- A_TakeInventory("FearToken", 0);
- A_TakeInventory("Afraid", 0);
- A_ChangeFlag("FRIGHTENED", FALSE);
- A_SetSpeed(10);
- }
- Goto See
- Melee:
- GSKL G 0
- GSKL G 6
- {
- //At the beginning of any attack, give a HoldState token so the attack won't be interrupted
- A_GiveInventory("HoldState", 1);
- //This token will be removed by the beginning lines of "See"
- A_FaceTarget;
- A_SkelWhoosh;
- }
- GSKL H 6 A_FaceTarget
- GSKL I 6 A_CustomMeleeAttack(random(1,10)*12,"skeleton/melee","none")
- Goto See
- Missile:
- //Generally missil attacks should check if their target is in LOS before continuing.
- TNT1 A 0 A_JumpIfTargetInLOS(2)
- TNT1 A 0 A_Jump(256, "See")
- //If we can see our target, give a HoldState token
- TNT1 A 0 A_GiveInventory("HoldState", 1)
- //-------------------------------
- GSKL J 0 Bright A_Jump(128,"Missile2")
- GSKL J 0 Bright A_FaceTarget
- GSKL J 10 Bright A_FaceTarget
- GSKL K 2 A_CustomMissile("HFRevShot",64,14)
- GSKL K 8 A_CustomMissile("HFRevShot",64,-14)
- GSKL K 10 A_FaceTarget
- //Since this monster uses chaining, before we end our attack we should give out some chain tokens
- TNT1 A 0
- {
- A_RadiusGive ("ChainToken", 512, RGF_MONSTERS, 1, none, "AAAAA");
- A_TakeInventory("ChainToken", 0);
- }
- Goto See
- Missile2:
- GSKL J 0 Bright A_FaceTarget
- GSKL J 0 Bright A_PlaySound("skeleton/sight", 0)
- GSKL J 10 Bright A_FaceTarget
- GSKL K 10 A_CustomMissile("HFRevShot",64,-14)
- GSKL J 6 A_FaceTarget
- GSKL K 10 A_CustomMissile("HFRevShot",64,14)
- GSKL J 6 A_FaceTarget
- GSKL K 10 A_CustomMissile("HFRevShot",64,-14)
- GSKL J 6 A_FaceTarget
- GSKL K 10 A_CustomMissile("HFRevShot",64,14)
- GSKL K 10 A_FaceTarget
- //Since this monster uses chaining, before we end our attack we should give out some chain tokens
- TNT1 A 0
- {
- A_RadiusGive ("ChainToken", 512, RGF_MONSTERS, 1, none, "AAAAA");
- A_TakeInventory("ChainToken", 0);
- }
- Goto See
- Pain:
- GSKL L 5
- GSKL L 5 A_Pain
- //Being hurt usually causes fear, so we can manually give our monster some fear tokens here.
- TNT1 A 0 A_GiveInventory("FearToken", random(0,45))
- //This is not entirely necessary due to See's copy of this line, but it doesn't hurt to have just in case
- TNT1 A 0 A_JumpIfInventory("Afraid", 0, "Fear")
- Goto See
- /*
- Above the Death State should be deaths for each player damage type
- Inside each of them should be any special reactions you want to have for these types
- Death.Player should always contain some fear-giving action
- */
- Death.PlayerSSG:
- //This typically contains a distance check to jump to XDeath
- Death.PlayerRocket:
- Death.PlayerBFG:
- Death.Player:
- TNT1 A 0 A_RadiusGive ("FearToken", 1024, RGF_MONSTERS, random(99,275))
- TNT1 A 0 A_Jump(160, "Death")
- //This skippable frame passes out Sync and Chain tokens to nearby enemies to aggro them if this monster dies
- TNT1 A 0
- {
- A_RadiusGive ("SyncToken", 1024, RGF_MONSTERS, 1, none, "Zombie");
- A_RadiusGive ("SyncToken", 1024, RGF_MONSTERS, 1, none, "Demon");
- A_RadiusGive ("SyncToken", 1024, RGF_MONSTERS, 1, none, "Imp");
- A_RadiusGive ("SyncToken", 1024, RGF_MONSTERS, 1, none, "Balloon");
- A_RadiusGive ("ChainToken", 1024, RGF_MONSTERS, 1, none, "AAAAA");
- }
- Death:
- GSKL LM 7
- GSKL N 7 A_Scream
- GSKL O 7 A_NoBlocking
- GSKL P 7
- GSKL Q -1
- Stop
- //If your monster has XDeath, ensure to add XDeath states for each Damage type as well.
- //XDeath usually causes extra fear
- Raise:
- //When raised, we must ensure we reset our speed and re-run the monitor scripts (as they terminate on death)
- TNT1 A 0
- {
- A_SetSpeed(10);
- ACS_NamedExecuteWithResult ("fearMonitor", 450, 550, 2, 22); //threshold, maxfear, fallOff (*35 = fear drop per second), ignore chance
- ACS_NamedExecuteWithResult ("chainAttack", 25); //succeed chance
- }
- GSKL QPONML 5
- Goto See
- }
- }
- /*
- And that's it! Not really that much work and it ensures that the monster will have all the advanced behaviors you want!
- */
- ACTOR HFRevShot : FatShot
- {
- Speed 15
- Damage 8
- +StrifeDamage
- +SeekerMissile
- Scale 0.5
- States
- {
- Spawn:
- TNT1 A 0 NoDelay ACS_NamedExecuteAlways("spawnParticles", 0, 0) //This is just a particle effect for imp-style particles
- MANF AB 4 Bright A_SeekerMissile (10,5)
- Loop
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement