Help needed with Change Image and Actor position?
Hey,
I really need some help with my new project. I have a scene 320x960, the game only plays till y 480 as normal, then I have two actors for the ground which move downwards, scene y is wrapped.But I want to change the ground actor at a certain time. I would like to do this with change image.
But it should change at Y 480-960 so that the player does not see the change. I tried it with a slef position condition but it did not work, thanks for any help
Alex
I really need some help with my new project. I have a scene 320x960, the game only plays till y 480 as normal, then I have two actors for the ground which move downwards, scene y is wrapped.But I want to change the ground actor at a certain time. I would like to do this with change image.
But it should change at Y 480-960 so that the player does not see the change. I tried it with a slef position condition but it did not work, thanks for any help

Alex
Comments
mhmm....
a wrapY will cause the Y to move down till the Y = 0 - self.Size.Height
the actual Y changes to the max scene height at Y = 0 - self.Size.Height/2
this is why the image will seem to be split in half at the sceneY 0 and sceneY 960
you can put a textDisplay on the actor to display self.Position.Y and see that once Y = 0 it will display the Y as 950 to 960 range
(to see this, you have to use the sceneEditor's Preview and not the one on the toolBar)
to correct your problem:
Rule: when (All)
Attribute: self.Position.Y < 650
Attribute: self.Position.Y > 550
--changeAttribute: self.Image To: nameNewImage
don't use ≤ or ≥ as those conditions will be valid when your image is still visible in the bottom of the scene
@};- MH
but it doesn't work correctly, the actor has a height of 480, and I want to change the image so that the player can't see it,
otherwise it looks very unprofessional...
Now it changes in the scene, mhmmm....
Thx Alex
WrapY is not going to work … as before: the Y actually changes To: 960 at 0 when that is √ed
so uncheck it!
on your backgroundActor:
Rule: when
Arttribute: self.Position.Y ≤ -240
--ChangeImage
--changeAttribute: self.Position.Y To: 720
@};- MH
Okay just one problem again
I have two actors for the ground. Each actor is 480 at height, and moves down.
I used your rule but it still doesn't work...
Driving me crazy...
Alex
do your preview in the sceneEditor … see if changes are happening and when
the rules have to be on each bgActor
as behaviors are processed in linear order … the changeImage has to be before the change Y
@};- MH
Thx
But then it comes again from above and underneath is nothing left ...
Hope you know what I mean...
hard to visualize, but values for X and Y can be: + or - just about any number
@};-
I know what Y ≤-240 means, but it still does not work in the scene... mhmmm
Alex
not the Preview in the toolBar …
to see what is happening and when
@};- MH
At the upper half..
And I don't know why ....
@};- MH
same as in the actor on the bottom.
Move direction 270 and
Attribute: self.Position.Y ≤ -240
changeAttribute: self.Position.Y To: 720
this works for me … and I can't figure it out for you, Alex!
@};- MH
just the two actors moving like a ground..
thx
sent a PM to your Profile …
@};- MH
thx
@MotherHoose: What to do when a little gap appears after some time between
the actors?
thx
you could just change the sceneAttribute: Color to that color
otherwise add 1 transparent pixel to the top or bottom row in your graphics program
@};- MH
thx
Scene Attributes
Color: change it from the default black
===
Alex, you have to start doing the cookbook and videos and playing around with all the buttons in GS till you learn what they do and what you can do with them!
It's an adventure! that can be enjoyable and worthwhile!
@};- MH
that's not the problem. I tried what you ment but the gap is getting bigger and bigger when the game
lasts for a while...
And something really annoying is also that the ground movement at all looks not fluid, it is a bit stacked..
Mhmmm...
Thx MotherHoose
please check it out..
Alex