Actor desappearing when attached to a path

Non-platform specific questions.

Actor desappearing when attached to a path

Postby regis » Sun Jan 02, 2005 10:33 pm

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.
Many thanks,
Regis
regis
 
Posts: 48
Joined: Tue Nov 09, 2004 10:51 am
Location: France
Score: 1 Give a positive score

Postby makslane » Sun Jan 02, 2005 11:45 pm

I can't reproduce this behavior here.
Can you send me the project with this problem?
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby ingsan » Mon Jan 03, 2005 7:39 am

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:
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Actor desappearing when attached to a path

Postby regis » Sun Jan 09, 2005 12:23 pm

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.
regis
 
Posts: 48
Joined: Tue Nov 09, 2004 10:51 am
Location: France
Score: 1 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest