View Full Version: Changing rooms

lassie >>Technical support >>Changing rooms


<< Prev | Next >>

PinkFrangipani- 01-05-2008
Changing rooms
Not sure if this is the right place to ask this but I haven't seen this question addressed anywhere! I'm currently trying to make my character change rooms after a certain animation happens (e.g., an .swf showing my character on his motorbike). So after this short cutscene, I want my character to stand in a new room I configured. I wrote the whole thing in a Sequence: playDia() playAnim('motorbike', 'out', #null, #false) wait(200) changeRoom('library', 'point_library', 6, #null, #null) And it doesn't work! :? Well it works, but the character is stuck in the library with the music from the previous room. He can't walk and the sprites are not active. I'm very confused because the following Sequence (which I wrote yesterday) works just fine: playDia() playAnim('motorbike', 'out', #null, #false) wait(200) changeRoom('office', 'point_office', 4, #null, #null) As you can see they are practically identical. The only difference that the first sequence is called from the TIMe in the Conversation editor, whereas the second is called from the enterRoom TIMes. Must I deduce from this that the changeRoom TIMe doesn't work properly when called from the Conversation editor? If so, what would be the workaround for me problem? Another question I have: is it possible to have 2 changeRoom commands in the same TIMe sequence? (Still thinking on the cutscenes line here) EG: the character gets on his bike -> change room to street -> brief cutscene of the character driving -> change room to library -> the character is standing in the library. As of yet I always get stuck on the street. So that leaves me wondering whether that was possible at all. Thank you very much in advance for your answers :) P.S. Oh and I'm working with Lassie AS btw :!:

NigeC- 01-05-2008

on your cut scene, you will need to add on the last frame stop(); _root.runActions(); better still you can change rooms by using stop(); _root.TIMe.changeRoom('yourroom', 'startpoint', 4, null, null); _root.runActions(); on the last frame TIMes will ignore everything after a changeRoom command, you can set up enterrooms TIMes to play a movie, then change rooms again, but you are better off using the changerooms from within the movie rather than using wait() for the movie to play out

PinkFrangipani- 01-05-2008

Edit: Thanks Nige...I started to reply but...too complicated. I'll dump the cutscene for now. What I really wanted to do (and I don't know if that is possible) is to make the engine Change Rooms automatically depending on the choices my character makes in a conversation. Now, suppose a conversation line went "Go to the library!" with a changeRoom TIMe associated with it and I clicked on that, the character should be standing in the library (forget the cutscene for now). This is working but as stated above, the conversation does not close, although I did write -2 in the line tier. (That was also the reason my character got stuck in the library - I had to resize my player window and discovered the still open conversation!) So, is there anyway to make this conversation close automatically?

NigeC- 01-05-2008

Ah.. right! Bare with me i'll do some -*test*-('")ing :wink: I've never had to change rooms from a convo, but when i do the insult melee i will have to so its no biggie having a look now

PinkFrangipani- 01-05-2008

Cool bananas! I'm awaiting your results with baited breath :P

NigeC- 01-05-2008

okies Your totally right, Lassie totally hangs in the next room, i tried a load of ways, ie making it direct to a sequence first, then changing rooms, making the character move first.. but still no joy upto now the quickest way is to make a small movie, two frames i used three layers script, labels and animation the first frame AS is just stop() labeled frame1 the second frame2: stop(); _root.TIMe.changeRoom('newroom', 'start', 4, null, null); _root.runActions(); I put a square graphic in the animation line just to see the sprite in lassie lol in the room create a sprite for the movie with 2 phases frame1 and frame2 in the convo you just add playDia() changePhase('roomwiththesprite', 'spriteid', 2)

PinkFrangipani- 01-05-2008

You're a genius! You just saved my life! Never would've thought of putting the changeRoom on a sprite phase. Yay, thanks heaps. Onwards!

NigeC- 01-05-2008

