Enemy Floor Height Targeting Question (Decorate)

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Twitchy2019
Posts: 176
Joined: Wed Jan 04, 2017 8:27 pm
Location: My Foot,Your Face! (Team Monster)

Enemy Floor Height Targeting Question (Decorate)

Post by Twitchy2019 »

Question, I am trying to modify this enemy's code to make its attacks target players from different heights. Currently these attacks only fly in a straight line. Here is the decorate code currently. Can anyone help me with this?

Code: Select all

ACTOR Vampire : Archvile Replaces Archvile
{ 
Health 700
Species Archvile
PainChance 50
Speed 15
Scale 1.1
Radius 20 
Height 56 
Mass 150 
SeeSound "vampire/see"
DeathSound "vampire/death"
PainSound "vampire/pain"
MONSTER
+FLOORCLIP
+DONTHURTSPECIES
-NOGRAVITY
-FLOAT
Obituary "A Vampire drained all of %o's life."
States 
   { 
   Spawn: 
       VAM1 AB 10 A_Look 
       Loop 
   See:
       VAM1 AAABBB 4 A_VileChase
	   VAM1 A 0 A_Jump(64,2)
       VAM1 A 0 A_Jump(96,2)
       goto see
	   VAM1 A 0 HealThing(50)
	   goto see
       VAM1 A 0 A_VileChase
       VAM1 A 1 A_Playsound("monster/blur")
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
	   VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 A 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 1 A_VileChase
       VAM1 A 0 Bright A_SpawnItemEx("VampFX2", 0, 0, 0, 0, 0, 0, 0, 128)
       VAM1 B 0 A_Jump(96,1)
       Goto See
       VAM1 B 0
       Goto See
   Missile:
       VAM1 X 1 Bright A_Jump(96,28)
       VAM1 X 8 Bright A_FaceTarget
	   VAM1 Y 0 
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
       VAM1 Y 0 Bright A_CustomMissile("BatAttack",Random(8,64),Random(-32,32),Random(20,-20),2,0)
	   VAM1 Y 0 Bright A_CustomMissile("BatAttack",Random(8,64),Random(-32,32),Random(20,-20),2,0)
	   VAM1 Y 0 Bright A_CustomMissile("BatAttack",Random(8,64),Random(-32,32),Random(20,-20),2,0)
	   VAM1 Y 0 Bright A_CustomMissile("BatAttack",Random(8,64),Random(-32,32),Random(20,-20),2,0)
	   VAM1 Y 0 Bright A_CustomMissile("BatAttack",Random(8,64),Random(-32,32),Random(20,-20),2,0)
	   VAM1 Y 0 Bright A_CustomMissile("BatAttack",Random(8,64),Random(-32,32),Random(20,-20),2,0)
	   VAM1 Y 0 Bright A_CustomMissile("BatAttack",Random(8,64),Random(-32,32),Random(20,-20),2,0)
	   VAM1 Y 0 Bright A_CustomMissile("BatAttack",Random(8,64),Random(-32,32),Random(20,-20),2,0)
	   VAM1 Y 0 Bright A_CustomMissile("BatAttack",Random(8,64),Random(-32,32),Random(20,-20),2,0)
	   VAM1 Y 0 Bright A_CustomMissile("BatAttack",Random(8,64),Random(-32,32),Random(20,-20),2,0)
	   VAM1 Y 8 Bright 
       goto see
       VAM1 E 8 Bright A_FaceTarget
       VAM1 F 0 Bright A_FaceTarget
	   VAM1 A 0 A_SpawnDebris("VampireBloodBoom",1)
       VAM1 A 0 A_SpawnDebris("VampireBloodBoom",1)
	   VAM1 A 0 A_SpawnDebris("VampireBloodBoom",1)
	   VAM1 A 0 A_SpawnDebris("VampireBloodBoom",1)
	   VAM1 A 0 A_SpawnDebris("VampireBloodBoom",1)
	   VAM1 A 0 A_SpawnDebris("VampireBloodBoom",1)
	   VAM1 A 0 A_SpawnDebris("VampireBloodBoom",1)
	   VAM1 A 0 A_SpawnDebris("VampireBloodBoom",1)
       VAM1 A 0 A_SpawnDebris("VampireBloodBoom",1)
	   VAM1 A 0 A_SpawnDebris("VampireBloodBoom",1)
	   VAM1 A 0 A_SpawnDebris("VampireBloodBoom",1)
	   VAM1 A 0 A_SpawnDebris("VampireBloodBoom",1)
	   VAM1 A 0 A_SpawnDebris("VampireBloodBoom",1)
	   VAM1 A 0 A_SpawnDebris("VampireBloodBoom",1)
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       VAM1 F 0 Bright 
       VAM1 F 1 Bright A_CustomMissile("VampireRoundBeam",42,0,0,2)
       Goto See
   Pain: 
       VAM1 C 2 
       VAM1 C 2 A_Pain 
       Goto See
   Heal:
       VAM1 XY 10 Bright
       Goto See
   Death: 
       VAM1 G 1 Bright
       VAM1 G 8 Bright A_Scream 
       VAM1 H 5 Bright
       VAM1 I 5 Bright A_NoBlocking
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	   TNT1 A 0 A_SpawnItemEx("BatAttackSafe", 0, 0, 0, random(-8, 8), random(-8, 8), random(16, 32))
	   TNT1 A 0 A_SpawnItemEx("BatAttackSafe", 0, 0, 0, random(-8, 8), random(-8, 8), random(16, 32))
	   TNT1 A 0 A_SpawnItemEx("BatAttackSafe", 0, 0, 0, random(-8, 8), random(-8, 8), random(16, 32))
	   TNT1 A 0 A_SpawnItemEx("BatAttackSafe", 0, 0, 0, random(-8, 8), random(-8, 8), random(16, 32))
	   TNT1 A 0 A_SpawnItemEx("BatAttackSafe", 0, 0, 0, random(-8, 8), random(-8, 8), random(16, 32))
	   TNT1 A 0 A_SpawnItemEx("BatAttackSafe", 0, 0, 0, random(-8, 8), random(-8, 8), random(16, 32))
	   TNT1 A 0 A_SpawnItemEx("BatAttackSafe", 0, 0, 0, random(-8, 8), random(-8, 8), random(16, 32))
	   TNT1 A 0 A_SpawnItemEx("BatAttackSafe", 0, 0, 0, random(-8, 8), random(-8, 8), random(16, 32))
	   TNT1 A 0 A_SpawnItemEx("BatAttackSafe", 0, 0, 0, random(-8, 8), random(-8, 8), random(16, 32))
	   TNT1 A 0 A_SpawnItemEx("BatAttackSafe", 0, 0, 0, random(-8, 8), random(-8, 8), random(16, 32))
       VAM1 J 5 Bright  
       VAM1 KLM 5 Bright
       VAM1 N 5 
       VAM1 O 5  
       VAM1 P -1 
       Stop 
   Raise: 
       Stop
   } 
}

