Author Topic: MODULE: Smooth Scrolling & Parallax v1.7.1  (Read 54967 times)

Re: A Smooth Scrolling & Simple Parallax Module (Updated)
« Reply #20 on: 07 Jun 2008, 20:36 »
Hi,
I have imported the module in my game. Then, in the room I want parallax objects, I have put my backgrounds objects, and click on "properties" in the first one.
I have created the property "PxPos - number - default value 0".
Then I choosed for each objects -1, -2 or -3, depending of the distance.
I have add "ParallaxOn()" in the "before fade in" script, and "ParallaxOff()" in the "player leaves room" script.
But when I run the game, I have this error message :



I have 14 objects and they are animated, is that a problem ?

Please help !

Re: A Smooth Scrolling & Simple Parallax Module (Updated)
« Reply #21 on: 09 Jun 2008, 07:55 »
It seems that I have put too many objects in the room. After deleted some of them, it works.

Ali

  • What will become of the baron?
    • Ali worked on a game that won an AGS Award!
    •  
    • Ali worked on a game that was nominated for an AGS Award!
Re: A Smooth Scrolling & Simple Parallax Module (Updated)
« Reply #22 on: 09 Jun 2008, 11:27 »
There is an arbitrary limit of ten parrallax objects. It is possible to increase the number of objects in the module. I think I've added notes along with the scripting. Basically changing the 10s to 15s ought to work.

It's a while since I've had time to work on this module, but I should be able to upload an updated version with a wider variety of object speeds soon. I'll increase the number of objects too.

Re: A Smooth Scrolling & Simple Parallax Module (Updated)
« Reply #23 on: 09 Jun 2008, 11:43 »
That would be great, thank you  :)
But it's ok for me as it is now.
Thank you for this very interesting module !

Ali

  • What will become of the baron?
    • Ali worked on a game that won an AGS Award!
    •  
    • Ali worked on a game that was nominated for an AGS Award!
Re: A Smooth Scrolling & Simple Parallax Module (Updated)
« Reply #24 on: 10 Jun 2008, 09:53 »
See first post for an update.

Whilst i was using the module I had this object with Px property value of -2. So I wanted this object to be interactable. StopScrolling didn;t use and parallax off closed all objects with px value. So I've created a small code that can be used..in order to walk near an object. Parallax is still on whilst you walk.

Thanks for explaining the module to Marion. I don't quite follow this message though. Have you spotted a bug? Could you let me know how you've dealt with it?

I'm sorry but I need help again.
I have begun another game using the scrolling module.
All works well, the effect is great.
But when I leave the room, and re-enter the room, the parallax objects have disappeared ! All the other objects, the ones that don't move, are still there.
I really don't understand why.
I tried using different sizes objects, adding object
  • .SetPosition(x,y) in Before Fade-in script, etc, but nothing, they always disappear when I leave and enter the room the second time.

