Creating a decorate actor with strife like behavior.

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
soft_haxorz
Posts: 50
Joined: Sun Apr 10, 2005 10:42 am
Location: The backend of the universe.

Creating a decorate actor with strife like behavior.

Post by soft_haxorz »

I have found a way to create a monster in decorate that behaves similarly to Strife's acolytes.

Code: Select all

ACTOR Acolyte 3105
{
      DropItem ClipBox 50
      DropItem Clip
      Health 100
      PainChance 200
      Speed 8
      Radius 20
      Height 56
      MONSTER
      +FLOORCLIP
      +DROPOFF
      +STANDSTILL
      SeeSound "null"
      PainSound "player/male/pain100_1"
      ActiveSound "null"
      DeathSound "player/male/death1"
      AttackSound "imp/melee"
      Obituary "%o assaulted a acolyte."
      HitObituary "%o violated a acolyte's personal space."
      MeleeDamage 1
      States
      {
    Spawn:
      AGRD A 1 A_Look
      Loop
    See:
      AGRD AABBCCDD 5 A_Chase
      Loop
    Melee:
      AGRD E 10 A_FaceTarget
      AGRD F 5 BRIGHT A_MeleeAttack
      Goto See
    Pain:
      AGRD A 4
      AGRD A 4 A_Pain
      AGRD O 0 A_FaceTarget
      AGRD O 30 A_SetReflective
      AGRD A 3 A_UnSetReflective
      AGRD E 10 A_FaceTarget
      AGRD F 5 BRIGHT A_PosAttack
      Goto See
    Death:
      AGRD G 5
      AGRD H 5 A_Scream
      AGRD I 5 A_Fall
      AGRD J 5 A_NoBlocking
      AGRD KLM 5
      AGRD N -1
      Stop
    Burn:
		BURN A 5 BRIGHT
		BURN B 5 BRIGHT A_PlaySound (weaselburndeath)
		BURN C 5 BRIGHT
		BURN D 5 BRIGHT
		BURN E 5 BRIGHT
		BURN F 5 BRIGHT
		BURN G 5 BRIGHT
		BURN H 5 BRIGHT
		BURN I 5 BRIGHT
		BURN J 5 BRIGHT
		BURN K 5 BRIGHT
		BURN L 5 BRIGHT
		BURN M 5 BRIGHT
		BURN N 5 BRIGHT
		BURN O 5 BRIGHT A_NoBlocking
		BURN P 5 BRIGHT
		BURN Q 5 BRIGHT
		BURN R 5 BRIGHT
		BURN S 5 BRIGHT
		BURN T 5 BRIGHT
		BURN U 5 BRIGHT
		BURN V -1 BRIGHT
		Stop
      }
}
Maybe some of you have done this before, maybe not. May prove useful until zdoom .64 comes out.
skadoomer
Posts: 1026
Joined: Fri Sep 05, 2003 12:49 pm

Re: Creating a decorate actor with strife like behavior.

Post by skadoomer »

soft_haxorz wrote: May prove useful until zdoom .64 comes out.
My friend, you are severly behind on the times. Zdoom is up to .96 as of current.
soft_haxorz
Posts: 50
Joined: Sun Apr 10, 2005 10:42 am
Location: The backend of the universe.

Post by soft_haxorz »

Correct me if I'm wrong, but I thought zdoom .64 was the one that would have almost complete Strife support and a better decorate lump, including decorate weapons. Also, zdoom .96 is the version I use so I don't think I'm behind the times.
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

2.0.96 HAS full Strife support.

And the acolyte is never invulnerable. Never
soft_haxorz
Posts: 50
Joined: Sun Apr 10, 2005 10:42 am
Location: The backend of the universe.

Post by soft_haxorz »

I know it never is invulnerable and A_SetReflective doesn't make it invulnerable (it would only be invulnerable to any projectile). Also note I said similar to the Acolyte, not an exact replica.
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

This is the original:

Code: Select all

class AAcolyte : public AStrifeHumanoid
{
	DECLARE_ACTOR (AAcolyte, AStrifeHumanoid)
};

