Fade in Fade out
- Eleven Warrior
- Posts: 736
- Joined: Thu Apr 18, 2013 2:32 pm
- Location: Australia
Fade in Fade out
I was wondering if anyone knows how i can fade out to black then after say 5 seconds it fades back to the game eg: Quest is completed i want it to fade in to black screen the after 5 second the fade in (back to the game)
Re: Fade in Fade out
use
GameMode.fadeIn(color, length)
GameMode.fadeOut(color, length)
e.g.
You might want to think about disabeling the champions during the five seconds of black?
Then use GameMode.setEnableControls(false) - and of course set it back to true afterwards.
GameMode.fadeIn(color, length)
GameMode.fadeOut(color, length)
e.g.
Code: Select all
function fade()
GameMode.fadeOut(0,1)
delayedCall(self.go.id, 5, "fadeBack")
end
function fadeBack()
GameMode.fadeIn(0,1)
end
Then use GameMode.setEnableControls(false) - and of course set it back to true afterwards.
Last edited by THOM on Wed Mar 03, 2021 2:21 pm, edited 1 time in total.
- Eleven Warrior
- Posts: 736
- Joined: Thu Apr 18, 2013 2:32 pm
- Location: Australia
Re: Fade in Fade out
Thom it comes up with the error: attempt to index field 'go' (a functionvalue)
Re: Fade in Fade out
Are you using the code in a script-entity or elsewhere?
EDIT: Ah, and the name of the function has to be set in quotes. Corrected my code above.
EDIT: Ah, and the name of the function has to be set in quotes. Corrected my code above.
- Eleven Warrior
- Posts: 736
- Joined: Thu Apr 18, 2013 2:32 pm
- Location: Australia
Re: Fade in Fade out
Thanks for the help mate