Darkforce002 Posted February 15, 2012 Im trying to get the custom A_painAttack option to work but every time I try that; Skulltag, Zdoom, and GZdoom say: Script error, "Ele.pk3:decorate.txt" line 9: Sprite names must be exactly 4 charactersACTOR BaronEle : PainElemental { States { Missile: PAIN D 5 A_FaceTarget PAIN E 5 A_FaceTarget PAIN F 4 BRIGHT A_FaceTarget PAIN F 1 BRIGHT A_PainAttack ["Baronball"] Goto See } } 0 Share this post Link to post
Gez Posted February 15, 2012 You need to use parentheses, not square brackets. 0 Share this post Link to post
printz Posted February 15, 2012 True, but brackets are much easier to type than parentheses! 0 Share this post Link to post
Phml Posted February 15, 2012 On AZERTY keyboards parentheses are one keystroke and brackets two. The only sensical choice is obvious: everyone should just adopt french as the international language! 0 Share this post Link to post
Darkforce002 Posted February 16, 2012 that worked instead of "A_PainAttack ["Baronball"]", I used "A_PainAttack(Baronball)" (without the quotes) which seems a bit misleading if you looked at the ZDoom Wiki which says "A_PainAttack [(String type)]", and for some odd reason the baron ball that the Pain elemental fires sometimes sticks to walls, floors, and ceilings :confused: . 0 Share this post Link to post
Rayziik Posted February 16, 2012 The brackets signify if a parameter is optional, whereas if you used the A_PainAttack by itself without an actor to shoot, it would by default spawn a lost soul. EDIT: Also, you're using a bad function for spawning projectiles, A_PainAttack is meant to spawn another monster, and when it does the actor it spawns calls A_SkullAttack. Since the BaronBall is already a projectile, the A_SkullAttack function might cause it to have some undefined behavior. Try using A_CustomMissile instead. 0 Share this post Link to post
Darkforce002 Posted February 16, 2012 Rayzik said:EDIT: Also, you're using a bad function for spawning projectiles, A_PainAttack is meant to spawn another monster, and when it does the actor it spawns calls A_SkullAttack. Since the BaronBall is already a projectile, the A_SkullAttack function might cause it to have some undefined behavior. Try using A_CustomMissile instead. I know that I was just testing the a_painattack function for a mod (the monster won't be using baronball or any non-monster projectile.) 0 Share this post Link to post
Gez Posted February 16, 2012 Rayzik said:The brackets signify if a parameter is optional, whereas if you used the A_PainAttack by itself without an actor to shoot, it would by default spawn a lost soul. Exactly. The brackets mean you can use A_PainAttack by its lonesome, or A_PainAttack("someactor"). Likewise, some of the functions have optional parameters and non-optional ones. So it could look like this: A_DoSomething(param1, param2[, param3[, param4]]) That means that it can be either: A_DoSomething(param1, param2) or: A_DoSomething(param1, param2, param3) or: A_DoSomething(param1, param2, param3, param4) 0 Share this post Link to post