ACTOR VampFX2
{   
   Radius 2
   Height 2
   Speed 0
   Scale 0.90
   PROJECTILE
   RENDERSTYLE Translucent
   ALPHA 0.90
   States
   {
   Spawn:
      Null A 3
      VAM1 A 5 A_FadeOut(0.10)
      goto Spawn+1
   }
}

ACTOR VampireRoundBeam
{
   Radius 2
   Height 4
   Speed 10
   Damage 1
   Scale 0.50
   PROJECTILE
   +THRUGHOST
   +FLOATBOB
   States
   {
   Spawn:
      VAM2 A 0 Bright A_PlaySound("vampire/beam")
	  VAM2 A 0 Bright A_PlaySound("vampire/beam")
	  VAM2 A 0 Bright A_PlaySound("vampire/beam")
	  VAM2 A 0 Bright A_PlaySound("vampire/beam")
	  VAM2 A 0 Bright A_PlaySound("vampire/beam")
      VAM2 A 1 Bright A_CStaffMissileSlither
      VAM2 A 0 Bright A_SpawnItemEx("VampireRoundBeamTrail", 0, 0, 0, 0, 0, 0, 0, 128)
      VAM2 A 1 Bright A_CStaffMissileSlither
      VAM2 A 0 Bright A_SpawnItemEx("VampireRoundBeamTrail", 0, 0, 0, 0, 0, 0, 0, 128)
      VAM2 A 1 Bright A_CStaffMissileSlither
      VAM2 A 0 Bright A_SpawnItemEx("VampireRoundBeamTrail", 0, 0, 0, 0, 0, 0, 0, 128)
      VAM2 A 1 Bright A_CStaffMissileSlither
      VAM2 A 0 Bright A_SpawnItemEx("VampireRoundBeamTrail", 0, 0, 0, 0, 0, 0, 0, 128)
      VAM2 A 0 Bright
      loop
   Death:
      VAM2 CDEFGH 3 Bright
      stop
   }
}

