Please login or register.

Login with username, password and session length
Advanced search  


For WME related articles and tutorials visit WME Resource Center.

Author Topic: Why didn't I think of that?!  (Read 3569 times)

0 Members and 1 Guest are viewing this topic.


  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 74
    • View Profile
Why didn't I think of that?!
« on: October 19, 2004, 09:52:17 AM »

How was I supposed to solve this?
Then it hit me:
the script of an object or entity is reloaded each time the object is...
so if I put:

global whatever_active;
if ( whatever_active==1)
   {this.Active=false; }

inside the objects script, then each time you enter the scene or reload the window,
the object or entity will become inactive if the variable is 1.

Pure genious!

Just say inside the snow's script:
global snow_active;
if (snow_active==1)
{ this.Active=false; }

on "lamp"
{ this.Active=false;
actor.Talk("Look, the snow melts away... and there's something...");
actor.Talk("*Activates the laser ultra 200 000 setting*...");
actor.Talk("Oops, I burned down the entire house, and the city's all in flames...");
actor.Talk("Game over, man, game over. But at least the snow won't be there anymore.");

So now whenever you use the lamp on the snow, it will hide,
and it will stay hidden whenever you come back to this place.
Way to go!

(it works with =false and ="anything you like" as well,
instead of =1.)

Some of you probably already knew this,
but newbies might find this useful.
(I know I did.)

(Edit: this is especially useful if you have any number of windows where objects can be taken or removed or become visible/invisible. It's in windows that this really RoXs ::rock
« Last Edit: October 19, 2004, 02:32:27 PM by organican »

Page created in 0.028 seconds with 20 queries.