animated teleport in/out of recall list
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.
Re: animated teleport in/out of recall list
Holy moly, that is a clever mind-boggling solution, using a recruit animation. Thanks.Spannerbag wrote: ↑January 1st, 2023, 1:05 pm...Tried again with the CORRECT animation and it seems to work OK, the unittype below works for me with the following code:[/b]
I've changed the WML for the Silver Mage so many times, I think my computer is about to run out of pixels.
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
Re: animated teleport in/out of recall list
I tried playing your campaign and I couldn't see anything before the animation, but then I made a screen recording and played it in slow motion...Celtic_Minstrel wrote: ↑December 30th, 2022, 3:25 pm This is pretty much identical to what I do in Black Cross of Aleron
Last edited by gnombat on January 23rd, 2025, 1:17 pm, edited 1 time in total.
Re: animated teleport in/out of recall list
Whoa! The unit blinked in and out!gnombat wrote: ↑January 1st, 2023, 5:46 pm I tried playing your campaign and I couldn't see anything before the animation, but then I made a screen recording and played it in slow motion...
Maybe the code for teleport animation has never worked as intended?
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
Re: animated teleport in/out of recall list
It is possible that a combination of the CPU power, the monitor's refresh rate, and the subjective vision of the eye results in one people see flickering and other people not.
- Celtic_Minstrel
- Developer
- Posts: 2371
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: animated teleport in/out of recall list
What version of the game is that in?gnombat wrote: ↑January 1st, 2023, 5:46 pmI tried playing your campaign and I couldn't see anything before the animation, but then I made a screen recording and played it in slow motion...Celtic_Minstrel wrote: ↑December 30th, 2022, 3:25 pm This is pretty much identical to what I do in Black Cross of Aleron
Re: animated teleport in/out of recall list
That was 1.14.17.
- Spannerbag
- Posts: 759
- Joined: December 18th, 2016, 6:14 pm
- Location: Yes
Re: animated teleport in/out of recall list
Thought you'd appreciate it

Re: animated teleport in/out of recall list
This issue can be easily solved with a new [unhide_unit] code. The original [unhide_unit] code has a [redraw] tag in the end. So that's why the unit appear before displaying the animation; when it doesn't appear it's because your computer is absurdly fast. Below is a new code without the [redraw] tag.
You just have to scroll the screen before unhiding it; otherwise the scroll will redraw the screen.
I'm using this on my campaign to teleport several units at once. If you're recall the unit, you have to hide it and then unhide again. The wiki says the [recall] tag uses the same attributes as [unit] tag. So hidden=yes should work fine! Recall it hidden, scroll, unhide (new code - without redraw) and animate.
Code: Select all
[lua]
code = <<
function wesnoth.wml_actions.new_unhide_unit(cfg)
for i,u in ipairs(wesnoth.units.find_on_map(cfg)) do
u.hidden = false
end
end
>>
[/lua]
Code: Select all
[scroll_to]
x= LOC X
y= LOC Y
[/scroll_to]
[new_unhide_unit]
id= UNIT
[/new_unhide_unit] #It won't redraw.
[animate_unit]
#blah blah blah
flag=post_teleport
[/animate_unit]