Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: TheDerman on August 31, 2007, 05:21:50 PM

Title: Problem with entity active
Post by: TheDerman on August 31, 2007, 05:21:50 PM
Hi all,

I have a little problem here, which makes no sense.

I have a door handle overlay, which I set to inactive, and then fade up with a loop when the player clicks a region entity over the handle. Then I change the scene.

This all works fine, except of course the door handle down sprite entity is still active, so to reset it, I use this in the scene_init script:

Code: WME Script
  1. var DoorHandle = Scene.GetNode("door_handle_down");
  2. if(DoorHandle.Active==true) DoorHandle.Active = false;
  3.  

I use this script in exactly the same way for two different scenes (only the entity name is different), and it resets the sprite to inactive in one scene but not the other. They are exactly the same script - I'm trying to do exactly the same thing in each scene - one works, but the other won't work. The only difference is the entity name.

So, it makes no sense, and I can't solve the problem because I see no problem.  :-\
Title: Re: Problem with entity active
Post by: metamorphium on August 31, 2007, 06:20:20 PM
Are you sure you spell the entity name right (case sensitivity)?
Title: Re: Problem with entity active
Post by: TheDerman on August 31, 2007, 06:25:02 PM
Yeah - I double checked everything - cut and paste the name from scene editor into the script, everything.

EDIT - I think I know the problem - I'll check it out, and post again.

EDIT 2 - Ok, I changed the scene name is Windows Explorer, which obviously WME does not like as there must be some records of the original scene name somewhere (like in the scene_init script and maybe elsewhere). I recreated the scene and it's fine now.

I think ProjectMan should have a "rename" option in the right click menu, which will change the name of the file and then update anything in the project that uses that file so everything matches. Like in Dreamweaver - if you change the name of a file, it will update all the links in other files throughout the whole site.