ACTOR VampireRoundBeamTrail
{
   Radius 8
   Height 16
   RENDERSTYLE ADD
   ALPHA 0.67
   Scale 0.50
   PROJECTILE
   +THRUGHOST
   +FLOATBOB
   SeeSound "monster/acosht"
   DeathSound "monster/acohit"
   States
   {
   Spawn:
      VAM2 A 2 Bright
      VAM2 A 2 Bright 
      VAM2 A 2 Bright
      VAM2 A 2 Bright 
      VAM2 A 0 Bright
      goto death
   Death:
      VAM2 A 1 Bright A_SetTranslucent(0.60)
	  VAM2 A 1 Bright A_SetTranslucent(0.50)
	  VAM2 A 1 Bright A_SetTranslucent(0.40)
	  VAM2 A 1 Bright A_SetTranslucent(0.30)
	  VAM2 A 1 Bright A_SetTranslucent(0.20)
	  VAM2 A 1 Bright A_SetTranslucent(0.10)
	  VAM2 A 1 Bright A_SetTranslucent(0.00)
      stop
   }
}


actor VampireBloodBoom
{
 game Doom
 scale 0.75
 health 1
 radius 8
 height 1
 mass 1
 +CORPSE
 +NOTELEPORT
 +NOBLOCKMAP
 states
 {
 Spawn:
  TNT1 A 0
  VAB1 A 1 A_SpawnItemEx("VampireBloodTrail",0,0,0,1,0,0,0,128)
  VAB1 A 1 
  VAB1 A 1 A_SpawnItemEx("VampireBloodTrail",0,0,0,1,0,0,0,128)
  VAB1 A 1
  VAB1 B 1 A_SpawnItemEx("VampireBloodTrail",0,0,0,1,0,0,0,128)
  VAB1 B 1
  VAB1 B 1 A_SpawnItemEx("VampireBloodTrail",0,0,0,1,0,0,0,128)
  VAB1 B 1
  VAB1 C 1 A_SpawnItemEx("VampireBloodTrail",0,0,0,1,0,0,0,128)
  VAB1 C 1
  VAB1 C 1 A_SpawnItemEx("VampireBloodTrail",0,0,0,1,0,0,0,128)
  VAB1 C 1
  VAB1 D 1 A_SpawnItemEx("VampireBloodTrail",0,0,0,1,0,0,0,128)
  VAB1 D 1
  VAB1 D 1 A_SpawnItemEx("VampireBloodTrail",0,0,0,1,0,0,0,128)
  VAB1 D 1
  loop
 Crash:
  TNT1 A 1 A_SpawnItemEx("VampireBloodSpot",0,0,0,1,0,0,0,128)
  stop
 }
}

actor VampireBloodSpot
{
 game Doom
 radius 12
 height 2
 mass 1
 +NOTELEPORT
 -NOBLOCKMAP
 states
 {
 Spawn:
  TNT1 A 0
  TNT1 A 0 A_PlaySound("vampireblood")
  TNT1 A 0 A_Jump(64,4)
  TNT1 A 0 A_Jump(128,4)
  TNT1 A 0 A_Jump(192,4)
  TNT1 A 0 A_Jump(255,4)
  VAB3 A 750
  stop
  VAB3 B 750
  stop
  VAB3 C 750
  stop
  VAB3 D 750
  stop
 }
}

actor VampireBloodTrail
{
 game Doom
 scale 0.70
 mass 1
 +LOWGRAVITY
 +NOTELEPORT
 +NOBLOCKMAP
 states
 {
  Spawn:
  VAB2 A 4
  VAB2 B 4
  VAB2 C 4
  VAB2 D 4
  stop
 }
}