Please help ! :(

Ali

  • What will become of the baron?
    • Ali worked on a game that won an AGS Award!
    •  
    • Ali worked on a game that was nominated for an AGS Award!
Hi Marion,

I'm sorry, I can't seem to recreate that problem, though I'm sure it'll be something wrong with my scripting.

Does the demo game work correctly when you change rooms (by interacting with the bar door)? If the demo game works, you could try uploading your game files for me to look at if you wanted. Also, which version of AGS are using?

Hi,
the demo game works well.
In fact, I used AGS 2.72 first, but I tried AGS 3 to see if it's ok, but I had the some problems. So I think it's because the template I used. I have made the game again from the beginning with the default template, and now it seems to work.

Well... It still doesn't work :(
I use less objects, I add code "object[].Setposition(x,y)" in Before Fade-In, After fade-in, when using the door, I tried object[].X and object[].Y instead of Setposition, but objects still disappear and are placed anywhere when I change room.
I don't know what to do :(
Can I send you my game in order that you can have a look at it, and see what is wrong ?
Thank you very much. My game will be really less interesting without this scrolling effect. And I wanted it to work for the second part of "Dread Mac Farlane".

Ali

  • What will become of the baron?
    • Ali worked on a game that won an AGS Award!
    •  
    • Ali worked on a game that was nominated for an AGS Award!
Hi,

I've uploaded an update (see first post) which should solve Marion's problem. It seems the old script didn't allow for parallax objects to be created after static objects in the AGS editor. Hopefully that is fixed now.

Let me know if you spot any other issues,

- Ali.

That's great ! I try it, thank you :)

EDIT : It seems to work now ! The objects don't disappear and stay in the same place when I leave and enter the room again. Thank you very much :)
« Last Edit: 14 Jun 2008, 14:30 by Marion »

gypsysnail

  • Snails and cream
    • I can help with animation
    • I can help with backgrounds
    • I can help with characters
    • I can help with proof reading
    • I can help with story design
    • I can help with web design
Hey thats a good module, thanks, have added it to my collection of modules in the hope of using it for one of my games in the near future. I also want to ask (off the topic a bit sorry) - that screenshot at the start of the thread with the crazy? looking doctor and a blue car and golf clubs, what game was that from please? As it looks like a game I'd really like to play.
Believe in afterlife! It's true in a metamorphical way ;)
Ken & Roberta - my inspiration!! 20 years.
U are what you love doing and passionate about - keep up what you love most.

Gilbert

  • Local Moderator
  • * KILL* * KILL * * KILL *
    • Lifetime Achievement Award Winner
You play adventure games and don't know what DOTT was? How can that be?

just kidding. ;D

gypsysnail

  • Snails and cream
    • I can help with animation
    • I can help with backgrounds
    • I can help with characters
    • I can help with proof reading
    • I can help with story design
    • I can help with web design
Lol thanks Gilbot ;). Yep sometimes I'm very bad with remembering names and yep I have heard of that game b4 just not the abbrevation for it. Thanks once again and I will go look at the link you gave me! Excited already!!
Believe in afterlife! It's true in a metamorphical way ;)
Ken & Roberta - my inspiration!! 20 years.
U are what you love doing and passionate about - keep up what you love most.

hedgefield

  • Oh snap!
    • I can help with play testing
    • I can help with translating
    • I can help with voice acting
Hey, I've been trying to implement this module in some of my games I'm building with AGS 3.02 SP1, but in some rooms I get this error:



This happens in the first room of my game, which is a scrolling room. But when I start in the second room (also scrolling) - or any other room-, it works perfectly. In another game it also happens in one specific non-scrolling room. What could be the issue here?

1)build .exe
2)run game setup
3)choose graphics driver:direct draw5
4)graphic filter: none
5)run

enjoy.

Pumaman

  • Creator of AGS
  • I sense danger.
    • Lifetime Achievement Award Winner
Hey, I've been trying to implement this module in some of my games I'm building with AGS 3.02 SP1, but in some rooms I get this error:

Did you create the three custom properties (PxPos etc) described at the top of the module script ?

hedgefield

  • Oh snap!
    • I can help with play testing
    • I can help with translating
    • I can help with voice acting
choose graphics driver: direct draw5
Yeah thanks those settings have nothing to do with this at all.

Did you create the three custom properties (PxPos etc) described at the top of the module script ?

I have to create those properties anyway even though I don't use parralax objects? It's strange that the scrolling does work if I just start in a different room then. For a next version you might want to specifiy that bit a little more clearly for people who have never used custom properties before.

But anyway that seemed to have been the problem, so thanks. Though now, locking the Viewport doesn't seem to work anymore.
« Last Edit: 15 Sep 2008, 21:20 by largopredator »

Ali

  • What will become of the baron?
    • Ali worked on a game that won an AGS Award!
    •  
    • Ali worked on a game that was nominated for an AGS Award!
Thanks for clearing up that problem CJ, I'm glad it's working for you now largo.

The module header explains that those properties are necessary whether or not you use parallax objects. I thiought it was clear enough, any suggestions for clarification are welcome.

To be honest, I just don't know if it's possible to make the properties optional. Any tips from more experienced scripters would be welcome too.

In the next version, I will warn that the module will override SetViewport. A simple solution would be to temporarily make a dummy character the player, and control camera movement using the dummy in cutscenes etc.

hedgefield

  • Oh snap!
    • I can help with play testing
    • I can help with translating
    • I can help with voice acting
I have no idea how it's all coded exactly, but isn't there a way you could toggle the scrolling on/off?

As for the the properties thing, all I can see is //Required Properties:// etc, there's not really a mention of 'you need to go make these custom properties in the custom properties editor of the room'. I happened to remember there was a properties editor there, but I never knew what it was for before.

And the dummy thing might be a good workaround. In another game I already used that method before I figured out the setviewport business.