Making a move picture script wait for the duration - SOLVED

bishiba

Adept
Veteran
Joined
Apr 6, 2016
Messages
89
Reaction score
11
First Language
Swedish
Primarily Uses
N/A
Hello!

I am using the below code and I am currently replacing all the events in my game that just use the move picture option. However in there you could click the little option "wait for completion", how do I add that in after the script to make it wait? Is it just a normal "wait"?

JavaScript:
$gameScreen._pictures[Loading]._opacity = opacity;
$gameScreen._pictures[Loading]._duration = duration;
EDIT:
Essentially it doesn't work because the codes knock each other out. First the opacity gets set, then the duration triggers, however. What you do is you set targetOpacity and then when you do the duration the duration is what sets the opacity to targetOpacity within the given timeframe.
Code:
$gameScreen._pictures[Loading]._targetOpacity = opacity;
$gameScreen._pictures[Loading]._duration = duration;
So the above works.

Best regards,
Bishiba
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Going to submit to this game jam...struggling with the time crunch...
Have to keep compromising...
Just released a new OST for my game and a new place to purchase it!

Ah, things to do when you finish a game.
Ami
Me: It's dark cloudy! I hope it's Rain…
(2-3 Hours Later,Changed To Sunny)
Me: :kaolivid:
EpicFILE wrote on Dr_Bonehead's profile.
Dr_Bonehead? You're in this forum too? :D
Take a listen to this beautiful 1975 supermarket music. :D

Somehow it makes me think that the actual real world is still at 1970s. What we experience now is just a futuristic dream. :)

Forum statistics

Threads
104,537
Messages
1,007,004
Members
136,029
Latest member
kajusampai
Top