Wrong Message Appears in Script

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.
Locked
User avatar
ReX
Posts: 1584
Joined: Tue Aug 05, 2003 10:01 am
Location: Quatto's Palace
Contact:

Wrong Message Appears in Script

Post by ReX »

Here is the scenario:
1. The player enters a room with a boss enemy. The only way out is through a door that requires a security key, which is located in that same room.
2. The door will not open unless the enemy has teleported out of the room ("bosswarp") AND the security key is picked up (SecKey1). [Both "bosswarp" and "SecKey1" are declared in previous scripts.]
3. If the boss has not teleported, using the door gives an access-denied message that "live specimens are present". This should happen even if the player has picked up the key
4. If the boss has teleported and the player has not got the security key, using the door should give an access-denied message that "security key is required"

Here is the script:
Spoiler:
What actually happens is this: After the boss teleports out, but before the player has picked up the security key, using the door incorrectly gives the access-denied "live specimens present" message. It should give the access-denied "security key required" message instead. What am I doing wrong?
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: Wrong Message Appears in Script

Post by Ed the Bat »

This can only happen if bosswarp is still false/0.
User avatar
ReX
Posts: 1584
Joined: Tue Aug 05, 2003 10:01 am
Location: Quatto's Palace
Contact:

Re: Wrong Message Appears in Script

Post by ReX »

I'll check the relevant script for when bosswarp is assigned a true value (i.e., 1). It was working fine until I started changing the script for the partial boss battle in the lab (discussed in a recent thread I started in the Editing forum - I'm using my phone so it's a pain to get the URL). That script has the bosswarp assignment to true

EDIT: I managed to get the link to the boss battle in lab thread. The script in my first post has the original script
User avatar
ReX
Posts: 1584
Joined: Tue Aug 05, 2003 10:01 am
Location: Quatto's Palace
Contact:

Re: Wrong Message Appears in Script

Post by ReX »

I figured out what was causing the problem (although I still don't understand why). I had accidentally commented out a delay (35 tics) right before the "true" assignment to "bosswarp". I uncommented it and the messages display correctly. (As an aside, the messages were displaying correctly before I began messing with the lab battle scripts, so I guessed I had borked something up on that script. The removal of the delay seemed the most logical culprit.)
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US
Contact:

Re: Wrong Message Appears in Script

Post by Ed the Bat »

Glad to know it's all sorted now.
Locked

Return to “Editing (Archive)”