Page 1 of 2

P_Startscript Unknown Script

Posted: Mon Jan 07, 2019 5:13 pm
by XASSASSINX
Hello everyone, I'm trying to run a script that if On, it spawns a baron of hell on a custom zombieman. (This is just a test, First time using custom Cvras and menu options). Hovewer, When i use A_JumpIf(CallACS), I get this error:

"P_StartScript: Unknown Script "Cl_Mancubus".

I have the whole menu On and Off defined. Why do i get that? It's just a simple option that jumps to the state if it's on then spawn a baron of hell. Here's the script:

Code: Select all

  Spawn:
 TNT1 A 0 
 Goto CheckSurprise
  CheckSurprise:
TNT1 A 0 A_JumpIf(CallACS("Cl_Mancubus") == 1, "SpawnRegular") 
 Goto Surprise
  SpawnRegular:
 POSS AB 10 A_Look
 Loop 
 Surprise:
 POSS A 4 A_SpawnItemEx("DoomImp", 2,  25, 10)
 Goto SpawnRegular
Any help??

Re: P_Startscript Unknown Script

Posted: Mon Jan 07, 2019 9:28 pm
by TDRR
XASSASSINX wrote:Hello everyone, I'm trying to run a script that if On, it spawns a baron of hell on a custom zombieman. (This is just a test, First time using custom Cvras and menu options). Hovewer, When i use A_JumpIf(CallACS), I get this error:

"P_StartScript: Unknown Script "Cl_Mancubus".

I have the whole menu On and Off defined. Why do i get that? It's just a simple option that jumps to the state if it's on then spawn a baron of hell. Here's the script:

Code: Select all

  Spawn:
 TNT1 A 0 
 Goto CheckSurprise
  CheckSurprise:
TNT1 A 0 A_JumpIf(CallACS("Cl_Mancubus") == 1, "SpawnRegular") 
 Goto Surprise
  SpawnRegular:
 POSS AB 10 A_Look
 Loop 
 Surprise:
 POSS A 4 A_SpawnItemEx("DoomImp", 2,  25, 10)
 Goto SpawnRegular
Any help??
The script name in the ACS source has to be named inbetween quotes, you also need to use #library "insertthenameofthisfile" and create a file named LOADACS having the name of your ACS file. This is called using an ACS library, but real macho men call it Global ACS.

Re: P_Startscript Unknown Script

Posted: Tue Jan 08, 2019 8:40 am
by XASSASSINX
Yeeahhh... Problem is, It's not really a script. It's just a Cvar. I'm studying colorfullhell custom options menu and trying to make my own. First time using it. The script is just a Cvar, not really a

Script 1 open blabla stuff, But still, does that count as script?

Re: P_Startscript Unknown Script

Posted: Tue Jan 08, 2019 9:21 am
by wildweasel
What does your ACS source look like?

Re: P_Startscript Unknown Script

Posted: Tue Jan 08, 2019 11:31 am
by TDRR
Then just use GetCvar instead of CallACS.

The ACS method is only useful if you are going for Zandronum support, otherwise just use GetCvar which is slightly faster than ACS.

Re: P_Startscript Unknown Script

Posted: Tue Jan 08, 2019 4:09 pm
by XASSASSINX
YESSS! That's exactly what i was looking for. "A_JumpIfCvar". I was looking for something like that, but i couldn't find it anywhere. Thanks man!

Re: P_Startscript Unknown Script

Posted: Tue Jan 08, 2019 4:13 pm
by XASSASSINX
No... Wait what?? Is something wrong with the A_SpawnItemEx? Why it still not spawning?

Code: Select all

  Spawn:
 TNT1 A 0 
 Goto CheckSurprise
  CheckSurprise:
TNT1 A 3 A_JumpIf(GetCvar("Cl_Mancubus") == 0, "SpawnRegular") 
 Goto Surprise
  SpawnRegular:
 POSS AB 10 A_Look
 Loop 
 Surprise:
 POSS A 4 A_SpawnItemEx("DoomImpNewAi")
 Goto SpawnRegular
So... Yeah, I'm trying to use like this:

Code: Select all

TNT1 A 0 GetCvar("Ml_mancubus")
Now it goes to Death state (Which i put to on). How do i make it so it does not go there?

Code: Select all

TNT1 A 3 GetCvar("Ml_Mancubus")
 Goto Death

Re: P_Startscript Unknown Script

Posted: Thu Jan 10, 2019 11:46 am
by TDRR
"GetCvar("Ml_mancubus")" Won't work. It HAS to be A_JumpIf(GetCvar("Cl_Mancubus") == 0, "SpawnRegular")

Also this doesn't make much sense, what does each state do? I can't see any sense in this code.

Re: P_Startscript Unknown Script

