The Daily Click ::. Forums ::. Klik Coding Help ::. Sliding dialogue boxes
 

Post Reply  Post Oekaki 
 

Posted By Message

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
4th August, 2014 at 04/08/2014 18:43:34 -

I have a (probably unnecessary) sliding movement for my character portraits and dialogue box as they fade onto the screen. This is done using path movement, though I knew it'd give me issues before hand.

Here's an example of what happens when the player quickly activates and deactivates it in-game:


I tried moving it's X position instead (and trying to forbid movement past so many pixels left of the frame) but it didn't work, and moved too fast. It's currently activated when you're overlapping an NPC detector. A Flag turns on/off depending on whether you're overlapping the NPC detector, then starts the movement and adjusts the fade.

It's an unnecessary effect, but it just gives it a bit more life. Can you think of any better way of getting this working securely?

Edited by -Liam-

 
Image

Tell 'em Babs is 'ere...

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
5th August, 2014 at 05/08/2014 04:11:36 -

I originally thought your error was regarding the text being overlapped with the brick-like background. Then I laughed out loud when I saw the player-character's portrait slowly inching across the screen...!

Is there a key-press (like UP ARROW or UP on the joypad) that can trigger this effect instead? You may be able to reset things to their starting positions a little easier if you do that.

Have you moved the portrait to an upper/foreground layer? You may be able to keep one layer independent of the other, and lock that layer to the window position instead of the position in the game frame - like following the position of the camera object/player instead.

Not sure if I'm making sense here...but see if any of it resonates. Good luck solving this!

 
n/a

nim



Registered
  17/05/2002
Points
  7233
5th August, 2014 at 05/08/2014 09:06:39 -

I like the effect. It looks like you just need to reset its position when it's activated. Possibly with an "Only one time while event loops" condition.

Edited by nim

 
//

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
5th August, 2014 at 05/08/2014 13:44:11 -

One other thing to try is to check if the NPC detector is overlapping the player object; if not, it sets the portrait position to the start point.

If that doesn't work, try checking for the flag to be tripped. If it seems jerky when the portrait disappears, have the portrait disappear/fade out quicker on the transition.

 
n/a

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
6th August, 2014 at 06/08/2014 14:51:21 -

Thanks guys, much appreciated input.

 
Image

Tell 'em Babs is 'ere...
   

Post Reply



 



Advertisement

Worth A Click