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
Grabbable feather
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#1
Grabbable feather

I want to make a monster disappear immediately upon looking away from it, but the only scripts I can find trigger a function when you look AT something instead. Is there a way to do this?

Also, I've tried making a pen_feather that you can grab and carry around, but when I pick it up it seems to spin around uncontrollably. What could be causing this?

(This post was last modified: 03-30-2012, 12:07 AM by Damascus.)
03-29-2012, 07:53 PM
Find Reply
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Entity disappearing when you look away + grabbable feather

SetEntityPlayerLookAtCallback.

Tutorials: From Noob to Pro
03-29-2012, 08:50 PM
Website Find Reply
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#3
RE: Entity disappearing when you look away + grabbable feather

Calls a function when the player looks at a certain entity.


Callback syntax: void MyFunc(string &in asEntity, int alState)


alState: 1 = looking, -1 = not looking




asName - internal name


asCallback - function to call


abRemoveWhenLookedAt - determines whether the callback should be removed when the player looked at the entity

So in the function called, do I put an "if(alState == -1)" in there? Or is it too late, with the function exectued as soon as you look at it and not able to do anything else?


03-29-2012, 09:48 PM
Find Reply
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#4
RE: Grabbable feather

Well I played with it and got it to work this way.

Still need some advice on picking up a feather without it spinning like a madman.

03-30-2012, 12:07 AM
Find Reply




Users browsing this thread: 1 Guest(s)