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
HasItem scripting help
MsHannerBananer Offline
Member

Posts: 218
Threads: 34
Joined: Sep 2013
Reputation: 10
#7
RE: HasItem scripting help

I've changed the script and removed the block box, and just make it so the door unlocks once the check box detects if the player has the key and just unlocks the door if they do, however remains locked if they don't.

The script is now this in the .hps (AddEntityCollide etc didn't change.

Spoiler below!

void notyet(string &in asParent, string &in asChild, int alState)
{

if(HasItem("SpecialKey") == false)
{
SetMessage("Dialogue", "KateThought_VoiceCheck", 5);
}

if(HasItem("SpecialKey") == true)
{
SetLevelDoorLocked("hospitalHome", false);
}




I checked, double checked, and triple checked the names between the .lang file and the .hps file. Everything matches up on my end.

(01-29-2014, 10:06 PM)FlawlessHair Wrote: AddEntityCollideCallback("Player", "voiceCheck_Area", "notyet", true, 1);

You put the callback true. This means that it only calls once. Then it's deleted. That's why it's not working more than once.

I figured that out last night. Big Grin Changed it. Still doesn't work. xD

(This post was last modified: 01-29-2014, 10:13 PM by MsHannerBananer.)
01-29-2014, 10:12 PM
Find


Messages In This Thread
HasItem scripting help - by MsHannerBananer - 01-29-2014, 09:56 AM
RE: HasItem scripting help - by PutraenusAlivius - 01-29-2014, 10:00 AM
RE: HasItem scripting help - by Daemian - 01-29-2014, 05:03 PM
RE: HasItem scripting help - by i3670 - 01-29-2014, 06:24 PM
RE: HasItem scripting help - by MsHannerBananer - 01-29-2014, 10:01 PM
RE: HasItem scripting help - by FlawlessHappiness - 01-29-2014, 10:06 PM
RE: HasItem scripting help - by MsHannerBananer - 01-29-2014, 10:12 PM
RE: HasItem scripting help - by FlawlessHappiness - 01-29-2014, 10:18 PM
RE: HasItem scripting help - by MsHannerBananer - 01-29-2014, 10:42 PM
RE: HasItem scripting help - by FlawlessHappiness - 01-30-2014, 07:14 AM
RE: HasItem scripting help - by MsHannerBananer - 01-30-2014, 07:27 AM
RE: HasItem scripting help - by FlawlessHappiness - 01-30-2014, 09:04 AM
RE: HasItem scripting help - by Daemian - 01-30-2014, 05:17 PM
RE: HasItem scripting help - by MsHannerBananer - 01-30-2014, 06:02 PM
RE: HasItem scripting help - by FlawlessHappiness - 01-30-2014, 09:28 PM
RE: HasItem scripting help - by MsHannerBananer - 01-30-2014, 09:36 PM
RE: HasItem scripting help - by FlawlessHappiness - 01-30-2014, 10:23 PM



Users browsing this thread: 4 Guest(s)