Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: esmeco on February 16, 2003, 12:35:42 PM

Title: Interacting with objects
Post by: esmeco on February 16, 2003, 12:35:42 PM
Hi! I'm new here and to wme, so don't blame me for asking dumb questions ;).
What I want to know is: How can I make an actor interact with an object, like for example picking up an object from the scene? How do I make that object ,like disappear from the scene once picked up?
Just one more question, I want to combine an object with another object, and then use it with an object from the scene, how do I do this? Should I make  the object from the scene an entity or else?
I really need your help 'cause I'm new to scripting

Thanx!
Title: Re:Interacting with objects
Post by: Mnemonic on February 17, 2003, 12:41:50 PM
Hi! It's a very general question :) For the starters, I'd recommend reading through the docs (an updated version of the documentation is on the way, BTW) and studying the WME demo project source. It covers all the topics you are asking about (Molly can pick up the book and put it back on the desk). But briefly: yes, the the item that can be picked up is an entity, which is part of the scene. You can query the entity from a script, using:

Code: [Select]
var MyEntity = Scene.GetNode("entity name");

After the player picks the item up, you'll hide it from the scene by setting its Active property to false.

Code: [Select]
MyEntity.Active = false;