walking through people

Started by geomis, Sat 14/05/2005 10:13:32

Previous topic - Next topic

geomis

in the game i have a guy blocking a tunnel but the player can walk through him how can i solve this problem??? ???
IF I CAN'T WHY SHOULD YOU?!
WHAT JUST CAUSE YOU WORK AT THE BANK MEANS YOU CAN TAKE MONEY OUT?!It does?.....WHY DON'T PEOPLE TELL ME THESE THINGS!

Ubel

Make two walkable areas. One around the guy and one to fill the room. Like this:



Then if the guy won't let you in, disable the green walkable area with RemoveWalkableArea (areanum);

If the guy wants you to pass by then use RestoreWalkableArea (areanum); to make the area walkable again.

geomis

ok where do you find this remove walkable arae and restore walkable stuff?
I am VERY NEW so make it really easy protend your talking to some one really stupid but not so stupid as say every word with a masive space between them.
IF I CAN'T WHY SHOULD YOU?!
WHAT JUST CAUSE YOU WORK AT THE BANK MEANS YOU CAN TAKE MONEY OUT?!It does?.....WHY DON'T PEOPLE TELL ME THESE THINGS!

Ubel

Ok, this is going to include some scripting and maybe usage of variables so take a deep breath.

Open First time player enters screen -interaction menu. Then use Run script in it and put this in the script:
RemoveWalkableArea (the area number of wich the guy is standing on);

Then when you want the guy to let you pass by, use RestoreWalkableArea (the area number of wich the guy is standing on); in the point, like example when you give him an item.


If that doesn't work properly there's another way to do this.

First of all open the script editor of the current room. It's the button that says: { }
Then write this in it:

int passguy=1;


Then go back to Interaction editor.

Use Run Script -interaction in Player enters screen. Then write this to script:

if (GetGlobalInt(passguy)==1) {
Ã,  RemoveWalkableArea (the area number of wich the guy is standing on);
Ã,  }
else if (GetGlobalInt(passguy)==2) {
Ã,  RestoreWalkableArea (the area number of wich the guy is standing on);
Ã,  }


At the point you want him to let you pass by, use:
SetGlobalInt (passguy, 2);
RestoreWalkableArea (the area number of wich the guy is standing on);

Hope this helps, and hope it's clear enough. :)

TerranRich

Okay, here's a word to the wise. If you need us to talk to you as if you're stupid, then maybe you should try reading the manual, from the beginning, do all tutorials. Don't just jump into a game right away: practice, practice, PRACTICE!

If any more of your questions can be found int he manual or the BFAQ (which I will bring back soon) or any other resource, then I will tell you so.
Status: Trying to come up with some ideas...

SMF spam blocked by CleanTalk