Page 1 of 1

Actor desappearing when attached to a path

PostPosted: Sun Jan 02, 2005 10:33 pm
by regis
Hello to you all, and first of all I wish you a happy new year 2005 and good luck in your projects!

From my own side, I have the following problem: I use a timer which calls a script. In that one, I enclose the following line:

if (picture == 53)
{
Stargate.x = 0; Stargate.y = 0;
}

If the 'Stargate' object is not linked to any path, there is no problem: it appears at coordinates (0;0) when variable 'picture' equals 53. Nevertheless, adding a path to this object makes it disappear during the game: Have you any idea where I am wrong?

I thank you for your help.

PostPosted: Sun Jan 02, 2005 11:45 pm
by makslane
I can't reproduce this behavior here.
Can you send me the project with this problem?

PostPosted: Mon Jan 03, 2005 7:39 am
by ingsan
appears at coordinates (0;0) when variable 'picture' equals 53


Don't use just Stargate.x = 0 ;
Use the MOVETO action to make Stargate move to (0,0) :wink:

Actor desappearing when attached to a path

PostPosted: Sun Jan 09, 2005 12:23 pm
by regis
Hello to you all (and, by the way, many thanks and a good year to Ingsan too!).

I enclose here the answer Makslane sent me last week by mail: his solution may be useful to the community.

Best regards.
RĂ©gis

In Game Editor path calculations have priority over other position
calculations, so you can't set the position after assign a path.
In your project, the stargate are move with path below the view.

To solve the problem you can try this:
1) In the actor control, set the stargate path to no path
2) In L01 actor create other timer event and put this script:

if (L01picture == 53)
{
ChangePath("Stargate", "Stargate", BOTH_AXIS);
}

Add this script to change the path after change x and y stargate position
on your other script.