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
Script Help A simple script
FragdaddyXXL Offline
Member

Posts: 136
Threads: 20
Joined: Apr 2012
Reputation: 7
#2
RE: A simple script

Quote:void SetLanternLitCallback(string& asCallback);
Sets the function to call when the player uses his lantern.
Callback syntax: MyFunc(bool abLit)

If you would like for them to run out of fuel:
Quote: void SetPlayerLampOil(float afOil);
Use this to set the oil to 0.0f.

Also, use this to create a breaking sound:
Quote:void PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);
Creates a sound on an entity.
asSoundName - internal name
asSoundFile - the sound to use + extension .snt
asEntity - the entity to create the sound at, can be “Player”
afFadeTime - time in seconds the sound needs to fade
abSaveSound - determines whether a sound should “remember” its
state. If true, the sound is never attached to the entity! Also note
that saving should on be used on looping sounds!

You could use this to prevent the user from using their lamp, even if they have spare oil in their inventory:
void SetLanternDisabled(bool abX);








Dark Seclusion Here
04-29-2012, 03:41 PM
Find


Messages In This Thread
A simple script - by z3akx - 04-29-2012, 03:23 PM
RE: A simple script - by FragdaddyXXL - 04-29-2012, 03:41 PM
RE: A simple script - by z3akx - 04-29-2012, 04:09 PM
RE: A simple script - by SilentStriker - 04-30-2012, 04:41 PM



Users browsing this thread: 1 Guest(s)