Hi everyone,
I am trying to make some monsters jump over walls or climb then as they bump against a them. I was thinghing about using A_checkblock but it doesn't seem to work properly. Do you have an idea why it doesn't work? Here is the part of code concerned(I used different configuration of the function starting for a simple one without pointers or flags):
actor Predator //version from alien trilogy beta 1.1, come predator 2
{
health 300
radius 16
height 64
mass 1000
speed 7.8
painchance 24
xscale 1.2
//renderstyle "Fuzzy"
//Alpha 0.2
painsound "predpain"
deathsound "preddeth"
activesound "predact"
bloodcolor "Green"
bloodtype "predatorblood"
Obituary "%O was hunted down, and laid to waste by the predator!"
damagefactor "Slime", 0.0
damagefactor "TargetAlien", 1
damagefactor "MarineTarget", 1.0
damagefactor "AlienTarget", 1.0
damagefactor "DroidTarget", 1.0
damagefactor "PredatorTarget", 0
PainChance "PredatorTarget", 255
PainChance "TargetAlien", 255
damagefactor "Alien", 2
Species "Predator"
MaxStepHeight 40
MaxDropoffHeight 300
MONSTER
DONTHURTSHOOTER
+FLOORCLIP
+DROPOFF //puo saltare giu da qualsiasi piano
+DONTBLAST
+FIXMAPTHINGPOS
+SLIDESONWALLS
+FORCEXYBILLBOARD
+ACTIVATEIMPACT //Upon hitting a wall this actor can activate G1/GR lines
+CANUSEWALLS //This actor can activate unlocked doors and lifts
States
{
Pain.DroidTarget:
Pain.AlienTarget:
Pain.MarineTarget:
Pain.PredatorTarget:
TNT1 A 0
TNT1 A 0 A_ChangeFLag("NOPAIN", 1)
Goto See2
Spawn:
TNT1 A 0
TNT1 A 0 A_ChangeFLag(NOPAIN, 0)
TNT1 A 0 A_CheckBlock("climb",0,AAPTR_DEFAULT)
TNT1 A 0 A_jumpif(GetZAt<-40,2)
PRED E 60 A_facetarget//A_Look
TNT1 A 0
PRED AAAAAA 1 A_chase//A_Wander(CHF_NORANDOMTURN);
TNT1 A 0 A_CheckBlock("climb",0,AAPTR_DEFAULT)
TNT1 A 0 A_Recoil(-1.5)
PRED BBBBB 1 A_chase//A_Wander(CHF_NORANDOMTURN)
TNT1 A 0 A_CheckBlock("climb",0,AAPTR_DEFAULT)
TNT1 A 0 //A_Recoil(-0.5)
PRED CCCCCC 1 A_chase//A_Wander(CHF_NORANDOMTURN)
TNT1 A 0 A_CheckBlock("climb",0,AAPTR_DEFAULT)
TNT1 A 0 A_Recoil(-1.5)
PRED DDDDD 1 A_chase//A_Wander(CHF_NORANDOMTURN)
TNT1 A 0 A_CheckBlock("climb",0,AAPTR_DEFAULT)
TNT1 A 0 //A_Recoil(-0.5)
Loop
Climb:
TNT1 A 0
//TNT1 A 0 A_jumpif((GetZAt(10)-GetZAt)>41,2)
//TNT1 A 0 A_jumpif(GetZAt(10)<480,2)
PRED AAAAAA 10
TNT1 A 0 ThrustThingZ(0,45,0,1)
//TNT1 A 0 A_CheckBlock(
PRED BBBBB 10
TNT1 A 0 ThrustThingZ(0,45,0,1)
PRED CCCCCC 10
TNT1 A 0 ThrustThingZ(0,45,0,1)
PRED DDDDD 10
TNT1 A 0 ThrustThingZ(0,45,0,1)
goto spawn
A_CheckBlock help [split]
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!)
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!)