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
need help: if HasItem, spawn monster
Ninami Offline
Member

Posts: 59
Threads: 6
Joined: Feb 2012
Reputation: 2
#5
RE: need help: if HasItem, spawn monster

All you do is locate "/custom_stories/(Your storyname here)/maps" and then IF you have a file called "something".cache then delete it.

If that's not the problem then I think there's something wrong with either the names or your level editor, because I have a very similar event on my own map and it works perfectly (with almost the exact script you use).

The only other thing I can think of is, since you have "true" so that the area gets removed after you enter it the first time, I guess you maybe walk through it first WITHOUT key, and THAT'S where the function uses the "if statement" and can't find the key in your inventory (because you haven't picked it up yet) and when you enter the area a SECOND time, WITH the key, the area is gone because you already entered it once before.

Does that sound likely?
It that's the problem then I suggest you do what I did.

Just use SetEntityCallbackFunc(string& asName, string& asCallback); to your key and when you pick it up the Area will spawn SetEntityActive("Area_Name"). That way you won't activate the area when you walk through it when you don't have the key. And when you find the key and pick it up, they area spawns and the "if statement" will work.
(This post was last modified: 02-06-2012, 06:28 AM by Ninami.)
02-06-2012, 06:03 AM
Find


Messages In This Thread
RE: need help: if HasItem, spawn monster - by Ninami - 02-06-2012, 06:03 AM



Users browsing this thread: 1 Guest(s)