Page 1 of 1

What is wrong with whiteface code?

Posted: Thu Jan 22, 2015 12:32 am
by ibm5155
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
  }

}

RE: What is wrong with whiteface code?

Posted: Thu Jan 29, 2015 1:45 pm
by Uwe L. Bendoverson
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.

RE: What is wrong with whiteface code?

Posted: Sun Feb 08, 2015 11:13 pm
by ibm5155
hm I just found this today, I'm gonna try this tommorow, thanks for the help :)