Function: renpy.imagemap result tag question

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Zero_Profile
Newbie
Posts: 6
Joined: Mon Feb 17, 2014 12:22 am
Contact:

Function: renpy.imagemap result tag question

#1 Post by Zero_Profile »

What i'm trying to do is navigate

BG is outside a house click on gate and it removes the BG and enters entryway scene NEW BG then I can make this a imagemap so can further navigate the house

Code: Select all

label hs000_001:
    
$ result = renpy.imagemap("Images/bg/hs000/hs018.jpg", "Images/bg/hs000/nav/hs018nav.jpg", [
                           (555, 296, 819, 548, "entryway")
                          ])

if result == "entryway":
    
    scene hs015

    return
I used show as well but no dice

I might be doing this completely wrong but It works up to the point result comes up, when I click it with the mouse it does not give me

scene hs015

its skipping to scene black

event being called from here

Code: Select all

# The game starts here.
label start:

#intro start--------------------------------------------

    call hs000_001
    
#intro end----------------------------------------------


# scene bg start----------------------------------------

    scene black
    
# fx000
    call starfield
    
# fx001
    call mistfield
    
# ani000
    show earth core animated:
        zoom 1.7
        truecenter
        
# scene bg end-------------------------------------------

Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: Function: renpy.imagemap result tag question

#2 Post by Asceai »

Unless I'm missing something, this is how the flow of execution would go:

Code: Select all

label start:
    call hs000_001
$ result = renpy.imagemap("Images/bg/hs000/hs018.jpg", "Images/bg/hs000/nav/hs018nav.jpg", [
                           (555, 296, 819, 548, "entryway")
                          ])
if result == "entryway":
    scene hs015
    return
    scene black
    call starfield
    call mistfield
    show earth core animated:
        zoom 1.7
        truecenter
So 'scene hs015' is run, but 'scene black' is run immediately after so you never actually see scene hs015. If you put something like:

Code: Select all

"testing"
or

Code: Select all

pause
after 'scene hs015' that should make it stick around long enough for you to see it. I'm not really sure what you're trying to accomplish here though.

Zero_Profile
Newbie
Posts: 6
Joined: Mon Feb 17, 2014 12:22 am
Contact:

Re: Function: renpy.imagemap result tag question

#3 Post by Zero_Profile »

and interactive background

I made my image and of a house / and when you mouse over the door the door opens / then when you click you go inside / this way I can use the image map to create interactive BG

is their a way to pause it until the user clicks on something to progress the story?

Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: Function: renpy.imagemap result tag question

#4 Post by Asceai »

I don't see how you have any code to do that though. There is only one call to imagemap here. What else should happen after 'scene hs015'?
The way the code is at the moment, that scene will be shown, but it will be immediately replaced with 'scene black' before you get to see it.

Zero_Profile
Newbie
Posts: 6
Joined: Mon Feb 17, 2014 12:22 am
Contact:

Re: Function: renpy.imagemap result tag question

#5 Post by Zero_Profile »

working on that this cleared what I needed to achieve it

with the testing I found a way by placing a placeholder saying entryway it would not go to the next scene till I click with the mouse

this will serve my purposes

then i can make another call to another label with a different location and so on

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], henne