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
Question about basic scripting.
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Question about basic scripting.

Well you see. There can't be 2 functions called "OnStart".

So what you have to do with the void OnStart() is to combine them.
Like this:

PHP Code: (Select All)
void OnStart()

GiveItemFromFile("lantern""lantern.ent");
for(
int i=0;i10;i++) GiveItemFromFile("tinderbox_"+i"tinderbox.ent"); 

AddUseItemCallback("""key_1""locked_door1""UsedKeyOnDoor"true);
SetEntityCallbackFunc("key_1""OnPickup");


Makes sense, hmm?

Always remember: There cannot be 2 functions with the same name.

I've only skimmed over the other functions, as the OnStart seemed the most obvious.
Try it out, and see if it works.

If it doesn't, please return here, and explain what happens.

If you get an error, show it to us.
If you get something else, show it.

Trying is the first step to success.
03-11-2015, 09:02 PM
Find


Messages In This Thread
Question about basic scripting. - by Emiel97 - 03-11-2015, 08:56 PM
RE: Question about basic scripting. - by FlawlessHappiness - 03-11-2015, 09:02 PM
RE: Question about basic scripting. - by Emiel97 - 03-11-2015, 09:42 PM
RE: Question about basic scripting. - by Emiel97 - 03-11-2015, 10:22 PM



Users browsing this thread: 3 Guest(s)