FState AAcolyte::States[] =
{
#define S_ACOLYTE_STND 0
	S_NORMAL (AGRD, 'A',	5, A_Look2,				&States[S_ACOLYTE_STND]),
	S_NORMAL (AGRD, 'B',	8, A_ClearShadow,		&States[S_ACOLYTE_STND]),
	S_NORMAL (AGRD, 'D',	8, NULL,				&States[S_ACOLYTE_STND]),

#define S_ACOLYTE_WANDER (S_ACOLYTE_STND+3)
	S_NORMAL (AGRD, 'A',	5, A_Wander,			&States[S_ACOLYTE_WANDER+1]),
	S_NORMAL (AGRD, 'B',	5, A_Wander,			&States[S_ACOLYTE_WANDER+2]),
	S_NORMAL (AGRD, 'C',	5, A_Wander,			&States[S_ACOLYTE_WANDER+3]),
	S_NORMAL (AGRD, 'D',	5, A_Wander,			&States[S_ACOLYTE_WANDER+4]),
	S_NORMAL (AGRD, 'A',	5, A_Wander,			&States[S_ACOLYTE_WANDER+5]),
	S_NORMAL (AGRD, 'B',	5, A_Wander,			&States[S_ACOLYTE_WANDER+6]),
	S_NORMAL (AGRD, 'C',	5, A_Wander,			&States[S_ACOLYTE_WANDER+7]),
	S_NORMAL (AGRD, 'D',	5, A_Wander,			&States[S_ACOLYTE_STND]),

#define S_ACOLYTE_ALTCHASE (S_ACOLYTE_WANDER+8)
	S_NORMAL (AGRD, 'A',	6, A_BeShadowyFoe,		&States[S_ACOLYTE_ALTCHASE+2]),

#define S_ACOLYTE_CHASE (S_ACOLYTE_ALTCHASE+1)
	S_NORMAL (AGRD, 'A',	6, A_AcolyteBits,		&States[S_ACOLYTE_CHASE+1]),
	S_NORMAL (AGRD, 'B',	6, A_Chase,				&States[S_ACOLYTE_CHASE+2]),
	S_NORMAL (AGRD, 'C',	6, A_Chase,				&States[S_ACOLYTE_CHASE+3]),
	S_NORMAL (AGRD, 'D',	6, A_Chase,				&States[S_ACOLYTE_CHASE]),

#define S_ACOLYTE_ATK (S_ACOLYTE_CHASE+4)
	S_NORMAL (AGRD, 'E',	8, A_FaceTarget,		&States[S_ACOLYTE_ATK+1]),
	S_NORMAL (AGRD, 'F',	4, A_ShootGun,			&States[S_ACOLYTE_ATK+2]),
	S_NORMAL (AGRD, 'E',	4, A_ShootGun,			&States[S_ACOLYTE_ATK+3]),
	S_NORMAL (AGRD, 'F',	6, A_ShootGun,			&States[S_ACOLYTE_CHASE]),

#define S_ACOLYTE_ALTPAIN (S_ACOLYTE_ATK+4)
	S_NORMAL (AGRD, 'O',	0, A_SetShadow,			&States[S_ACOLYTE_ALTPAIN+1]),
	S_NORMAL (AGRD, 'O',	8, A_Pain,				&States[S_ACOLYTE_ALTCHASE]),

#define S_ACOLYTE_PAIN (S_ACOLYTE_ALTPAIN+2)
	S_NORMAL (AGRD, 'O',	8, A_Pain,				&States[S_ACOLYTE_CHASE]),

#define S_ACOLYTE_DIE (S_ACOLYTE_PAIN+1)
	S_NORMAL (AGRD, 'G',	4, NULL,				&States[S_ACOLYTE_DIE+1]),
	S_NORMAL (AGRD, 'H',	4, A_Scream,			&States[S_ACOLYTE_DIE+2]),
	S_NORMAL (AGRD, 'I',	4, NULL,				&States[S_ACOLYTE_DIE+3]),
	S_NORMAL (AGRD, 'J',	3, NULL,				&States[S_ACOLYTE_DIE+4]),
	S_NORMAL (AGRD, 'K',	3, A_NoBlocking,		&States[S_ACOLYTE_DIE+5]),
	S_NORMAL (AGRD, 'L',	3, NULL,				&States[S_ACOLYTE_DIE+6]),
	S_NORMAL (AGRD, 'M',	3, A_AcolyteDie,		&States[S_ACOLYTE_DIE+7]),
	S_NORMAL (AGRD, 'N', 1400, NULL,				NULL),

#define S_ACOLYTE_XDIE (S_ACOLYTE_DIE+8)
	S_NORMAL (GIBS, 'A',	5, A_NoBlocking,		&States[S_ACOLYTE_XDIE+1]),
	S_NORMAL (GIBS, 'B',	5, A_TossGib,			&States[S_ACOLYTE_XDIE+2]),
	S_NORMAL (GIBS, 'C',	5, A_TossGib,			&States[S_ACOLYTE_XDIE+3]),
	S_NORMAL (GIBS, 'D',	4, A_TossGib,			&States[S_ACOLYTE_XDIE+4]),
	S_NORMAL (GIBS, 'E',	4, A_XScream,			&States[S_ACOLYTE_XDIE+5]),
	S_NORMAL (GIBS, 'F',	4, A_TossGib,			&States[S_ACOLYTE_XDIE+6]),
	S_NORMAL (GIBS, 'G',	4, NULL,				&States[S_ACOLYTE_XDIE+7]),
	S_NORMAL (GIBS, 'H',	4, NULL,				&States[S_ACOLYTE_XDIE+8]),
	S_NORMAL (GIBS, 'I',	5, NULL,				&States[S_ACOLYTE_XDIE+9]),
	S_NORMAL (GIBS, 'J',	5, A_AcolyteDie,		&States[S_ACOLYTE_XDIE+10]),
	S_NORMAL (GIBS, 'K',	5, NULL,				&States[S_ACOLYTE_XDIE+11]),
	S_NORMAL (GIBS, 'L', 1400, NULL,				NULL),
};

