Changing skies in mid-game (GZDooM).....?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
ReX
Posts: 1584
Joined: Tue Aug 05, 2003 10:01 am
Location: Quatto's Palace

Changing skies in mid-game (GZDooM).....?

Post by ReX »

Here's what I want to do:
  • 1. The player gets through a part of a hub, during which it is around noon time (using a skybox with daylight skies).
    2. The player re-enters one of the maps in the hub, and the sun is going down so that the player continues the game in late afternoon (using a skybox with pre-dusk skies).
I have two sets of skies, set up so that they display correctly. In other words, I know that both skies work. I have set up a linedef that triggers a script as follows:

Script 1 (void)
{
ChangeSky(Noon1, Evening1); //(Noon1 and Evening 1 are the sky names, as defined in GLDEFS)
}

Unfortunately, when I activate the script, instead of the sky changing I get the following error message in-game:

P_Startscript: Unknown Script 1

Nothing else happens (i.e., the game does not crash, etc.) Incidentally, MAPINFO assigns sky1 to both Noon1 and Evening 1.

Any suggestions?
User avatar
Enjay
 
 
Posts: 27556
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Changing skies in mid-game (GZDooM).....?

Post by Enjay »

That error message is the one you get when you don't actually have a script 1 in your behavior lump. It's not specific to the changesky command. I would expect to get that if I had triggered a linedef with script 1 attached, but did not actually have a script 1 compiled in my behavior lump. Are you sure it compiled and saved to the WAD?

Also, as an aside, unless you are trying to make (G)Zdoom use two skies (for the various 2 sky special effects that are possible) you only need to do this:

changesky ("Evening1", "");

to change from whatever sky is currently being used to "Evening1".

This in the Wiki
void changesky (str sky1, str sky2);
refers to sky1 and sky2 like the sky1 and sky2 defined in MAPINFO. It isn't indicating the sky that you change from and the sky you change to. So, unless you have some doublesky effect setup, even if your script runs, if the level is showing Noon1, it will still show Noon1 after the script has run.
User avatar
ReX
Posts: 1584
Joined: Tue Aug 05, 2003 10:01 am
Location: Quatto's Palace

Re: Changing skies in mid-game (GZDooM).....?

Post by ReX »

Greetings, Nigel. Do you recall the set of desert skies you sent me, representing the different times of day? Well, I wanted to test out the ChangeSky script and decided to modify your wad. Knowing that DeepSea does not include compiled scripts in the wad, I created a script from scratch in WadAuthor and compiled it into the wad. I know it's in there because I opened the modified wad with XWE and confirmed that it's in there.

I modified the script again, using the information you posted. Still the same problem. Go figure.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Changing skies in mid-game (GZDooM).....?

Post by Graf Zahl »

If you get that error, there is no script 1 in your WAD, it's really that simple.
User avatar
Enjay
 
 
Posts: 27556
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Changing skies in mid-game (GZDooM).....?

Post by Enjay »

Try the attached file. It works for me. Then remove the two textures from my WAD and try loading it on top of your own resources. It should still work, but using the skyboxes you have defined.
User avatar
ReX
Posts: 1584
Joined: Tue Aug 05, 2003 10:01 am
Location: Quatto's Palace

Re: Changing skies in mid-game (GZDooM).....?

Post by ReX »

Enjay wrote:Try the attached file. It works for me. Then remove the two textures from my WAD and try loading it on top of your own resources. It should still work, but using the skyboxes you have defined.
Yes, indeed, your wad works just fine. However, as soon as I make a change to the script (e.g., changing the script number) and compile it the switch stops working and I get the old P_Startscript error. I figured it must have something to do with the new version of ACC that I am using. I had downloaded it from the link in Randy's post on the main page, not considering that it might not work for WA. Sure enough, when I checked the Downloads page today I discovered that it was not intended for WA. I reverted to v1.46 and all's well.

Thanks for your help.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Changing skies in mid-game (GZDooM).....?

Post by Graf Zahl »

:laff:

Isn't that a telling sign about WadAuthor that not even updated ACC's are compiled for it anymore?

Have you ever considered upgrading your editor to something a bit more modern? ;)

I can tell you right now when DB2 gets out there may be lots of new features that will require UDMF map format (moreso in GZDoom than in ZDoom itself) because there's just no way to force it all into the current binary format anymore. There's so many things I'd like to add but have held back because the only way to gain access to them would have been hacks.
User avatar
Cutmanmike
Posts: 11355
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom

Re: Changing skies in mid-game (GZDooM).....?

Post by Cutmanmike »

I'll only ditch wadauthor when DB2 gets the "Wadauthor-like-building" plugin!
User avatar
ReX
Posts: 1584
Joined: Tue Aug 05, 2003 10:01 am
Location: Quatto's Palace

Re: Changing skies in mid-game (GZDooM).....?

Post by ReX »

Graf Zahl wrote:Isn't that a telling sign about WadAuthor that not even updated ACC's are compiled for it anymore?
Indeed, and regrettably so. But I quite understand the reasons.
Have you ever considered upgrading your editor to something a bit more modern?
Actually, I use DB and XWE for some of their respective features. I have even used DB for limited map creation. I may get around to learning it sufficiently to create complete maps.
I can tell you right now when DB2 gets out there may be lots of new features that will require UDMF map format (moreso in GZDoom than in ZDoom itself) because there's just no way to force it all into the current binary format anymore. There's so many things I'd like to add but have held back because the only way to gain access to them would have been hacks.
I'm sure that if my need is great enough I will try to master other tools. For now, I am so deep in my current project that switching map editors would unnecessarily delay its development.
User avatar
Enjay
 
 
Posts: 27556
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Changing skies in mid-game (GZDooM).....?

Post by Enjay »

Glad you got it sorted.

I remember something about this to do with WA going back, well, years actually. Something like it didn't work if you tried to get it to run windows versions of certain tools (possibly ACC) but was fine with DOS versions of the same tool. :?:
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Changing skies in mid-game (GZDooM).....?

Post by Graf Zahl »

That's - to be blunt - because the creator was an idiot and instead of implementing a proper way to launch the tools he hacked around untik his shitty DOS tools were working - and nothing else. It still baffles me how he managed to do that as it is not easy to screw up Windows like that.
User avatar
Cutmanmike
Posts: 11355
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom

Re: Changing skies in mid-game (GZDooM).....?

Post by Cutmanmike »

Wadauthor is oooold though. It was probably made with the intention of compiling scripts for hexen and nothing more. I wish he released the source code and didn't want people to pay for it, that way maybe it would still be used by many today if someone upgraded it a bit. Also I never understood why it was in memory of someone.

Heh, searching for it on google gives you a whole load of crack and serial websites. You can't even buy this thing anymore!
User avatar
Enjay
 
 
Posts: 27556
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Changing skies in mid-game (GZDooM).....?

Post by Enjay »

Cutmanmike wrote:Also I never understood why it was in memory of someone.
IIRC it was in memory of the authors father, who commited suicide.

Return to “Editing (Archive)”