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


Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What's wrong..?
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#8
RE: What's wrong..?

(05-04-2011, 02:31 PM)DannieWest Wrote:
Quote:There are often two parts to something happening:
1. Set up the script (This part should be done OnEnter or OnStart.)
2. Define what happens when it executes (This part should be done after Onstart or OnEnter)
So basicly, all stuff that is going to happen in the map could be put in between the first two barracks, or w/e they're called, and then u put out definitions to them below?

Sorry, still not working. Got an error saying Unexpected end of file. ..? This is the script now:
"void OnStart()
{
AddUseItemCallback("", "Honey", "mansion_1", "UsedHoneyOnDoor", true);
AddEntityCollideCallback("Player", "ScriptArea_1", HatchSwing", true, 0);
}

void UsedHoneyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
RemoveItem("Honey");
}

void HatchSwing(string &in asParent, string &in asChild, int alState)
{
AddPropImpulse("Hatchet_1", 0, 10, 0, "world");
}"

Spoiler below!

"void OnStart()
{
AddUseItemCallback("", "Honey", "mansion_1", "UsedHoneyOnDoor", true);
AddEntityCollideCallback("Player", "ScriptArea_1", "HatchSwing", true, 0);
}

void UsedHoneyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
RemoveItem("Honey");
}

void HatchSwing(string &in asParent, string &in asChild, int alState)
{
AddPropImpulse("Hatchet_1", 0, 10, 0, "world");
}"


Missed the bold quote on hatchswing. "AddEntityCollideCallback("Player", "ScriptArea_1", "HatchSwing", true, 0);"
(This post was last modified: 05-04-2011, 03:00 PM by Roenlond.)
05-04-2011, 02:59 PM
Find


Messages In This Thread
What's wrong..? - by DannieWest - 05-04-2011, 01:23 PM
RE: What's wrong..? - by Russ Money - 05-04-2011, 01:33 PM
RE: What's wrong..? - by DannieWest - 05-04-2011, 01:41 PM
RE: What's wrong..? - by Russ Money - 05-04-2011, 01:46 PM
RE: What's wrong..? - by DannieWest - 05-04-2011, 01:49 PM
RE: What's wrong..? - by Acies - 05-04-2011, 02:06 PM
RE: What's wrong..? - by DannieWest - 05-04-2011, 02:31 PM
RE: What's wrong..? - by Roenlond - 05-04-2011, 02:59 PM
RE: What's wrong..? - by DannieWest - 05-04-2011, 03:13 PM
RE: What's wrong..? - by MrBigzy - 05-04-2011, 03:36 PM
RE: What's wrong..? - by DannieWest - 05-04-2011, 09:01 PM
RE: What's wrong..? - by MrBigzy - 05-04-2011, 09:16 PM
RE: What's wrong..? - by DannieWest - 05-04-2011, 09:20 PM
RE: What's wrong..? - by Acies - 05-04-2011, 09:40 PM
RE: What's wrong..? - by DannieWest - 05-05-2011, 08:40 AM



Users browsing this thread: 1 Guest(s)