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!)
XASSASSINX
Posts: 361
Joined: Tue Dec 20, 2016 4:53 pm
Location: MURICAA BROTHER! Just kidding, Brazil.

Uhhh... What happened to A_CustomMissile?

Post by XASSASSINX »

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!
User avatar
wildweasel
Moderator Team Lead
Posts: 21384
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support

Re: Uhhh... What happened to A_CustomMissile?

Post by wildweasel »

Are you forgetting to A_FaceTarget?
XASSASSINX
Posts: 361
Joined: Tue Dec 20, 2016 4:53 pm
Location: MURICAA BROTHER! Just kidding, Brazil.

Re: Uhhh... What happened to A_CustomMissile?

Post by XASSASSINX »

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 all

  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
User avatar
Gutawer
User Accounts Assistant
Posts: 460
Joined: Sat Apr 16, 2016 6:01 am
Discord: Gutawer#3431
Preferred Pronouns: She/Her

Re: Uhhh... What happened to A_CustomMissile?

Post by Gutawer »

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.
XASSASSINX
Posts: 361
Joined: Tue Dec 20, 2016 4:53 pm
Location: MURICAA BROTHER! Just kidding, Brazil.

Re: Uhhh... What happened to A_CustomMissile?

Post by XASSASSINX »

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.
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

Re: Uhhh... What happened to A_CustomMissile?

Post by Nevander »

Something else sounds wrong here. It should still stay facing the target until the state completes correct?
User avatar
Matt
Posts: 9666
Joined: Sun Jan 04, 2004 5:37 pm
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: Uhhh... What happened to A_CustomMissile?

Post by Matt »

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47995
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Uhhh... What happened to A_CustomMissile?

Post by Graf Zahl »

Why should it? Its name is A_CustomMissile, not A_CustomMissileAndFaceTarget.
XASSASSINX
Posts: 361
Joined: Tue Dec 20, 2016 4:53 pm
Location: MURICAA BROTHER! Just kidding, Brazil.

Re: Uhhh... What happened to A_CustomMissile?

Post by XASSASSINX »

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47995
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Uhhh... What happened to A_CustomMissile?

Post by Graf Zahl »

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
Kinsie
Posts: 7303
Joined: Fri Oct 22, 2004 9:22 am
Discord: Find Me...
Twitch ID: thekinsie
Location: MAP33

Re: Uhhh... What happened to A_CustomMissile?

Post by Kinsie »

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

Code: Select all

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
XASSASSINX
Posts: 361
Joined: Tue Dec 20, 2016 4:53 pm
Location: MURICAA BROTHER! Just kidding, Brazil.

Re: Uhhh... What happened to A_CustomMissile?

Post by XASSASSINX »

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

Code: Select all

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 all

"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.
User avatar
Matt
Posts: 9666
Joined: Sun Jan 04, 2004 5:37 pm
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: Uhhh... What happened to A_CustomMissile?

Post by Matt »

Impossible to see what went wrong without seeing the entire project.
User avatar
Apeirogon
Posts: 1592
Joined: Mon Jun 12, 2017 12:57 am

Re: Uhhh... What happened to A_CustomMissile?

Post by Apeirogon »

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
Major Cooke
Posts: 8059
Joined: Sun Jan 28, 2007 3:55 pm

Re: Uhhh... What happened to A_CustomMissile?

Post by Major Cooke »

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 all

A_FaceTarget();
In DECORATE however, you must use this:

Code: Select all

A_FaceTarget;

Return to “Scripting”