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


Thread Rating:
  • 4 Vote(s) - 3.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting n00b in need of help.
Akumasama Offline
Member

Posts: 122
Threads: 2
Joined: Nov 2010
Reputation: 0
#15
RE: Scripting n00b in need of help.

Yep, you don't need a .hps file to load a file.
I ran my map quite a few times without the hps.

The only thing you need, is a config file at the root of your story, and a map.
Okay, sorry for double post, but I thought it wouldn't get "bumped" to the top again and get unseen messages Tongue

I can't find a proper Script Function to give a door a small push so it opens a bit.

void OnStart()
{  
   GiveItemFromFile("lantern", "lantern.ent");

   for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");

AddEntityCollideCallback("Player", "scaretrigger", "scareactivate", true, 1);
SetEntityCallbackFunc("lantern", "lanterndooractivate");
}

void scareactivate(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("scaremonster", true);
AddEnemyPatrolNode("scaremonster", "scaremonsterpath1", 0, "");
}

void lanterndooractivate(string &in entity, string &in type)
{
SetSwingDoorLocked("doorlantern", false, false);
HERE MUST GO THE CODE FOR THE PUSH!
}

I've tested if the trigger worked, and the door did unlock.
So it only has to get a little push now.

I tried "RotatePropToSpeed", but it makes the door ummm... well float and unable to be used.
(This post was last modified: 11-13-2010, 08:38 PM by Akumasama.)
11-13-2010, 07:37 PM
Find


Messages In This Thread
Scripting n00b in need of help. - by Akumasama - 11-13-2010, 12:59 AM
RE: Scripting n00b in need of help. - by Cellrage - 11-13-2010, 01:37 AM
RE: Scripting n00b in need of help. - by Chilton - 11-13-2010, 03:02 AM
RE: Scripting n00b in need of help. - by Chilton - 11-13-2010, 02:52 PM
RE: Scripting n00b in need of help. - by Chilton - 11-13-2010, 03:15 PM
RE: Scripting n00b in need of help. - by Chilton - 11-13-2010, 03:41 PM
RE: Scripting n00b in need of help. - by anzki - 11-13-2010, 05:42 PM
RE: Scripting n00b in need of help. - by Akumasama - 11-13-2010, 07:37 PM
RE: Scripting n00b in need of help. - by Cellrage - 11-14-2010, 03:08 AM
RE: Scripting n00b in need of help. - by Chilton - 11-14-2010, 03:33 AM
RE: Scripting n00b in need of help. - by Cellrage - 11-14-2010, 03:37 AM



Users browsing this thread: 1 Guest(s)