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 scripting
w 1 z Offline
Junior Member

Posts: 4
Threads: 1
Joined: Sep 2010
Reputation: 0
#5
RE: Question about scripting

(09-17-2010, 04:36 AM)Armored Cow Wrote:
if(ScriptDebugOn())
    {
        GiveItemFromFile("lantern", "lantern.ent");

        for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
    }
This section of your code needs to be inside of void OnStart()

It worked before like the way I had it but instead of the command giving the things when you load the level it gives you them when you open the door that I set to trigger the encounter to start with and the encounter doesn't start at all.

Well for the time being I just moved the give lantern/tinderboxes commands down to void OnEnter() for the time being. There's still something up with the encounter trigger because even with the script debugon() removed it still won't trigger the encounter.

Alright, I narrowed it down. I added a GiveSanityDamage line to encounter function and when I opened the door it worked...Sort of. There's something going on with the other lines of code up there that I think I might've messed up or I'm missing a call for it somewhere.
09-17-2010, 04:50 AM
Find


Messages In This Thread
Question about scripting - by w 1 z - 09-17-2010, 03:08 AM
RE: Question about scripting - by MulleDK19 - 09-17-2010, 03:21 AM
RE: Question about scripting - by w 1 z - 09-17-2010, 03:57 AM
RE: Question about scripting - by Armored Cow - 09-17-2010, 04:36 AM
RE: Question about scripting - by w 1 z - 09-17-2010, 04:50 AM
RE: Question about scripting - by jens - 09-17-2010, 07:11 AM
RE: Question about scripting - by w 1 z - 09-17-2010, 07:39 AM
RE: Question about scripting - by Armored Cow - 09-17-2010, 03:40 PM
RE: Question about scripting - by jens - 09-17-2010, 04:21 PM
RE: Question about scripting - by Armored Cow - 09-17-2010, 04:40 PM
RE: Question about scripting - by jens - 09-17-2010, 05:45 PM
RE: Question about scripting - by MulleDK19 - 09-17-2010, 05:55 PM
RE: Question about scripting - by Armored Cow - 09-17-2010, 07:02 PM



Users browsing this thread: 1 Guest(s)