Page 1 of 1

HELP! Can't move characters "at right/left"

Posted: Sat May 08, 2010 4:35 pm
by Sukori
Hey everyone D:
I'm having this one big problem...my characters are overlapping each other.
So i looked it up and it saus to use an "at right" or "at left" statement after the "show" statement.
adding the "at right" or left though does nothing. theyre still overlapping each other.

for example, ive got:
s "mmm....huh?"

show katsy unhappy at right
with fade

everything there works but the AT statement.
My picture for "katsy" is an 800x600 .png picture with everything transparent but character herself (same with all the others)

Can someone shed some light on this for me?
Cause it's hard to progress with such a problem : <
thnx.

Re: HELP! Can't move characters "at right/left"

Posted: Sat May 08, 2010 4:40 pm
by nagirinara
Could you please show the code in the code tags? It'd be easier to understand what the problem is that way.

Re: HELP! Can't move characters "at right/left"

Posted: Sat May 08, 2010 5:02 pm
by Nanashiko
Is your window your running is it on 800 x 600 as well? If so try cropping down the image to something smaller than the window and see if that works.

Re: HELP! Can't move characters "at right/left"

Posted: Sat May 08, 2010 5:20 pm
by Sukori
nagirinara wrote:Could you please show the code in the code tags? It'd be easier to understand what the problem is that way.
I'm sorry, is this what you were looking for? D;

You can place the script of your game in this file.

init:
# Declare images below this line, using the image statement.
# eg. image eileen happy = "eileen_happy.png"
image bg 1 = "bg1.png"
image sukori sleepy = "sleepy.png"
image sukori happy = "happy.png"
image sukori sigh = "sigh.png"
image katsy happy = "kamhappy.png"
image katsy unhappy = "kamunhappy.png"
image katsy bye = "kambye.png"
image walking bg = "walking.png"
image blackout = "blackout.png"
image nikkiblur1 = "nikkiblur1.png"
image nikkiblur2 = "nikkiblur2.png"
image nikki worry = "nikkiworry.png"
image nikki happy = "nikkihappy.png"
image nikki sad = "nikkisad.png"
image nikki excited = "nikkiexcited.png"
image bg hallway = "bghallway.png"

# Declare characters used by this game.
$ s = Character('Sukori', color="#ff0099")
$ k = Character('Katsy', color="#c8ffc8")
$ u = Character('???', color="#99ff66")
$ n = Character('Nikki', color="#99ff66")


# The game starts here.
label start:
scene bg 1
with fade
play music "08 - INTERLUDE.mp3"

s ".......mm..."

k "Hey! Sukori.... Sukori!"
with fade

show sukori sleepy
with dissolve

s "mmm....huh?"

show katsy unhappy at right
with fade

Srry if it's not :/ fairly new to this.
ty

Re: HELP! Can't move characters "at right/left"

Posted: Sat May 08, 2010 5:25 pm
by nagirinara

Code: Select all

You can place the script of your game in this file.

init:
    # Declare images below this line, using the image statement.
    # eg. image eileen happy = "eileen_happy.png"
    image bg 1 = "bg1.png"
    image sukori sleepy = "sleepy.png"
    image sukori happy = "happy.png"
    image sukori sigh = "sigh.png"
    image katsy happy = "kamhappy.png"
    image katsy unhappy = "kamunhappy.png"
    image katsy bye = "kambye.png"
    image walking bg = "walking.png"
    image blackout = "blackout.png"
    image nikkiblur1 = "nikkiblur1.png"
    image nikkiblur2 = "nikkiblur2.png"
    image nikki worry = "nikkiworry.png"
    image nikki happy = "nikkihappy.png"
    image nikki sad = "nikkisad.png"
    image nikki excited = "nikkiexcited.png"
    image bg hallway = "bghallway.png"
    
    # Declare characters used by this game.
    $ s = Character('Sukori', color="#ff0099")
    $ k = Character('Katsy', color="#c8ffc8")
    $ u = Character('???', color="#99ff66")
    $ n = Character('Nikki', color="#99ff66")


