But it doesn't work. when I enter the area, nothing happen.
Have I to write some function in the leveleditor in the specific area-menu or entity-menu?
The script area needs to be called exactly "ScriptArea_1" and the entity needs to be called exactly "kasten". You shouldn't need to edit anything else.
(05-30-2011, 08:33 PM)mr.bonent Wrote: very strange.. Everything fits how it should, but this cabinet ist still inactive.
Any other ideas?
Some objects can't be activated, switch the entity to a book or something and try it that works. Also, use SetDebugMessage("anything", false); in the same function as your SetEntityActive. If you have debug messages turned on (press f1 if you have a dev environment set up), you will see the message "anything" display. If it does, that means the function works just fine and the entity itself is the problem.
Honestly, I have no idea what's wrong. Are you sure your script file is called testmap.hps? Is the script loading at all? (add a debug message at the onstart)
the book should be set to inactive if you then want to activate it, yeah, but that is unimportant. If the debug message doesn't show up, the function isn't working at all.
In the void OnStart() function, add SetDebugMessage("scriptworking", false); to see if the script works at all. Sure, send me the file. I'll have a look at them first thing tomorrow unless you figured it out before then