Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Adventure Bird on August 16, 2010, 09:22:40 PM

Title: Using Script method from a entity handler script
Post by: Adventure Bird on August 16, 2010, 09:22:40 PM
I have 2 problems or maybe I should better say "questions".

The first question is, how can I insert a entity to scene after a specific entitiy/node on the layer. I only found an add method and a insert method by integer. But no "IndexOf" node method which I would need if I want to insert the entity on the correct order.

The second thing is. I don't know exacly how I should handle following:

(http://www.k-p-k.ch/Andy/Game_Picture.JPG)

I have a scene with a background entity. In the scene_init.scipt I wrote a method RepaintContainerCity() and an 3D array for the container places. The method creates a lot of entities for the container objects. To each object will be added a script which takes the eventhandler for talk/take/look. But in this script I haven't access to the repaint method. For example: I want to click on a container --> take container --> container handler should call the method of scene_init.script repaint