# The game starts here.
label start:
    scene bg 1
    with fade
    play music "08 - INTERLUDE.mp3"
    
    s ".......mm..."

    k "Hey! Sukori.... Sukori!"
    with fade
    
    show sukori sleepy 
    with dissolve
    
    s "mmm....huh?"
    
    show katsy unhappy at right
    with fade
Okay, I meant like this... so let me look at it... Here's a couple variables for you use with movement.

Code: Select all

$ move = MoveTransition(1.0)
$ movefast = MoveTransition(0.5)
To get images to "move" you would do something like this.

Code: Select all

show katsy at right with move
I never tried having two "with" attributes, so idk about that. You could also do this:

Code: Select all

show katsy at right with movefast
If you used those variables in your init block, you can use them to move your characters around easily.

Is that what you were looking for?

Re: HELP! Can't move characters "at right/left"

Posted: Sat May 08, 2010 5:32 pm
by PyTom
The problem here is that your character picture is 800x600. Ren'Py tries to move it, but there's really only one place it can fit on the screen, so it doesn't actually move anywhere. If the picture was less than 800 pixels wide, there wouldn't be a problem.

Re: HELP! Can't move characters "at right/left"

Posted: Sat May 08, 2010 5:37 pm
by Sukori
nagirinara wrote:

Code: Select all

You can place the script of your game in this file.

init:
    # Declare images below this line, using the image statement.
    # eg. image eileen happy = "eileen_happy.png"
    image bg 1 = "bg1.png"
    image sukori sleepy = "sleepy.png"
    image sukori happy = "happy.png"
    image sukori sigh = "sigh.png"
    image katsy happy = "kamhappy.png"
    image katsy unhappy = "kamunhappy.png"
    image katsy bye = "kambye.png"
    image walking bg = "walking.png"
    image blackout = "blackout.png"
    image nikkiblur1 = "nikkiblur1.png"
    image nikkiblur2 = "nikkiblur2.png"
    image nikki worry = "nikkiworry.png"
    image nikki happy = "nikkihappy.png"
    image nikki sad = "nikkisad.png"
    image nikki excited = "nikkiexcited.png"
    image bg hallway = "bghallway.png"
    
    # Declare characters used by this game.
    $ s = Character('Sukori', color="#ff0099")
    $ k = Character('Katsy', color="#c8ffc8")
    $ u = Character('???', color="#99ff66")
    $ n = Character('Nikki', color="#99ff66")


# The game starts here.
label start:
    scene bg 1
    with fade
    play music "08 - INTERLUDE.mp3"
    
    s ".......mm..."

    k "Hey! Sukori.... Sukori!"
    with fade
    
    show sukori sleepy 
    with dissolve
    
    s "mmm....huh?"
    
    show katsy unhappy at right
    with fade
Okay, I meant like this... so let me look at it... Here's a couple variables for you use with movement.

Code: Select all

$ move = MoveTransition(1.0)
$ movefast = MoveTransition(0.5)
To get images to "move" you would do something like this.

Code: Select all

show katsy at right with move
I never tried having two "with" attributes, so idk about that. You could also do this:

Code: Select all

show katsy at right with movefast
If you used those variables in your init block, you can use them to move your characters around easily.

Is that what you were looking for?
YES! Thank you very much that did work :>
Very very much appreciated! :D

Re: HELP! Can't move characters "at right/left"

Posted: Sat May 08, 2010 5:39 pm
by nagirinara
No problem, Sukori. =^.^= Glad to help.

Re: HELP! Can't move characters "at right/left"

Posted: Sat May 08, 2010 7:10 pm
by Jake
PyTom wrote:The problem here is that your character picture is 800x600. Ren'Py tries to move it, but there's really only one place it can fit on the screen, so it doesn't actually move anywhere.
To explain further - using the default settings:

- "at center" (default) means "place the sprite's centre in the centre of the screen
- "at left" means "place the sprite's left edge against the left edge of the screen
- "at right" means "place the sprite's right edge against the right edge of the screen.

So if you have an 800x600 sprite in an 800x600 window, the sprite's left edge is against the left edge of the screen, and the sprite's centre is at the centre of the screen, and the sprite's right edge is at the right edge of the screen all at the same time.