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
Resetting the Phonograph
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#12
RE: Resetting the Phonograph

It does indeed appear that reset prop was not resetting the state of the wheel (only the position of it?). Here is a slight work around which should do the trick (worked for me in a test map).

Phonograph Settings:
Spoiler below!

[Image: gLwvN.png]



Code:

void OnStart() {
  //For testing, use lantern to reset prop.
  GiveItemFromFile("lantern", "lantern.ent");
  SetLanternLitCallback("cbLlit");
}

void cbLlit(bool abLit) {
  if(abLit)
   {
     AddDebugMessage("Resetting Prop",false);
     //Unstick & reset phonograph
     SetWheelStuckState("phonograph_1",0,false);
     SetWheelAngle("phonograph_1",0,false);
   }
}

void cbPhonographChange(string &in asEntity, int alState) {
  //Make the phonograph stuck at maximum
  if(alState == 1) SetWheelStuckState(asEntity,alState,true);
  AddDebugMessage("State changed: " + asEntity + " ( " + alState + " ) ", false);
}
(This post was last modified: 09-08-2011, 02:44 PM by Apjjm.)
09-08-2011, 02:42 PM
Find


Messages In This Thread
Resetting the Phonograph - by MegaScience - 09-07-2011, 02:04 AM
RE: Resetting the Phonograph - by MegaScience - 09-08-2011, 03:11 AM
RE: Resetting the Phonograph - by Apjjm - 09-08-2011, 04:10 AM
RE: Resetting the Phonograph - by MegaScience - 09-08-2011, 04:14 AM
RE: Resetting the Phonograph - by Apjjm - 09-08-2011, 04:15 AM
RE: Resetting the Phonograph - by MegaScience - 09-08-2011, 04:32 AM
RE: Resetting the Phonograph - by Apjjm - 09-08-2011, 04:36 AM
RE: Resetting the Phonograph - by MegaScience - 09-08-2011, 05:26 AM
RE: Resetting the Phonograph - by Elven - 09-08-2011, 08:59 AM
RE: Resetting the Phonograph - by MegaScience - 09-08-2011, 11:33 AM
RE: Resetting the Phonograph - by Elven - 09-08-2011, 11:56 AM
RE: Resetting the Phonograph - by Apjjm - 09-08-2011, 02:42 PM
RE: Resetting the Phonograph - by MegaScience - 09-09-2011, 04:11 AM
RE: Resetting the Phonograph - by Apjjm - 09-09-2011, 01:32 PM
RE: Resetting the Phonograph - by MegaScience - 09-09-2011, 03:27 PM
RE: Resetting the Phonograph - by Elven - 09-09-2011, 11:01 PM
RE: Resetting the Phonograph - by MegaScience - 09-12-2011, 11:45 AM
RE: Resetting the Phonograph - by Tanshaydar - 09-26-2011, 07:44 PM
RE: Resetting the Phonograph - by Apjjm - 09-26-2011, 09:15 PM
RE: Resetting the Phonograph - by Tanshaydar - 09-26-2011, 09:27 PM
RE: Resetting the Phonograph - by Apjjm - 09-26-2011, 09:39 PM
RE: Resetting the Phonograph - by Tanshaydar - 09-26-2011, 10:21 PM



Users browsing this thread: 1 Guest(s)