Problems with Cloneindexes in Non-Level Editor Games

This is a question for all the authors/programmers of Game Editor.
I was working on the wiki, and i wanted to deal with the section entitled 'doors'. However, i have a problem:
When you compile an exe in GE, the cloneindexes and ZDepths do not stay constant to the objects in editor mode. This is only in exe - they work normally in editor.
Now doors usually work in pairs, right? Each side of the door takes you to the other side, to an area somewhere else in the editor/game.
Now when you create a level editor of your own, you can assign doors however you wish; but for people who use Game Editor itself to design the levels, how can we pair doors together if the cloneindexes are unpredictable?
The simple script of collision with door
+ keydown(up) event>
Will work in editor, but will be completely unpredictable in the final exe.
What is the recommended solution to this? 95% of all your users are not going to be making their own level editors....
There are methods such as using separate sequences made from the same animation and assigning those, but there has been trouble in the past with spawning using sequences - not sure what the status of that is now. If sequences spawn properly, then that may be the simplest solution, because a player can then get the animindex and use that in place of cloneindex.
I was working on the wiki, and i wanted to deal with the section entitled 'doors'. However, i have a problem:
When you compile an exe in GE, the cloneindexes and ZDepths do not stay constant to the objects in editor mode. This is only in exe - they work normally in editor.
Now doors usually work in pairs, right? Each side of the door takes you to the other side, to an area somewhere else in the editor/game.
Now when you create a level editor of your own, you can assign doors however you wish; but for people who use Game Editor itself to design the levels, how can we pair doors together if the cloneindexes are unpredictable?
The simple script of collision with door
- Code: Select all
mydoor=collide.cloneindex;
+ keydown(up) event>
- Code: Select all
int which=mydoor%2;
int nextone;
Actor * this;
switch(which){
case 0: //even door
nextone=which+1;
break;
case 1:
nextone=which-1;
break;
}
this=getclone2("door", nextone);
x=this->x; y=this->y;
Will work in editor, but will be completely unpredictable in the final exe.
What is the recommended solution to this? 95% of all your users are not going to be making their own level editors....
There are methods such as using separate sequences made from the same animation and assigning those, but there has been trouble in the past with spawning using sequences - not sure what the status of that is now. If sequences spawn properly, then that may be the simplest solution, because a player can then get the animindex and use that in place of cloneindex.