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
Rotate secret book shelf with moveable book
Efendi Offline
Junior Member

Posts: 13
Threads: 7
Joined: Sep 2013
Reputation: 0
#3
RE: Rotate secret book shelf with moveable book

(11-08-2013, 03:02 PM)Amn Wrote: Your function func_shelf have wrong arguments, you need two strings and one integer.

Like this:
void func_shelf ( string &in as p, string &in c, int i )

Thanks for the answer Amn! I figured out my problem few days back, this is my code now:

Spoiler below!
AddEntityCollideCallback("Book_1", "BookArea_1", "func_shelf", true, 0);


void func_shelf (string &in asParent, string &in asChild, int alState)

{
if(alState == 1)
if(asParent == "Book_1" && GetLocalVarInt("Move") == 0)



{
SetMoveObjectState("Shelf", 1);
SetLocalVarInt("Move", 1);
PlayMusic("10_puzzle02.ogg", false, 0.7, 0.1, 2, false);
GiveSanityBoostSmall();
}

}

I have tried to add few more books, when you have all books drawn, then the secret shelf will rotate. It doesn't require any given order, just that when all books have been drawn. I have tried many hours to try to get it to work, but with no results. I know the problem is simple, just that i don't seem to get the hang of it.

Thanks for any answer in advance! Smile
(This post was last modified: 11-11-2013, 08:51 PM by Efendi.)
11-11-2013, 04:21 PM
Find


Messages In This Thread
RE: Rotate secret book shelf with moveable book - by Efendi - 11-11-2013, 04:21 PM



Users browsing this thread: 1 Guest(s)