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
Will this work with notes?
ElectricRed Offline
Member

Posts: 106
Threads: 13
Joined: Jun 2012
Reputation: 5
#1
Will this work with notes?

So I have a script here where I want an area to teleport the player only if they have a note. However, is this the right way to go about this? For some reason it's not working, so I'm thinking maybe this command only works with items, and not notes.

void CollideAreaTeleportTrail(string &in asParent, string &in asChild, int alState)
{
if(HasItem("note_key") == true)
{
SetEntityActive("AreaDisplayMessage", false);
ChangeMap("04__Trail.map", "PlayerStartArea_1", "", "");
}
}

If I wanted to do this with a note, would I need to go about it a different way, or am I just doing something wrong here?

Thanks.

[Image: 9lkjf4.jpg]

(This post was last modified: 08-12-2012, 07:49 PM by ElectricRed.)
08-05-2012, 10:33 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Will this work with notes?

HasItem is normally for items that can be dragged out of the inventory and dropped onto the environment (which notes cannot do). You're probably better off using an interaction callback that sets a local map variable which you can check against.

Tutorials: From Noob to Pro
08-05-2012, 10:38 PM
Website Find
ElectricRed Offline
Member

Posts: 106
Threads: 13
Joined: Jun 2012
Reputation: 5
#3
RE: Will this work with notes?

(08-05-2012, 10:38 PM)Your Computer Wrote: HasItem is normally for items that can be dragged out of the inventory and dropped onto the environment (which notes cannot do). You're probably better off using an interaction callback that sets a local map variable which you can check against.
Okay, thanks!

[Image: 9lkjf4.jpg]

08-05-2012, 10:58 PM
Find
Theforgot3n1 Offline
Member

Posts: 192
Threads: 20
Joined: Apr 2012
Reputation: 6
#4
RE: Will this work with notes?

(08-05-2012, 10:58 PM)ElectricRed Wrote:
(08-05-2012, 10:38 PM)Your Computer Wrote: HasItem is normally for items that can be dragged out of the inventory and dropped onto the environment (which notes cannot do). You're probably better off using an interaction callback that sets a local map variable which you can check against.
Okay, thanks!
If the thread is solved, please mark it as such!

Confusion: a Custom Story - Ch1 for play!
http://www.frictionalgames.com/forum/thread-15477.html
About 50% built.
Delayed for now though!
08-06-2012, 02:57 AM
Website Find




Users browsing this thread: 1 Guest(s)