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
Look a vase falling ...
Pandemoneus Offline
Senior Member

Posts: 328
Threads: 2
Joined: Sep 2010
Reputation: 0
#2
RE: Look a vase falling ...

Your code contains a few mistakes.

Spoiler below!

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

Isn't the function for a timer, it's

void VaseTimerScare(string &in asTimer)


Spoiler below!

StartPlayerLookAt("Vase_01",2.0f,5.0f,""); //this is correct
AddTimer("VaseTimer_01",1.5f,""); //this does nothing, since you don't call a timer function (seen at "")
StopPlayerLookAt(); //this is also correct, but it will immediatly stop the StartPlayerLookAt since there is no "wait"

Check out how I did it in my code.


void CollideAreaFly01(string &in asParent, string &in asChild, int alState)
{
AddDebugMessage("HAHAHAHA sa marche le vol de vase", false);
AddPropImpulse("Vase_01", 0, 0, -1.2f, "world");
AddTimer("VaseTimer_01",0.5f,"VaseTimerScare");
}

void VaseTimerScare(string &in asTimer)
{
if(asTimer == "VaseTimer_01")
{
AddDebugMessage("test Vase qui tombe",false);
StartPlayerLookAt("Vase_01",2.0f,5.0f,"");
AddTimer("VaseTimer_02",1.5f,"VaseTimerScare");
}

if(asTimer == "VaseTimer_02")
{
AddDebugMessage("stop looking at vase",false);
StopPlayerLookAt();
}
}

09-18-2010, 12:32 PM
Find


Messages In This Thread
Look a vase falling ... - by Alroc - 09-18-2010, 12:18 PM
RE: Look a vase falling ... - by Pandemoneus - 09-18-2010, 12:32 PM
RE: Look a vase falling ... - by Alroc - 09-18-2010, 02:22 PM



Users browsing this thread: 1 Guest(s)