Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Global script setting player role to none
New Topic New Poll Post Reply
Poster Message
averagemoe
Level: Smiter
Avatar
Rank Points: 488
Registered: 03-22-2012
IP: Logged
icon Global script setting player role to none (+1)  
My attempt to put the AE end sequence into a 5.0 cutscene ran into a snag. Apparently when a global script sets the player role to None, the player role returns to Beethro as soon as the player enters a different room, even though all the other script commands seem to work as expected.

All I want is for the player to not appear on screen throughout the majority of the cutscene, and I'd rather not have to add a set player role command to every room involved.

____________________________
There are two types of sheep in the world. Those who jump off a bridge when told to, and those who jump off a bridge when told not to. Don't be either.
03-26-2018 at 07:14 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 3734
Registered: 12-28-2004
IP: Logged

File: Bug Report Global scripts execute too early.hold (4.5 KB)
Downloaded 38 times.
License: Public Domain
icon Re: Global script setting player role to none (+3)  
That's an interesting one. Essentially there was a bug (in my opinion) with how global scripts where processed on room entrance. They used the same code that starts a new script (which is okay), but that also meant they were preprocessed (meaning - run no-move commands) while that was happening. But they were added to the room before the room was fully initialized, and there was later code that caused Beethro's role to be reverted to not-none.

What's worse, later when all monsters were preprocessed the global scripts were preprocessed again. Meaning this script would fix your problem:

Set player role none
Wait 0
Set playyr role none


I've modified this behavior so that global scripts do not preprocess themselves when they are added during room initialization, but only later together with other monsters. I don't suppose it will break anything but we'll see - scripting bugs are the easiest to fix in published holds.

PR

Attached test hold I used to replicate the problem.

____________________________
My website | Facebook | Twitter

[Last edited by skell at 10-12-2020 03:06 PM]
10-12-2020 at 02:58 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5056
Registered: 02-04-2003
IP: Logged
icon Re: Global script setting player role to none (0)  
Yep, definitely a bug. Thank you for the fix!

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
10-14-2020 at 01:11 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 2670
Registered: 07-11-2014
IP: Logged
icon Re: Global script setting player role to none (+1)  
Can confirm that the attached example hold works correctly in 5.1.1.alpha.2020-10-16. The player role is correctly set to None at the start of each room.
10-18-2020 at 11:58 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Global script setting player role to none
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.