ACTOR BatAttack
{
  Radius 8
  Height 16
  Speed 12 
  Damage 3
  PROJECTILE
  +Randomize
  +Float
  seesound "vampire/bats"
  states
  {
  Spawn:
    VAM4 ABCABCABCABC 3 BRIGHT A_SpawnItemEx("BatTrail")
	VAM4 ABCABCABCABC 3 BRIGHT A_SpawnItemEx("BatTrail")
	VAM4 ABCABCABCABC 3 BRIGHT A_SpawnItemEx("BatTrail")
	VAM4 ABCABCABCABC 3 BRIGHT A_SpawnItemEx("BatTrail")
	VAM4 ABCABCABCABC 3 BRIGHT A_SpawnItemEx("BatTrail")
    Goto death
  Death:
    TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    VAM4 A 2 A_SetTranslucent(0.9) 
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 B 2 A_SetTranslucent(0.8)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 C 2 A_SetTranslucent(0.7)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 A 2 A_SetTranslucent(0.6)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 B 2 A_SetTranslucent(0.5)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 C 2 A_SetTranslucent(0.4)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 A 2 A_SetTranslucent(0.3)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 B 2 A_SetTranslucent(0.2)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 C 2 A_SetTranslucent(0.1)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    Stop
  }
}

ACTOR BatTrail
{
  Radius 8
  Height 16
  RenderStyle Add
  Alpha 0.8
  Scale 0.3
  PROJECTILE
  +Randomize
  +NoGravity
  +Float
  states
  {
  Spawn:
    VAM5 ABCDEFGHI 3 BRIGHT
    Goto death
  Death:
	VAM5 I 1
    Stop
  }
}

Actor VampCloudSpawner
{
  radius 0
  height 0
  +NOGRAVITY
  +NOBLOCKMAP
  +NOLIFTDROP
  +NOTARGET
  +DONTSQUASH
  +NOTELEOTHER
  +NONSHOOTABLE
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_SpawnItemEx("VampCloud", 0, 0, 0, random(-2, 2), random(-2, 2), random(-1, 1))
    Stop
  }
}

Actor VampCloud
{
  renderstyle translucent
  alpha 0.9
  Scale 0.5
  radius 0
  height 0
  +NOGRAVITY
  +NOBLOCKMAP
  +NOLIFTDROP
  +NOTARGET
  +DONTSQUASH
  +NOTELEOTHER
  +NONSHOOTABLE
  States
  {
  Spawn:
    VAM6 A 0
    VAM6 A 0 A_Jump(128, 6)
    VAM6 ABCDE 3 A_FadeOut(0.05)
    Goto Spawn+1
    VAM6 F 0 A_Jump(128, 6)
    VAM6 FGHIJ 3 A_FadeOut(0.05)
    Goto Spawn+7
    VAM6 KLMNO 3 A_FadeOut(0.05)
    Goto Spawn+12
  }
}

Actor BatCloudSpawner
{
  radius 0
  height 0
  +NOGRAVITY
  +NOBLOCKMAP
  +NOLIFTDROP
  +NOTARGET
  +DONTSQUASH
  +NOTELEOTHER
  +NONSHOOTABLE
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_SpawnItemEx("BatCloud", 0, 0, 0, random(-2, 2), random(-2, 2), random(-1, 1))
    Stop
  }
}

Actor BatCloud
{
  renderstyle translucent
  alpha 0.9
  Scale 0.2
  radius 0
  height 0
  +NOGRAVITY
  +NOBLOCKMAP
  +NOLIFTDROP
  +NOTARGET
  +DONTSQUASH
  +NOTELEOTHER
  +NONSHOOTABLE
  States
  {
  Spawn:
    VAM6 A 0
    VAM6 A 0 A_Jump(128, 6)
    VAM6 ABCDE 3 A_FadeOut(0.10)
    Goto Spawn+1
    VAM6 F 0 A_Jump(128, 6)
    VAM6 FGHIJ 3 A_FadeOut(0.10)
    Goto Spawn+7
    VAM6 KLMNO 3 A_FadeOut(0.10)
    Goto Spawn+12
  }
}

