4WalledKid
Member
Posts: 107
Threads: 23
Joined: Oct 2012
Reputation:
1
|
What is this-> (string &in asParent, string &in asChild, int alState)?
Ok so I've been quite a long time doing scripts for Amnesia but today I discovered that I don't know what
void example_function (string &in asParent, string &in asChild, int alState)
do in a called function. I know it is necessary to make it work, but why? What doe's it mean? Thanks!
|
|
12-10-2012, 08:39 PM |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: What is this-> (string &in asParent, string &in asChild, int alState)?
Oh, when you make an AddEntityCollideCallback you do this:
AddEntityCollideCallback("Player", "ScriptArea", "FUNC", true, 1);
void FUNC (string &in asParent, string &in asChild, int alState)
///This means that the player is the parent (the "callbacker") for the ScriptArea (The affected item). The int alState is for the 1, because that 1 means if colliding or leaving the area. The "true" isn't relevant to the function, so we don't put it in the "FUNC".
void FUNC (string &in asParent, string &in asChild, int alState)
{
//Do something because the player collided with the children
}
THE OTHERWORLD (WIP)
Aculy iz dolan.
|
|
12-10-2012, 08:46 PM |
|
4WalledKid
Member
Posts: 107
Threads: 23
Joined: Oct 2012
Reputation:
1
|
RE: What is this-> (string &in asParent, string &in asChild, int alState)?
(12-10-2012, 08:46 PM)The chaser Wrote: Oh, when you make an AddEntityCollideCallback you do this... Hmm.. I got that one. What about this one?
(string &in asItem, string &in asEntity)
|
|
12-10-2012, 08:55 PM |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: What is this-> (string &in asParent, string &in asChild, int alState)?
(12-10-2012, 08:55 PM)4WalledKid Wrote: (12-10-2012, 08:46 PM)The chaser Wrote: Oh, when you make an AddEntityCollideCallback you do this... Hmm.. I got that one. What about this one?
(string &in asItem, string &in asEntity) AddUseItemCallback("", "Itemname", "EntityUsed", "FUNC", true);
void FUNC (string &in asItem, string &in asEntity)
{
}
////FUNC is called when the item is used in the entity.
Basically, the parameters are the information of how does it receive the information, or that I think.
This will help you a lot:
http://www.frictionalgames.com/forum/thread-18368.html
THE OTHERWORLD (WIP)
Aculy iz dolan.
|
|
12-10-2012, 09:01 PM |
|
4WalledKid
Member
Posts: 107
Threads: 23
Joined: Oct 2012
Reputation:
1
|
RE: What is this-> (string &in asParent, string &in asChild, int alState)?
(12-10-2012, 09:01 PM)The chaser Wrote: AddUseItemCallback("", "Itemname", "EntityUsed", "FUNC", true)... Thank you very much!
|
|
12-10-2012, 09:08 PM |
|
|