IMPLEMENT_ACTOR (AAcolyte, Strife, -1, 0)
	PROP_SpawnState (S_ACOLYTE_STND)
	PROP_SeeState (S_ACOLYTE_CHASE)
	PROP_PainState (S_ACOLYTE_PAIN)
	PROP_MissileState (S_ACOLYTE_ATK)
	PROP_DeathState (S_ACOLYTE_DIE)
	PROP_XDeathState (S_ACOLYTE_XDIE)

	PROP_SpawnHealth (70)
	PROP_PainChance (150)
	PROP_SpeedFixed (7)
	PROP_RadiusFixed (24)
	PROP_HeightFixed (64)
	PROP_Mass (400)
	PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL)
	PROP_Flags2 (MF2_FLOORCLIP|MF2_PASSMOBJ|MF2_PUSHWALL|MF2_MCROSS)
	PROP_Flags4 (MF4_SEESDAGGERS|MF4_NOSPLASHALERT)
	PROP_MinMissileChance (150)
	PROP_Tag ("ACOLYTE")

	PROP_SeeSound ("acolyte/sight")
	PROP_PainSound ("acolyte/pain")
	PROP_AttackSound ("acolyte/rifle")
	PROP_DeathSound ("acolyte/death")
	PROP_ActiveSound ("acolyte/active")
END_DEFAULTS
User avatar
Your Name Is
Posts: 802
Joined: Sun Oct 31, 2004 5:06 pm
Location: Raleigh, NC
Contact:

Post by Your Name Is »

soft_haxorz wrote:I know it never is invulnerable and A_SetReflective doesn't make it invulnerable (it would only be invulnerable to any projectile). Also note I said similar to the Acolyte, not an exact replica.


A_SetReflective does NOT make an enemy invulnerable to projectiles. I've tested it. It doesn't work.

Feature Request disguised as post:

+INVULNERABLETOHITSCAN decorate flag
+INVULNERABLETOPROJECTILE decorate flag
skadoomer
Posts: 1026
Joined: Fri Sep 05, 2003 12:49 pm

Post by skadoomer »

try A_SetReflectiveInvulnerable
soft_haxorz
Posts: 50
Joined: Sun Apr 10, 2005 10:42 am
Location: The backend of the universe.

Post by soft_haxorz »

By projectile I meant a hitscan attack.
User avatar
Kirby
Posts: 2697
Joined: Thu Aug 26, 2004 1:23 pm

Post by Kirby »

skadoomer wrote:try A_SetReflectiveInvulnerable
That also prevents bullets from hurting him too, making him completley invulnerable. Just looking for projectiles only
User avatar
David Ferstat
Posts: 1113
Joined: Wed Jul 16, 2003 8:53 am
Location: Perth, Western Australia
Contact:

Post by David Ferstat »

soft_haxorz wrote:By projectile I meant a hitscan attack.
It's important to note that projectiles and hitscan attacks are not the same, or even similar.

Projectile attacks involve the creation of new (albeit short-lived) actors, which are the fireballs or rockets that you see on the screen, and which take a non-zero amount of time to arrive at their target, while hitscan attacks have the engine literally drawing an invisible line from the attacker, and instantly applying damage and/or bullet puffs at the far end.
Locked

Return to “Editing (Archive)”