Your welcome :D It should fix the animation problems to, just note the TIMes syntax changes slightly in AS, i.e you don't add # in ChangeRoom Also if sound contunies or repeats i make a sound movie the same way with a stopAllSounds(); :wink:

PinkFrangipani- 01-08-2008

Help! All of a sudden, this isn't working any more, although I haven't touched my scripts ever since applying your solution, Nige. All I've been doing is messing with the cursor and the verb disc to customize them. But it's not working with original cursor and verb disc either. "Go to the library"...and my char won't budge. I can do whatever I want. Lassie changes the phase of the helping changeRoom sprite all right, but then just ignores the Actionscript I wrote on that frame. Is that normal? I wonder what I messed up now... do I have to start my whole project over? I've been checking and triple-checking my library and scripts for hours now. I can't find anything wrong. Flash crashed yesterday while Lassie was open, may that have been the reason? Update: I restarted my computer. I downloaded Lassie again. I started my project from scratch with -*test*-('")ed, triple-checked swfs. And it's still not working. The next will be to -*test*-('") it on my old laptop... Update II: The very same game file that wouldn't change rooms anymore on my Computer (where Flash crashed yesterday) works like a charm on my laptop. It's not my bad programming, it's Flash! So I will reinstall the Flash player at least. And to think I should have been spending my day coding PHP...sigh, grumble. Update III, four hours later: I reinstalled Flash 8 and the Flash player and it was no good. I have no idea what is happening. Thank goodness I still have my laptop to work with - I'm praying Flash won't crash on it! Greg, if you know about this bug, I'd be glad for a heads-up on what to do. Thanks.

bigmac- 01-08-2008

This doesn't sound like any Lassie bug that I know of. Sounds like general system stuff. FYI: Flash crashing while Lassie is open won't have any detrimental repercussions. The systems are not intrinsically linked... Lassie just happens to use Flash media. The Flash IDE is its own animal with its own problems.

PinkFrangipani- 01-08-2008

I see...i wasn't sure, since obviously the TIMes that are written on Flash movie frames cannot be read anymore... I didn't know if that was a Lassie problem or an issue caused in Flash! It's very weird that even after reinstalling everything, it still won't work. Anyhow, it's just a medium setback. Thank for your answer, Greg. :)

bigmac- 01-08-2008

I got nothing. When AS doesn't hash I can venture a guess. When your system blows up, I can't even begin to imagine the cause. At the heart of the issue, I really kinda hate computers which is a little ironic given that my profession is so dependent on them.

PinkFrangipani- 01-08-2008

At the heart of the issue, I really kinda hate computers which is a little ironic given that my profession is so dependent on them. That's spoken from the depths of my heart! :roll: :lol:

NigeC- 01-08-2008

Have you tried deleting the swf file and your library and republishing a new one, rather than overwritting.. is there a cached backup version kicking about? you might have enable show hidden files to see it check your Library in Lassie and make sure there isn't two files with the same name Try making a fresh version with a different name Totally agree Greg, i'm starting to hate computers lol, after years of stuggling with second rate PC's i finally get a decent one, now because of Vista, the software that ran slow but worked in the passed, wont work at all now!

PinkFrangipani- 01-08-2008

Yes, when I restarted from scratch it was an entirely new Lassie project directory on my computer...not overwriting anything. The new files and the old files don't work. The only thing that works for now (on my laptop) is the backup I made yesterday before the crash happened. I haven't -*test*-('")ed my new project on the laptop yet. Chances are it works too! check your Library in Lassie Not sure which Library you mean lol...my project files or the Library in the Lassie editor where all things are imported? The only thing that had the same name were two sprites in two different rooms. That didn't seem to be a problem 2 days ago when all was working. Still, I've renamed one and the problem persists. Since I'm under immense pressure to finish game AND hosting site by Saturday 19th (and have exams the day before), I'm giving up on the problem. Thanks for your concern though :) Edit: And I totally agree with you: I should never, ever have bought Vista! I will prize my XP-running old and scratched laptop forever!

Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.