Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Problem...please help?
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#2
RE: Script Problem...please help?

(08-10-2011, 06:14 AM)Xvideogamer720X Wrote: void SetMessage(string& asTextCategory, string& asTextEntry, float afTime);
{
SetMessage("MessageDisplay", "Message_nighttime_Name", 5.0f);
}

Improper name and signatures there (bolded text). Looks like a copy-paste typo to me. Also, the semicolon after the void function's name causes an error. You also need to add an OnStart() function and an OnLeave() function.

Also, I saw you added item callbacks and such in OnEnter. This is a bad idea, since if the player leaves the area and returns later on, they'll be able to use the items again, perhaps giving them unlimited sanity or allowing them to do other weird things. Put these callback declarations into your OnStart function instead. This way the player will only be able to use an item once (unless you add another callback with script).


(This post was last modified: 08-10-2011, 07:23 AM by palistov.)
08-10-2011, 07:22 AM
Find


Messages In This Thread
RE: Script Problem...please help? - by palistov - 08-10-2011, 07:22 AM



Users browsing this thread: 1 Guest(s)