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
key trigger
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#4
RE: key trigger

(10-08-2012, 11:11 AM)naseem142 Wrote:
(10-08-2012, 10:35 AM)i3670 Wrote: Post your script.

Edit: Is the monster in the level_editor called monster_grunt?
Here is the script , and yes the grunt is named "monster_ grunt"





void OnStart()
{
AddUseItemCallback("", "key_1", "locked_door1", "UsedKeyOnDoor", true);
SetEntityCallbackFunc("key_1", "OnPickup");
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("locked_door1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "locked_door1", 0, false);
RemoveItem("key_1");
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("monster_grunt", true);
ShowEnemyPlayerPosition("monster_grunt");
}
void OnPickup(string &in asEntity, string &in asType)
{
SetEntityActive("monster_grunt", true);
ShowEnemyPlayerPosition("monster_grunt");
}

You had the sintax wrong.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
10-08-2012, 11:48 AM
Find


Messages In This Thread
key trigger - by naseem142 - 10-08-2012, 10:35 AM
RE: key trigger - by i3670 - 10-08-2012, 10:35 AM
RE: key trigger - by naseem142 - 10-08-2012, 11:11 AM
RE: key trigger - by The chaser - 10-08-2012, 11:48 AM
RE: key trigger - by naseem142 - 10-08-2012, 12:10 PM
RE: key trigger - by The chaser - 10-08-2012, 01:21 PM
RE: key trigger - by naseem142 - 10-08-2012, 02:14 PM



Users browsing this thread: 1 Guest(s)