Page 1 of 1

Yes, another Decorate Question

Posted: Wed Oct 11, 2006 7:27 pm
by Ness!
Hello!

I've read the Wiki quite a bit and was trying to use the examples in the tutorial to make the regular zombie man shoot a blue shot. I also imported a sprite for the shot but..

Two questions.

1 - It talks about a four letter code for the attack sprite, how would I find that out?

2 - Does it need more than one frame of animation to work?

I figured out how to change his attack without a problem and import a custom attack but the two above questions have me stumped.

Any Ideas?

Posted: Wed Oct 11, 2006 7:35 pm
by HotWax
1. The "four letter code" is simply the sprite name. So if you imported your graphic as BLUEA0, the code would be "BLUE".

2. No.

Posted: Wed Oct 11, 2006 9:36 pm
by Ness!
Still not working, Ill post the code and see if that helps.

Code: Select all

actor BlueShot02
{
  height 8
  radius 6
  damage 5
  speed 10 
  renderstyle Add
  alpha 1
  seesound "misc/shot"
  deathsound "misc/shotx"
  PROJECTILE
  +RANDOMIZE
  states
  {
  Spawn:
    DKB1 A 4 bright
    loop
  Death:
    DKB1 a 6 bright
    stop
  }
}

actor Zoon 3067

{
  spawnid 4
  obituary "%o was killed by a zombieman."
  health 200
  radius 20
  height 56
  mass 100
  speed 1
  painchance 50
  seesound "grunt/sight"
  attacksound "grunt/attack"
  painsound "grunt/pain"
  deathsound "grunt/death"
  activesound "grunt/active"
  dropitem "Clip" 256
  MONSTER
  +FLOORCLIP
  states
  {
  Spawn:
    POSS AB 10 A_Look
    loop
  See:
    POSS AABBCCDD 4 A_Chase
    loop
  Missile:
    POSS E 10 A_FaceTarget
    POSS E 8 bright A_CustomMissile("BlueShot02", 32, 0, 0)
    POSS E 8 
    goto See
  Pain:
    POSS G 3
    POSS G 3 A_Pain
    goto See
  Death:
    POSS H 5
    POSS I 5 A_Scream
    POSS J 5 A_NoBlocking
    POSS K 5
    POSS L -1
    stop
  XDeath:
    POSS M 5
    POSS N 5 A_XScream
    POSS O 5 A_NoBlocking
    POSS PQRST 5
    POSS U -1
    stop
  Raise:
    POSS KJIH 5
    goto See
  }
}
The Image name is DKB1A0

I know the code must be fooked.. right? :D

Posted: Wed Oct 11, 2006 11:16 pm
by edward850
POSS KJIH 5

DKB1A0: POSS being the 4-letter sprite name
DKB1A0: KJIH is the sprite frame (multiple ones)
DKB1A0: this is the rotational frame, if 0, its the same thing at every angle

Posted: Thu Oct 12, 2006 8:34 am
by HotWax
After looking over the code I don't see anything immediately wrong with it. So...

Can you post the PWAD you're using to test with? Maybe there's something else messing it up.

Posted: Thu Oct 12, 2006 9:23 am
by Cutmanmike
Make sure the graphics are there and are in properly.

Posted: Thu Oct 12, 2006 5:52 pm
by DBThanatos
Ness! wrote:Still not working, Ill post the code and see if that helps.

Code: Select all

actor BlueShot02
{
  height 8
  radius 6
  damage 5
  speed 10 
  renderstyle Add
  alpha 1
  seesound "misc/shot"
  deathsound "misc/shotx"
  PROJECTILE
  +RANDOMIZE
  states
  {
  Spawn:
    DKB1 A 4 bright
    loop
  Death:
    DKB1 a 6 bright 
    stop
  }
}
The Image name is DKB1A0

I know the code must be fooked.. right? :D
I believe the proble is in the death sequence, it have:
DKB1 a 6 bright
I think that "a" must be "A".

that tends to give me problems, maybe im wrong

Posted: Thu Oct 12, 2006 9:53 pm
by Ness!
Thanks for the quick reply guys! Heres the test wad I was working on.

Posted: Thu Oct 12, 2006 10:00 pm
by edward850
Fixed, you needed your sprites between s_start and s_end markers

Posted: Thu Oct 12, 2006 10:13 pm
by Ness!
Holy crap thank you SO much! I was trying to figure this out for hours! this is so awesome thanks! :D

Posted: Fri Oct 13, 2006 7:52 am
by HotWax
DBThanatos wrote:I believe the proble is in the death sequence, it have:
DKB1 a 6 bright
I think that "a" must be "A".
Decorate is case-insensitive. It reads "A" as "a" and "StealthArchVile" as "stealtharchvile".

Posted: Fri Oct 13, 2006 12:37 pm
by Anakin S.
I thought it was case sensitive in txt form but not in zdoom. Unless that changed.