[Lock_View] Usage
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
[Lock_View] Usage
Trying to get back into Wesnoth and tinkering away at various projects.
So, I'm trying to lock the camera in place while a "cutscene" plays. However, attempting to use [lock_view] simply skips over the entire cutscene. The following is an except of the event, but the full file is attached if you want to see the full thing.
What am I doing wrong?
So, I'm trying to lock the camera in place while a "cutscene" plays. However, attempting to use [lock_view] simply skips over the entire cutscene. The following is an except of the event, but the full file is attached if you want to see the full thing.
What am I doing wrong?
Code: Select all
[scroll_to]
x,y=30,38
[/scroll_to]
[lock_view]
{MOVE_UNIT (id=Tudok) 28 38}
[message]
speaker=Tudok
message = _ "Milord, the two enemy armies have arrived. Crossroads Keep has been taken by Covos while Nightfall Keep was captured by Rhade. They seem to be regrouping for another push forward."
[/message]
[message]
speaker=Mycen
message = _ "I see. The front line must hold out long enough for our reinforcements to arrive. Then we can begin a fighting retreat back to Winterfell and hope we can outlast their onslaught."
[/message]
[message]
speaker=Sire
message = _ "...and there were many more messages cut out for the sake of time and space."
[/message]
{MOVE_UNIT (id=Lann) 30 37}
{FLASH_WHITE ({TELEPORT_UNIT (id=Syris) 31 38})}
[message]
speaker=Syris
message = _ "Sir, I regret to inform you that Orcs have been spotted near the Eternal Valley. While we have dealt with their scouts, I expect a larger force to be arriving in about two days."
[/message]
{MOVE_UNIT (id=Denvan) 31 39}
[message]
speaker=Denvan
message = _ "Baron Mycen. Greetings. I am Denvan of the Nighthawks. If you would have us, we would like to join your cause."
[/message]
{LOYAL_UNIT 1 (Outlaw) 32 38}
{LOYAL_UNIT 1 (Bandit) 32 39}
{LOYAL_UNIT 1 (Rogue) 31 40}
[message]
speaker=Mycen
message = _ "For Winterfell! For Esteria! Forward!"
[/message]
[/lock_view]
[unlock_view]
[/unlock_view]
- Attachments
-
- 01_Red_Winter.cfg
- (46.94 KiB) Downloaded 162 times
Current Projects: [Sire's Scenarios] || [Red Winter Reborn]
- Pentarctagon
- Project Manager
- Posts: 5564
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: [Lock_View] Usage
Have you tried doing just
[lock_view][/lock_view]
, instead of putting the contents of your cutscene inside the [lock_view]? My guess would be that [lock_view] takes no subtags, and so everything inside [lock_view] in your code snippet is just ignored.99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: [Lock_View] Usage
Placing the
[lock_view][/lock_view]
next to each other does not work. The camera remains unlocked and the game tracks unit movements instead of staying in the "cutscene area."Current Projects: [Sire's Scenarios] || [Red Winter Reborn]
Re: [Lock_View] Usage
That is how it works though, as Pentarctagon said, you should place the opening and closing tags of lock_view next to each other, without subtags, and the actions should follow then.
According to the wiki, it only restricts camera movements from the player, so the game will still track unit movements by WML, explicit scroll_to's and stuff like that. I didn't look into your scenario in depth, but my suggestion is that if you're moving units that are off-screen from where you want to lock the camera, then just use
Or, a probably even better alternative could be
EDIT:
I looked it up, and
According to the wiki, it only restricts camera movements from the player, so the game will still track unit movements by WML, explicit scroll_to's and stuff like that. I didn't look into your scenario in depth, but my suggestion is that if you're moving units that are off-screen from where you want to lock the camera, then just use
[teleport]
instead of {MOVE_UNIT }
. It's just a guess, but that probably won't be tracked by the camera, and it should stay where you locked it.Or, a probably even better alternative could be
[move_unit_fake]
(storing the unit, using this, then unstoring the unit at the new location). It has the force_scroll
key, which can disable map-scrolling when [lock_view
is in effect, which I think is just the solution for your issue.EDIT:
I looked it up, and
[move_unit]
has force_scroll too. So ignore my original guessing, and it's just that you should replace all your {MOVE_UNIT id x y}
with:
Code: Select all
[move_unit]
id=id
x=x
y=y
force_scroll=no
[/move_unit]
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Re: [Lock_View] Usage
Thanks for the help! Everything works now after I created a "new" macro that removes the scrolling for unit movement.
I started suspecting that moving units had force scroll and may have went with the fake unit movement, but making a modified version of the existing
Thanks again for the assistance!
I started suspecting that moving units had force scroll and may have went with the fake unit movement, but making a modified version of the existing
MOVE_UNIT FILTER TO_X TO_Y
macro helps immensely for my purposes.Thanks again for the assistance!
Current Projects: [Sire's Scenarios] || [Red Winter Reborn]