Uhhh... What happened to A_CustomMissile?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

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!)

Uhhh... What happened to A_CustomMissile?

Postby XASSASSINX » Tue Oct 31, 2017 4:14 pm

I haven't making decorate for some GOOD time. I just dowloaded slade again and it looks different, more organized. Anyways i tried to use A_CustomMissile, but the monster doens't turn at me like it used to do. So i checked to see if i did anything wrong, and APPARENTLY they are now using A_SpawnProjectile instead of custom missile. The problem IS because "A_SpawnProjectile" Doens't have the color orange on Slade which means it's not a function. Can someone explains me WHY they changed it, why on MY slade it's ins't showing orange, and why A_CustomMissile is not making my monster turns at me. Thank you!
XASSASSINX
 
Joined: 20 Dec 2016
Location: MURICAA BROTHER! Just kidding, Brazil.

Re: Uhhh... What happened to A_CustomMissile?

Postby wildweasel » Tue Oct 31, 2017 4:49 pm

Are you forgetting to A_FaceTarget?
User avatar
wildweasel
from a different perspective.
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: Uhhh... What happened to A_CustomMissile?

Postby XASSASSINX » Tue Oct 31, 2017 5:14 pm

wildweasel wrote:Are you forgetting to A_FaceTarget?

No. the attack i made is a continous ray. Here is the script for it:

Code: Select allExpand view
  SoulBeamAttack:
   ZUNM EFEFEFEFEFEFEF 3 A_FaceTarget
   ZUNM E 6 A_PlaySound("grunt/sight")
   TNT1 A 0 A_Playsound("zombie/beamattack")
   ZUNM F 1 A_FaceTarget
   ZUNM FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 2 A_CustomMissile("SoulBeam", 32, -7)
    ZUNM A 15 A_FaceTarget
   Goto See
XASSASSINX
 
Joined: 20 Dec 2016
Location: MURICAA BROTHER! Just kidding, Brazil.

Re: Uhhh... What happened to A_CustomMissile?

Postby Gutawer » Tue Oct 31, 2017 5:17 pm

XASSASSINX wrote:and APPARENTLY they are now using A_SpawnProjectile instead of custom missile. The problem IS because "A_SpawnProjectile" Doens't have the color orange on Slade which means it's not a function.

That's not true at all. SLADE's list of functions is nowhere near extensive and it's missing a lot of them from the syntax highlighting. You can still use the function, you just won't get a handy list of arguments.
User avatar
Gutawer
User Accounts Assistant
 
Joined: 16 Apr 2016
Discord: Gutawer#3431

Re: Uhhh... What happened to A_CustomMissile?

Postby XASSASSINX » Tue Oct 31, 2017 5:22 pm

Ohhhh... I get it now. Also just fixed the bug, i have to put "A_FaceTarget" TO ALL the frames. That add ALOT of lines. But i do remember that A_CustoMissile ALready made the monster face it target. Or i'm just crazy.
XASSASSINX
 
Joined: 20 Dec 2016
Location: MURICAA BROTHER! Just kidding, Brazil.

Re: Uhhh... What happened to A_CustomMissile?

Postby Nevander » Tue Oct 31, 2017 11:50 pm

Something else sounds wrong here. It should still stay facing the target until the state completes correct?
Nevander
Self-Banned User
 
Joined: 06 Jan 2014

Re: Uhhh... What happened to A_CustomMissile?

Postby Matt » Tue Oct 31, 2017 11:57 pm

I just remember A_CustomMissile would shoot at the target, but I don't remember if it made the actor face the target too.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: Uhhh... What happened to A_CustomMissile?

Postby Graf Zahl » Wed Nov 01, 2017 1:10 am

Why should it? Its name is A_CustomMissile, not A_CustomMissileAndFaceTarget.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Uhhh... What happened to A_CustomMissile?

Postby XASSASSINX » Wed Nov 01, 2017 7:20 am

Graf Zahl wrote:Why should it? Its name is A_CustomMissile, not A_CustomMissileAndFaceTarget.

So i guess it faced the target because i put the "A_FaceTarget" One line before. But in this continous lines, i have to put "A_FaceTarget" for all of them.
XASSASSINX
 
Joined: 20 Dec 2016
Location: MURICAA BROTHER! Just kidding, Brazil.

Re: Uhhh... What happened to A_CustomMissile?

Postby Graf Zahl » Wed Nov 01, 2017 9:18 am

So?

In ZScript you can just define your own function for such a combined action - there's no need to add it on the engine side.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Uhhh... What happened to A_CustomMissile?

Postby Kinsie » Thu Nov 02, 2017 3:39 am

You don't even need to use ZScript, thanks to the magic and wonder of Anonymous Functions.

Code: Select allExpand view
SoulBeamAttack:
   ZUNM EFEFEFEFEFEFEF 3 A_FaceTarget
   ZUNM E 6 A_PlaySound("grunt/sight")
   TNT1 A 0 A_Playsound("zombie/beamattack")
   ZUNM F 1 A_FaceTarget
   ZUNM FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 2 { A_FaceTarget(); A_CustomMissile("SoulBeam", 32, -7); }
   ZUNM A 15 A_FaceTarget
   Goto See
User avatar
Kinsie
Dog Days
 
Joined: 22 Oct 2004
Location: MAP33
Discord: Find Me...
Twitch ID: thekinsie

Re: Uhhh... What happened to A_CustomMissile?

Postby XASSASSINX » Sat Nov 04, 2017 6:53 pm

Kinsie wrote:You don't even need to use ZScript, thanks to the magic and wonder of Anonymous Functions.

Code: Select allExpand view
SoulBeamAttack:
   ZUNM EFEFEFEFEFEFEF 3 A_FaceTarget
   ZUNM E 6 A_PlaySound("grunt/sight")
   TNT1 A 0 A_Playsound("zombie/beamattack")
   ZUNM F 1 A_FaceTarget
   ZUNM FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 2 { A_FaceTarget(); A_CustomMissile("SoulBeam", 32, -7); }
   ZUNM A 15 A_FaceTarget
   Goto See


Ohhhh... Didn't know about that! Thanks!
EDIT: No Wait! Hold on, i tried using the {A_FaceTarget} But now it's giving me an error!

Code: Select allExpand view
"Unexpected Token: ')'


EDIT 2: I thought that it was that i'm using a unpdated version. And i was kinda right. Except that now GZDOOM Doens't open! It just keep on that "Not Respoding" Error! Any help?

EDIT 3: (Woah that's alot of edits) Nope. Tried to play my mod now with this version. Still getting the same error.
XASSASSINX
 
Joined: 20 Dec 2016
Location: MURICAA BROTHER! Just kidding, Brazil.

Re: Uhhh... What happened to A_CustomMissile?

Postby Matt » Tue Nov 07, 2017 12:54 am

Impossible to see what went wrong without seeing the entire project.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: Uhhh... What happened to A_CustomMissile?

Postby Apeirogon » Wed Nov 08, 2017 3:05 pm

XASSASSINX wrote: i tried using the {A_FaceTarget}


You need and must must use semicolon ";" after last symbol of function inside anonimous function, regardless what it, letter of the name or bracket which close line of argument function.
User avatar
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: Uhhh... What happened to A_CustomMissile?

Postby Major Cooke » Fri Nov 10, 2017 10:58 am

He has a semicolon. The real problem is, it's in DECORATE which doesn't know how to handle () properly.

In ZScript you use this
Code: Select allExpand view
A_FaceTarget();


In DECORATE however, you must use this:
Code: Select allExpand view
A_FaceTarget;
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007


Return to Scripting

Who is online

Users browsing this forum: No registered users and 2 guests