Posted: Thu Jan 10, 2019 12:57 pm
by XASSASSINX
Okay. Let me break into pieces.

Code: Select all

Spawn:
 TNT1 A 0 
 Goto CheckSurprise
When he spawn, he immediatlys goes to the state that checks the "Surprise" (Spawning imp or no.)

Code: Select all

CheckSurprise:
TNT1 A 3 A_JumpIf(GetCvar("Cl_Mancubus") == 0, "SpawnRegular") 
 Goto Surprise
This state checks the Cvar. If it's on 0, it puts the regular Zombieman spawn state, Otherwise, it goes to the Imp spawning state.

Code: Select all

SpawnRegular:
 POSS AB 10 A_Look
 Loop 
A Crtl+c and Crlt+v of the Zombieman spawn state. Nothing else.

Code: Select all

Surprise:
 POSS A 4 A_SpawnItemEx("DoomImpNewAi")
 Goto SpawnRegular
Now THIS is the state that he spawns the Imp. Or at least he's supposed to. Nothing happens, as if he just goes to the regular Spawn state without checking the Cvar.

Re: P_Startscript Unknown Script

Posted: Thu Jan 10, 2019 5:56 pm
by TDRR
XASSASSINX wrote:Okay. Let me break into pieces.

Code: Select all

Spawn:
 TNT1 A 0 
 Goto CheckSurprise
When he spawn, he immediatlys goes to the state that checks the "Surprise" (Spawning imp or no.)

Code: Select all

CheckSurprise:
TNT1 A 3 A_JumpIf(GetCvar("Cl_Mancubus") == 0, "SpawnRegular") 
 Goto Surprise
This state checks the Cvar. If it's on 0, it puts the regular Zombieman spawn state, Otherwise, it goes to the Imp spawning state.

Code: Select all

SpawnRegular:
 POSS AB 10 A_Look
 Loop 
A Crtl+c and Crlt+v of the Zombieman spawn state. Nothing else.

Code: Select all

Surprise:
 POSS A 4 A_SpawnItemEx("DoomImpNewAi")
 Goto SpawnRegular
Now THIS is the state that he spawns the Imp. Or at least he's supposed to. Nothing happens, as if he just goes to the regular Spawn state without checking the Cvar.
Do you have this CVAR defined in CVARINFO?

Re: P_Startscript Unknown Script

Posted: Mon Jan 14, 2019 4:52 pm
by XASSASSINX
Yeah, here it is:

Code: Select all

user int cl_Mancubus = 1;

Re: P_Startscript Unknown Script

Posted: Mon Jan 14, 2019 8:13 pm
by TDRR
My only advice would be:

In CVARINFO, you should define the cvar as a bool, and replace 1 by "TRUE"
Invert the rules for the toggle: Have it check if cl_mancubus is on 1 and go to surprise if that's the case, if not, go to spawnregular.

If not then you may need to send me the PK3 so i can further investigate the problem, right now there's nothing outright visible that would make it not work.

Re: P_Startscript Unknown Script

Posted: Sun May 19, 2019 11:04 am
by XASSASSINX
Damn its been over a year since i entered here... Anyways, i changed some minor stuff and now it looks like this:

Code: Select all

  Spawn:
 TNT1 A 0 
 Goto CheckSurprise
  CheckSurprise:
TNT1 A 3 A_JumpIf(GetCvar("Cl_Mancubus") == 0, "SpawnRegular") 
 Goto Surprise
  SpawnRegular:
 POSS AB 10 A_Look
 Loop 
 Surprise:
 POSS A 4 A_SpawnItemEx("DoomImpNewAi")
 Goto SpawnRegular
the Cvar Info looks like this:

Code: Select all

user int cl_Mancubus = "1";
And that's it. I don't know any more things to fix. Hovewer there is one more thing that i don't know if i said or not. In the Console whenever i boot up with the mod it says this:

"Could not find autoloaded ACS Library script".

If you wanna the .wad, just tell me.

Re: P_Startscript Unknown Script

Posted: Sun May 19, 2019 12:20 pm
by TDRR
Send it in, and i will tell you exactly what isn't working.

Re: P_Startscript Unknown Script

Posted: Sun May 19, 2019 12:54 pm
by Void Weaver
XASSASSINX wrote:TNT1 A 3 A_JumpIf(GetCvar("Cl_Mancubus") == 0, "SpawnRegular")
This one, in case if the wiki info is correct:
Seems that I got clash with a similar trouble.

So, IIUC in such case you should use GetCVar (ACS) or GetUserCVar instead.
Btw, whenever you spawn monster-actor via _SpawnItem, then better to set appropriate un-safety flag:

Code: Select all

POSS A 4 A_SpawnItemEx("DoomImpNewAi",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)