What is wrong with whiteface code?

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

What is wrong with whiteface code?

#1

Post by ibm5155 » Thu Jan 22, 2015 12:32 am

So the problem looks like in decorate.
Well here's the situation.
This monster is a ghost, so he can pass by walls, also he haunts humans...

The problem is: sometimes, he pass near the target and continue walking until it reaches the map limit and then get teleported to the other area, and then he kills the human

text exampla [w] = white face , [h] = human , [x] = dead human
the top of the image is what's happening, the last image is what it should be

Image


Well he should track the human just like a rocket from revenant, but sometimes it doesn't work. Is it related to something on decorate?

Code: Select all

//WHITE FACE DECORATE CREATED BY IBM5155


actor IMSCARED2 31203
{
  //$Category Ibm Stuff
  MONSTER
  //Radius 20
  Health 0x7fffffff
  Speed 3
  scale 0.08
  +GHOST +NOCLIP +NOGRAVITY +FLOAT +LOOKALLAROUND -SOLID +NOBLOCKMONST +DROPOFF +DONTSPLASH +BRIGHT
  ActiveSound"" 
  meleedamage 9999
  meleerange 64
  Obituary "%o was dead by \cjwhite face"
  States
  {
  Spawn:
    SCAR A 1 A_Look
	SCAR A 1 A_SetTranslucent (0.0,0)
    Loop
  See:
    //SCAR A 0 
	SCAR A 1 Bright A_Chase  
	Loop
  Melee:
	SCAR A 0 A_GiveToTarget("IMSCAREDACTIVE", 1)
    SCAR A 0 A_FaceTarget
    SCAR A 2 A_MeleeAttack
	SCAR A 100
    Goto See
  Death:
    IBMA A 4 
    IBMA A 0 A_Scream
	IBMA A 4
    IBMA A 4
    IBMA A 4 A_SetTranslucent(1.0,0)
    IBMA A 4 A_Fall
    IBMA A -1 A_SetFloorClip
    Stop
  Raise:
    IBMA A 8 A_UnSetFloorClip
    IBMA A 8
    Goto See
  }
}

actor IMSCARED 31202
{
  //$Category Ibm Stuff
  Height 40
  Radius 20
  scale 0.08
  +SOLID +NOGRAVITY  +NOCLIP
  States
  {
  Spawn:
    SCAR A 10
    Loop
  }

}
Last edited by ibm5155 on Thu Jan 22, 2015 12:39 am, edited 1 time in total.
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

Uwe L. Bendoverson
 
Posts: 62
Joined: Wed Nov 12, 2014 12:32 am
Location: Testing Zan 2.0

RE: What is wrong with whiteface code?

#2

Post by Uwe L. Bendoverson » Thu Jan 29, 2015 1:45 pm

I can't really make sense of the image with the text example. (Because there is none... All I see is white face, a white hexagon, an arrow, a red star and some unknown squiggly lines. No markings to label which is which.) I can probably ascertain that the hexagon is meant to be the player... The red star being dead?

As for the code, try changing A_Chase to a 0-tic A_FaceTarget call followed by a 1 or 2-tic A_Recoil(-1) call. That will make the enemy chase the player relentlessly. If that's too fast, A_Recoil(-0.5) may work too. If you need it to attack when close, use A_JumpIfCloser, or you may be able to get away with setting the enemy's speed attribute to 0, and call a 0-tic A_Chase call before A_FaceTarget or after A_Recoil to get it to initiate it's melee state.
Last edited by Uwe L. Bendoverson on Thu Jan 29, 2015 1:52 pm, edited 1 time in total.
"Any fool can criticize, condemn, and complain-and most fools do. But it takes character and self-control to be understanding and forgiving."
Join the Doom Evolved group on Evolve!

User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

RE: What is wrong with whiteface code?

#3

Post by ibm5155 » Sun Feb 08, 2015 11:13 pm

hm I just found this today, I'm gonna try this tommorow, thanks for the help :)
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

Post Reply