Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.


Visit our new games list, blog aggregator, IRC, and wiki.
Activation problem? Email [email protected]
It is currently Wed Jun 19, 2013 12:00 am

All times are UTC - 5 hours [ DST ]


Forum rules


Ask questions about one topic per thread, and use a descriptive subject. "NotImplemented error in script.rpy" is a good subject, "Tom's problems" is not. Remember to include all of traceback.txt or error.txt when reporting a problem, as well as the relevant lines of script. Use the [code] tag to format scripts.



Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Sat Feb 04, 2012 5:20 pm 
Newbie
User avatar

Joined: Sat Feb 04, 2012 2:28 pm
Posts: 3
Hello, I seem to have royally confused the code of my game.

I started out making my game with an old version of Renpy with a different way of making screens and imagemaps. I decided to move everything over to stay updated (but mostly because I wanted a music room), and now I'm running into some problems getting used to the new ways of doing things...

First of all, my main menu has both an imagemap and snowblossom. With the new "Renpy screens" using the preset buttons, it obviously worked fine. But when I tried to use an imagemap like so:

Code:
        hotspot (652, 318, 787, 365)action Start()
        hotspot (652, 368, 787, 421) action ShowMenu('load')
        hotspot (652, 426, 799, 514) action ShowMenu('preferences')
        hotspot (636, 472, 540, 353) action Help()
        hotspot (652, 516, 789, 553) action ShowMenu("music_room")
        hotspot (672, 559, 770, 594) action Quit(confirm=False)


The imagemap worked great, but Snowblossom would no longer work.

I then tried to make parts of my imagemap transparent, but I couldn't get that to work either. It just showed the ground-level buttons with no menu picture in the background.

Finally, I checked this thread: viewtopic.php?f=4&t=4677 And did this:

Code:
        mm_root = Fixed(
        Image("titlescreen.png"),
        SnowBlossom("snow3.png", count=70, xspeed=(15, 35), yspeed=(55, 75), start=10)),    layout.imagemap_main_menu("menunull.png", "menuhover.png", [
        (652, 318, 787, 365, "Start Game"),
        (652, 368, 787, 421, "Load Game"),
        (660, 423, 772, 466, "Preferences"),
        (643, 469, 798, 512, "Help"),
        (652, 516, 789, 553, "music_room"),
        (672, 559, 770, 594, "Quit"),
        ])


Imagemap and snowblossoms worked like an absolute charm! BUT... I can no longer get to my music room, the game just crashes and shuts down without a traceback, and all the Renpy help pages are centered around using the new code, not the old one. :(

If someone could tell me how to get snowblossoms to work, or how to get my music room imagemap function to work, that'd be swell.

Also, using this code above, no sound effect plays upon clicking the working buttons on the imagemap. If I continue to use this code, how do I give it a "clicking" sound?

Any help would be greatly appreciated. This is driving me crazy.


Last edited by World on Sat Feb 04, 2012 9:16 pm, edited 1 time in total.

Top
 Profile Send private message  
 
PostPosted: Sat Feb 04, 2012 7:26 pm 
Regular
User avatar

Joined: Fri Jul 02, 2010 3:03 pm
Posts: 107
Projects: That's The Way The Cookie Crumbles
Organization: TwinTurtle Games
Screen-based imagemaps cover everything else on screen by default. (makes them so difficult to work with >_<)

Try defining the animation inside the imagemap, like this.

Code:
imagemap:
   
  add SnowBlossom("snow3.png", count=70, xspeed=(15, 35), yspeed=(55, 75), start=10))

  #define ground/hover images and hotspots


Top
 Profile Send private message  
 
PostPosted: Sat Feb 04, 2012 8:03 pm 
Newbie
User avatar

Joined: Sat Feb 04, 2012 2:28 pm
Posts: 3
Just the way you had it?

Code:
    imagemap:
        add SnowBlossom("snow3.png", count=70, xspeed=(15, 35), yspeed=(55, 75), start=10))
        ground 'menunull.png'
        hover 'menuhover.png'
       
        hotspot (652, 318, 787, 365)action Start()
        hotspot (652, 368, 787, 421) action ShowMenu('load')
        hotspot (652, 426, 799, 514) action ShowMenu('preferences')
        hotspot (636, 472, 540, 353) action Help()
        hotspot (652, 516, 789, 553) action ShowMenu("music_room")
        hotspot (672, 559, 770, 594) action Quit(confirm=False)


No, it won't boot. Without "add Snowblossom(etc..)" it boots, but once it's added, it doesn't boot at all with no traceback. Are you sure "add" is the right code...?

-------
EDIT:

Wow, I'm not sure what happened, but when I added the # sign, it miraculously worked. Which confuses me and makes literally no sense, but hey. I have no idea what's going on but it does, music room and everything. That exact code. I promise it wasn't working before, but now it does, so there we go.

So... Thank you so much! :D I really, really appreciate it.

However, clicking noises still aren't working. Any ideas on how to fix it?


Top
 Profile Send private message  
 
PostPosted: Sat Feb 04, 2012 8:53 pm 
Regular
User avatar

Joined: Fri Jul 02, 2010 3:03 pm
Posts: 107
Projects: That's The Way The Cookie Crumbles
Organization: TwinTurtle Games
Hmm...toss this at the bottom of 'options.rpy'.

Code:
style.hotspot.activate_sound = "mysound.wav"


Top
 Profile Send private message  
 
PostPosted: Sat Feb 04, 2012 9:13 pm 
Newbie
User avatar

Joined: Sat Feb 04, 2012 2:28 pm
Posts: 3
Beautiful! Worked like a charm. Thank you so very much! :D


Top
 Profile Send private message  
 
PostPosted: Thu Feb 16, 2012 8:03 pm 
Regular

Joined: Mon Jan 26, 2009 7:21 pm
Posts: 44
Maybe it doesn't worked before due to the DAMNED extra parenthesis at line end c_C? I say that just 'cause it's a very good resource, and do "past/copy" can mislead people :D. Tried with

Code:
add SnowBlossom("snow3.png", count=70, xspeed=(15, 35), yspeed=(55, 75), start=10)


and worked FINE from the start. The error was the double parenthesis after start=10. You can remove the #COMMENT safely.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: chewpower, xela


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group