Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can you re-enable areas once used?
Nevicar Offline
Junior Member

Posts: 37
Threads: 4
Joined: Mar 2012
Reputation: 0
#15
RE: Can you re-enable areas once used?

Honestly I feel like my question has grown out of control, so I am going to restate the question.

I want to have a zone that checks the player for an item, if he has it a completely different area stays disabled but if he doesn't have it, it becomes enabled.

This is the code:

AddEntityCollideCallback("Player", "Area_7", "fdoorclose_func1", true, 1);

void fdoorclose_func1(string &in asParent, string &in asChild, int alState)
{
if (HasItem("key1")) SetEntityActive("Area_6", false);
else SetEntityActive("Area_6", true);
}



This code doesn't work, so it's obviously wrong, I just can't figure out why.

EDIT: I think I've figured it out, do I need to set the area delete option to FALSE after what function it calls? Therefore; the area is not deleted just set to disabled, or is that not how the "abDeleteOnCollide - determines whether the callback after it was called" works.

Beginner scripter, learning the ropes, creating my own story, would love to help someone else script!
(This post was last modified: 03-10-2012, 07:16 PM by Nevicar.)
03-10-2012, 07:01 PM
Find


Messages In This Thread
Can you re-enable areas once used? - by Nevicar - 03-09-2012, 08:01 AM
RE: Can you re-enable areas once used? - by Nevicar - 03-10-2012, 07:01 PM



Users browsing this thread: 1 Guest(s)