Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Pages: 1 [2]  All

Author Topic: Blocking regions and releasing them back to use...how to do?  (Read 7775 times)

0 Members and 1 Guest are viewing this topic.

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Blocking regions and releasing them back to use...how to do?
« Reply #15 on: October 29, 2008, 04:24:22 PM »

And are you sure the variable contains true? Try adding:

  Game.Msg(TeleportOpen);

to the beginning of the LeftClick handler. It will briefly display the value of the variable on screen when you click.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

kypho

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 33
    • View Profile
Re: Blocking regions and releasing them back to use...how to do?
« Reply #16 on: October 29, 2008, 04:31:55 PM »

Jee JEE I got it working...Here is the code:

Code: [Select]
#include "scripts\base.inc"

global TeleportOpen;

var e = Scene.GetNode("guarded");

on "LeftClick"
{
if (!TeleportOpen)
 {
 e.Blocked = true;
 actor.Talk("I am too scared of the space monster!");
 actor.Talk("I can't go there");
 }
 else
 {
 GoToObject();
 e.Blocked = false;
 actor.Talk("I think I can go there now safely");
 
 }
}

function GoToObject ()
{
actor.GoTo(770,550);
actor.TurnTo(DI_DOWNRIGHT);
}

so you see, there is slight difference... I use e.Blocked and then on the else branch I use gotoobject function to make that lameass fat wizard to move :)

- Kypho the beginner
Logged
Pages: 1 [2]  All
 

Page created in 0.048 seconds with 20 queries.