This 'if' is true in GZD but not in QZandronum.

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!)
Post Reply
User avatar
Ravick
Posts: 2045
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

This 'if' is true in GZD but not in QZandronum.

Post by Ravick »

Hi there.

I'm working in a map and the team ask me to keep it compatible with QZandronum, so I test it in both GZDoom and QZan.

We have a custom skill level as follows:

Code: Select all

skill neiguimere	//don't ask
{
   SpawnFilter = hard//5
   SpawnMulti
   Name = "NEIGUIMERE" //PicName = "M_FRAMI"
   TextColor = "black" //because Qzan actually shows it in the menu
   Key = "9"
   MustConfirm = "face the neiguimere"
   ACSReturn = 100
   PlayerRespawn
   NoMenu //Doesn't work in QZan
}
And in the map, I have a script with this check:

Code: Select all

//In coop or neiguimere, spawns um cybie, nimps and some ammo.
//I've made it this way because in QZAn actors tagged as mp-only does not show in neiguimere

If ((GameType() == GAME_NET_COOPERATIVE) || (GameSkill () == 100))
 {
	 //do stuff
 }
The check shoul '//do stuff' if the map is being played in cooperative or if it is being played in the skill neiguimere.
In GZDoom, the //do stuff part happens normally, but not in QZAndronum. I guess I'm missing some crucial difference between the two source ports, but what difference is it? And how could I get ir working in QZAndronum?

Thanks in advanced. :)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: This 'if' is true in GZD but not in QZandronum.

Post by Graf Zahl »

As a first step, which of the two sub-expressions fails? And what does GameSkill() return in Zandronum?
User avatar
Ravick
Posts: 2045
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

Re: This 'if' is true in GZD but not in QZandronum.

Post by Ravick »

The GameSkill() returns 100 properly, but I'm guessing the sub-expression that fails is the second one despite of it, because I actually don't know how to test a map in coop mode in single player in Zandronum (in GZDoom I just use 'map mapname coop' in the console, but it seems to not work in (Q)Zandronum).


I've made a small 'excerpt' of the map in question and adapted it to run as map01 here in hope that it may help. In the starting room, there is a switch that prints the current game skill, another that restart the level in skill 100 (and also another that attempts to set the skill to 100, but it does not work and can be ignored).

In the second room there are a 3 imps (and 2 revs, if skill 100 works properly), that, once killed, trigger an script to open a door to the next room. Entering the door, a very short cut scene happens, after which another door opens and an archvile enters it. If the script works fine (i.e. in GZDoom), nearly 3 seconds after it, a cyberdemon should spawn at the same door the archvile came from.

I'm lost here. I guess I'm missing something about Zandronum as I usually don't map for it. Thanks for helping.
Blue Shadow
Posts: 5039
Joined: Sun Nov 14, 2010 12:59 am

Re: This 'if' is true in GZD but not in QZandronum.

Post by Blue Shadow »

Okay, what value does GameType() return when testing with Q/Zandronum in coop (tell your teammates to test it for you in coop)?
Post Reply

Return to “Scripting”