ACTOR BatAttackSafe
{
  Radius 8
  Height 16
  Speed 15 
  Damage 0
  PROJECTILE
  +Randomize
  +Float
  seesound "vampire/bats"
  states
  {
  Spawn:
    VAM4 ABCABCABCABC 3 BRIGHT A_SpawnItemEx("BatTrail")
	VAM4 ABCABCABCABC 3 BRIGHT A_SpawnItemEx("BatTrail")
	VAM4 ABCABCABCABC 3 BRIGHT A_SpawnItemEx("BatTrail")
	VAM4 ABCABCABCABC 3 BRIGHT A_SpawnItemEx("BatTrail")
	VAM4 ABCABCABCABC 3 BRIGHT A_SpawnItemEx("BatTrail")
    Goto death
  Death:
    TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    VAM4 A 2 A_SetTranslucent(0.9) 
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 B 2 A_SetTranslucent(0.8)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 C 2 A_SetTranslucent(0.7)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 A 2 A_SetTranslucent(0.6)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 B 2 A_SetTranslucent(0.5)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 C 2 A_SetTranslucent(0.4)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 A 2 A_SetTranslucent(0.3)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 B 2 A_SetTranslucent(0.2)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 C 2 A_SetTranslucent(0.1)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    Stop
  }
}
Jarewill
 
 
Posts: 1853
Joined: Sun Jul 21, 2019 8:54 am

Re: Enemy Floor Height Targeting Question (Decorate)

Post by Jarewill »

In the following line, replace 2 with 0, assuming this is the attack you are talking about.
From:

Code: Select all

VAM1 Y 0 Bright A_CustomMissile("BatAttack",Random(8,64),Random(-32,32),Random(20,-20),2,0)
To:

Code: Select all

VAM1 Y 0 Bright A_CustomMissile("BatAttack",Random(8,64),Random(-32,32),Random(20,-20),0,0)
Doing this however seems to break the attack itself. (The projectiles will adjust themselves into a horizontal line instead of being spread out)
Changing the 2 in A_CustomMissile("VampireRoundBeam",42,0,0,2) should also be done.

Putting 2 there applies a flag which messes with aiming. (I think it's CMF_AIMDIRECTION, but I can't tell due to it being written as an number)
A way to do this without replacing 2 with 0, would be to make the monster actually aim at the player, (A_FaceTarget doesn't change the pitch) but I don't think there's anything in DECORATE that would do it.
User avatar
Twitchy2019
Posts: 176
Joined: Wed Jan 04, 2017 8:27 pm
Location: My Foot,Your Face! (Team Monster)

Re: Enemy Floor Height Targeting Question (Decorate)

Post by Twitchy2019 »

Doing this however seems to break the attack itself. (The projectiles will adjust themselves into a horizontal line instead of being spread out)
Changing the 2 in A_CustomMissile("VampireRoundBeam",42,0,0,2) should also be done.

Putting 2 there applies a flag which messes with aiming. (I think it's CMF_AIMDIRECTION, but I can't tell due to it being written as an number)
A way to do this without replacing 2 with 0, would be to make the monster actually aim at the player, (A_FaceTarget doesn't change the pitch) but I don't think there's anything in DECORATE that would do it.
I am looking for the monster to actually target the player no matter what elevation they are relative to the monster. The monster's attacks only fly at the eye level of the monster in the direction of the player minus the player's elevation. A_FaceTarget would fix this? If so where would I put this command?
Guest

Re: Enemy Floor Height Targeting Question (Decorate)

Post by Guest »

Like I said, you have to replace the (2)'s at the end of the attack functions with (0)'s.
The attacks already have A_FaceTarget before them, but it doesn't change the monster's pitch.
It accepts a pitch parameter, but it seemed to not do anything in my testing.
I also don't know of any DECORATE function that would change the monster's pitch to aim directly at the player.
Anyone feel free to correct me on this.

So for now, this is the only fix I can think of:
From [ VAM1 Y 0 Bright A_CustomMissile("BatAttack",Random(8,64),Random(-32,32),Random(20,-20),2,0) ]
To [ VAM1 Y 0 Bright A_CustomMissile("BatAttack",Random(8,64),Random(-32,32),Random(20,-20),0,0) ]
Guest

Re: Enemy Floor Height Targeting Question (Decorate)

Post by Guest »

The method you specified did EXACTLY what I needed! Thanks!
Post Reply

Return to “Scripting”