Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: Jyujinkai on January 04, 2009, 07:34:26 AM
-
If i am loading entities with a script somthign like this....
How do you determin the order they are drawn on screen. The script loaded entites seam to load behind the 3D actor.
I assume it has somthing to do with Layer.InsertEntity ... but i am not sure how to use it?
-
Actors and free entities (i.e. those which are not part of the static scene layout defined in SceneEdit) are sorted by their Y position.
-
Actors and free entities (i.e. those which are not part of the static scene layout defined in SceneEdit) are sorted by their Y position.
So can you manualy sort them ... with layers or wat not?
-
Depends on what you want to do. Entities are supposed to be part of the scene, so they automatically sort so that they fit naturally into the scene.
As I suggested in the other thread, if you want to display some controls on top of everything, perhaps you should use a window and real user interface, not entities.
-
Depends on what you want to do.
Um... I just want to be able to click on somthing and have the game load a sprite so they apear on top of the actor.
Example
- I have a sceen with 3 buttons.
- Button 1 - Loads Sprite1
- Button 2 - Loads Sprite2
- Button 3 - Loads Sprite3
- Player can click these in any order they want.
- Each Sprite Loads ONTOP of actor (so actror walks behind them)
- Sprite 3 loads UNDER Sprite 2 and Sprite 2 UNDER Sprite 1.
- So if they overlap 1 is onto of 2 and 2 is ontop of 3 and they are all ontop of teh actor
[/list]
-
So your sayign i should set everythign up in scene edit with layers and all that and use the turn on and off functions to make them visable .... and have them all off at start.. instead of having them load with a dynamic entity thing.
-
I don't know, it depends on situation. If you don't need to create them on the fly and you don't want them to move together with the actor, than this is definitely easier.
But it's also possible with free entities. The key here is to move the hot-spot of the sprite used for your entities. By placing the hotspot below the actual image, the entity will appear to be floating above surface. It really would help to know what effect you're trying to achieve.