Page 2 of 3

PostPosted: Mon May 29, 2006 11:20 pm
by Novice
You have to make sure that you didn't put anything in draw or create actor that would move your background.
Do you have any other events for that actor?
Post the code that you are using to create it.
It's probabliy a small mistake that does it, it happens to me all the time. :wink:

PostPosted: Mon May 29, 2006 11:58 pm
by Diana Kennedy
Yes, I am pretty sure it's just a tiny little problem.

You have to make sure that you didn't put anything in draw or create actor that would move your background.
Do you have any other events for that actor?


Ehw...I am not sure about which actor you talk right now? The one that has to be displayd and that stucks in the upper left corner? (In fact its 2 actors) or the actor that create those two, by using the famous code:

Code: Select all
if (score.textNumber>=120)
CreateActor("swampintro", "introswamp", "no parent", "no path", 0, 0, false);

else if (score.textNumber<120)
CreateActor("gameover", "gameover", "no parent", "no path", 0, 0, false);[/quote]


Well this one is an actor I called timer, that creates the timer that finishes the game and that destroys all charcters of the game. It has the other following script set on the timer:

Code: Select all
stopSound(galopp);


To stop the galoping sound of the rider. But no draw actor event. But the rider (hero) is the parent of the view, to make it follow. At the timer, this changes, also, so it can't be that.

*siiigh*

PostPosted: Tue May 30, 2006 1:45 am
by makslane
What's the event and action that you create the gameover actor?

PostPosted: Tue May 30, 2006 1:54 am
by Diana Kennedy
makslane wrote:What's the event and action that you create the gameover actor?


A timer.

The timer is created by an actor "timer" at "create actor". The timer has the said if-script. And this script works so far as it really creates wehter gameover actor or swampintro actor, depending on the score number. But even if I write the coordinates, it does not follow them.

And the timer also has the script:

Code: Select all
view. x = -668;
view.y = -608;


To bring back the view where the swampintro or gameover actors are created, but it does not follow, too.


I am desperated. I worked on hours, trying out any new coordinates, but the view does not obey.
:cry: :cry:

To show the problem:


Here's how the whole things are arranged:

Image

I used those coordinates in the scripts and it gives me this:

Image

PostPosted: Tue May 30, 2006 2:44 am
by makslane
Create the gameover actor with view as parent:

CreateActor("gameover", "gameover", "view", "no path", 497, 410, false);

PostPosted: Tue May 30, 2006 3:01 am
by Diana Kennedy
Same problem. Now it's stuck in the upper left corner.

Image

I don't understand this...

PostPosted: Tue May 30, 2006 3:16 am
by makslane
Works here. Please, show the whole script are you using.

PostPosted: Tue May 30, 2006 3:36 am
by Diana Kennedy
Actor gametimer creates the timer.

On Timer:

Script Editor:

Code: Select all
if (score.textNumber>=130)
CreateActor("swampintro", "introswampy", "no parent", "no path", 0, 14, false);

else if (score.textNumber<130)
CreateActor("gameover", "icon", "gameover", "no path", -28, -22, false);


Alternatively I made "view" as parent - same result. It doesn't work.

PostPosted: Tue May 30, 2006 3:48 am
by Diana Kennedy
Maybe it will be more easy if I do not work with create actor but with visibility state. This way, I can place the actors where I want them and the if script just decides which actor shall be visible and which not.

Can you tell me how this code
Code: Select all
if (score.textNumber>=130)
CreateActor("swampintro", "introswampy", "no parent", "no path", 0, 14, false);

else if (score.textNumber<130)
CreateActor("gameover", "icon", "gameover", "no path", -28, -22, false)


Would be like if it is not creaActor but visibiliry state?

PostPosted: Tue May 30, 2006 3:51 am
by makslane
Make the view parent of gameover.
Look the code above.

PostPosted: Tue May 30, 2006 2:39 pm
by Diana Kennedy
makslane wrote:Make the view parent of gameover.
Look the code above.


I DID! It does NOT work!

PostPosted: Tue May 30, 2006 2:49 pm
by makslane
I'm sorry. I don't know what's happen.

PostPosted: Tue May 30, 2006 2:52 pm
by Diana Kennedy
:cry: :cry: :cry: :cry:

But could'nt I try it with a visibility statement? as I mentioned above? Which would be the code for that?

PostPosted: Tue May 30, 2006 3:10 pm
by Novice
Change this
Code: Select all
CreateActor("gameover", "icon", "gameover", "no path", -28, -22, false);
to
Code: Select all
CreateActor("gameover", "icon", "gameover", "no path", -28, -22, true);

The TRUE part means that the actor position is not relative to the creators position. This means that all this time it was relative to the creating actor. Now just enter the right coordinates.
I think that this should solve your problem.

PostPosted: Tue May 30, 2006 3:30 pm
by Diana Kennedy
This looked like a very good solution, Novice - but it ddn't work either. :( There must be an other problem. I will try oit the code without any other aditional actors and events, just this to se if eventualy if it works without the other things, those tgings my be the problem.