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
How Make AreaLook
toni1998 Offline
Junior Member

Posts: 13
Threads: 4
Joined: Jan 2011
Reputation: 0
#1
How Make AreaLook

I have a problem
you put "AreaLook1"
not working
how do
03-01-2011, 08:29 PM
Find
nkmol Offline
Senior Member

Posts: 252
Threads: 19
Joined: Feb 2011
Reputation: 4
#2
RE: How Make AreaLook

what a coincidence , i was just doing the same script for the first time Tongue
what i think is that you cant use a Area, because a Area doesn't have a Callback.

they LookAt script doesnt work either for me ; SetEntityPlayerLookAtCallback(string& asName, string& asCallback, bool abRemoveWhenLookedAt);

what i did was putting the LookAt at a object and made a Callback
void Scare_GruntFood(string &in entity, int alState)
{
    AddDebugMessage("LookAt" + "'s current state: " + alState, false);

    if (alState == 1)
    {
        SetEntityPlayerLookAtCallback("", "", true);
        GiveSanityDamage(50, true);
        PlaySoundAtEntity("Breath", "react_pant.snt", "Player", 0, false);
    }
}

the only thing you have to do is putting your callback in the level editor, in the PlayerLookAtCallback ofcourse Tongue. and be sure to click the PlayerLookAtCallBackAutoRemo option in the level editor Entity Wink

if anybody know how the LookAtCallBack script works and if it is possible at a Area, please reply. You'll help us both, hehe Tongue
(This post was last modified: 03-01-2011, 08:56 PM by nkmol.)
03-01-2011, 08:54 PM
Find
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#3
RE: How Make AreaLook

I think he means that the player automatically starts looking at "AreaLook".

void OnStart()
{
    AddEntityCollideCallback("Player", "AreaLook", "CollideAreaLook", true, 1);
}

void CollideAreaLook(string &in asParent, string &in asChild, int alState)
{
            StartPlayerLookAt("AreaLook", 0.5f, 0.5f, "");
}

[Image: 18694.png]
03-01-2011, 10:59 PM
Find
nkmol Offline
Senior Member

Posts: 252
Threads: 19
Joined: Feb 2011
Reputation: 4
#4
RE: How Make AreaLook

Ow sorry for that then xD faill... XD
Though i already placed my problem would you mind to help me too? Confused
Although my lookatcallback on a object is already working , but is it possible to do it on an area? :p
(This post was last modified: 03-01-2011, 11:25 PM by nkmol.)
03-01-2011, 11:22 PM
Find




Users browsing this thread: 1 Guest(s)