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
Quick and easy question
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#1
Quick and easy question

Is there a way to remove an callback like when I click on a door it sdays something and when I broke it open the door ofcourse doesn't say anything anymore.
So I want to like remove the callback of the message when I broke it so is this possible?

CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
11-26-2012, 04:58 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: Quick and easy question

Yea, there are some like:

RemoveEntityCollideCallback(string& asParentName, string& asChildName);
RemoveCombineCallback(string& asName);
RemoveUseItemCallback(string& asName);

All of these are void.

Hope that helped Wink

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
(This post was last modified: 11-26-2012, 05:45 PM by The chaser.)
11-26-2012, 05:44 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#3
RE: Quick and easy question

Or you could make a LocalVarInt, so
if(GetLocalVarInt("VarName") == 0)
{
DO STUFF
}

And then later when the callback shouldn't be there anymore call SetLocalVarInt("VarName", 1)

Trying is the first step to success.
11-26-2012, 05:48 PM
Find
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#4
RE: Quick and easy question

(11-26-2012, 05:48 PM)beecake Wrote: Or you could make a LocalVarInt, so
if(GetLocalVarInt("VarName") == 0)
{
DO STUFF
}

And then later when the callback shouldn't be there anymore call SetLocalVarInt("VarName", 1)

I see what you are running at I think I can make some of this Big Grin

CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
11-26-2012, 06:20 PM
Find
GoranGaming Offline
Member

Posts: 183
Threads: 30
Joined: Feb 2012
Reputation: 7
#5
RE: Quick and easy question

(11-26-2012, 04:58 PM)Steve Wrote: Is there a way to remove an callback like when I click on a door it sdays something and when I broke it open the door ofcourse doesn't say anything anymore.
So I want to like remove the callback of the message when I broke it so is this possible?
You could also do:

void OnStart()
{
SetEntityPlayerInteractCallback("DoorName", "InteractDoor", false);
}

void InteractDoor(string &in asEntity)
{
if(GetSwingDoorLocked("DoorName")== true)
{
SetMessage("Category", "Entry");//Sets a message when the door is locked
}
else
{
//When the door is open and you press it, nothing happens
}
}

Current projects:

The Dark Prison 85 % (Stopped working on this one)

Unnamed Project 7 %
(This post was last modified: 11-26-2012, 08:38 PM by GoranGaming.)
11-26-2012, 08:35 PM
Website Find




Users browsing this thread: 1 Guest(s)