04-24-2011, 09:56 AM
04-24-2011, 11:36 AM
(04-23-2011, 10:48 PM)Kyle Wrote: [ -> ](04-23-2011, 07:05 AM)Jahffax Wrote: [ -> ]Hey!
I would want a script for screen effects. And for the situation where happens like this: I go to area I have marked and suddenly a locked door is unlocked.. (Monster in a closet will be activated and comes out, It's locked because I don't want player go open closet and see there no one and then monster just appears there.. unrealistic you know)
Those would be nice.
I have tried to script those but I can't get them right.. :/ I specially want a screen effect which turns screen dark red!
You don't need to lock the closet, just use this:
SetEntityInteractionDisabled(string& asName, bool abDisabled);
Example:
SetEntityInteractionDisabled("Closet", true);
That's all I can help at the moment.
Ohh thanks! Now I need only screen effect but that can wait THANK YOU!
04-29-2011, 02:38 PM
Ok so I got this script for lever to move shelves. It does everything right, but now for first I need that the sound would be played when the lever is pushed down and shelf is moved. Secondly, I need that right after I push the lever down, that blue screen effect on the screen would appear, the one which is in original game, when you do things right.
Here is the script I have got so far:
Would need some help on how and where to put other lines so that sound would play, and so that screen would show that effect...
EDIT: yeah, forgot that I don't need this anymroe
Here is the script I have got so far:
Quote:ConnectEntities("shelf_connection", "secret_lever", "secret_shelf", false, 1, "CreateDust");
//SetMoveObjectAngularOffsetArea("secret_shelf", "rotatearea");
Would need some help on how and where to put other lines so that sound would play, and so that screen would show that effect...
EDIT: yeah, forgot that I don't need this anymroe
06-08-2011, 02:38 PM
Sorry if anyone already asked this but how can i make a monster walk a specific path instead of just it standing still?
06-17-2011, 10:25 PM
Just gonna bump this, Since it's pretty usefull for the new people who need this
06-17-2011, 10:28 PM
I was thinking some more useful things, but it's not something one person can do, and I'm not sure community will be willing to help me.
06-17-2011, 10:34 PM
(06-17-2011, 10:28 PM)Tanshaydar Wrote: [ -> ]I was thinking some more useful things, but it's not something one person can do, and I'm not sure community will be willing to help me.
I can help I have no life.
(Joke, I actually have a life. But i can help )
11-09-2011, 12:09 AM
Hey ive got an issue, ive already coded my doors so that i have 2 doors that unlock to specific keys and it works fine, but now i want to add another script to this same file but every time i put another script straight after the scripting for the doors it dosent work, so what do i put after this if i want to add a completely different kind of scripting:
void OnStart()
{
AddUseItemCallback("", "torture_1", "castle_1", "KeyOnDoor1", true);
AddUseItemCallback("", "tomb", "mansion_1", "KeyOnDoor2", true);
}
void KeyOnDoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "castle_1", 0.0f, true);
RemoveItem("torture_1");
}
void KeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
RemoveItem("tomb");
}
void OnLeave()
{
}
If anyone can help it would be greatly appreciated.
void OnStart()
{
AddUseItemCallback("", "torture_1", "castle_1", "KeyOnDoor1", true);
AddUseItemCallback("", "tomb", "mansion_1", "KeyOnDoor2", true);
}
void KeyOnDoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "castle_1", 0.0f, true);
RemoveItem("torture_1");
}
void KeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
RemoveItem("tomb");
}
void OnLeave()
{
}
If anyone can help it would be greatly appreciated.
11-09-2011, 12:52 AM
I don't understand what you're trying to do, but I think you're trying to say that you need to add onto the script like, for example, cause something else to happen with another different command function. Perhaps you can post your full script after you've added whatever you needed to add at the point where the script doesn't work anymore, the doors unlocking.
11-09-2011, 12:55 AM
Ok this is my script i have at the moment:
void OnStart()
{
AddUseItemCallback("", "torture_1", "castle_1", "KeyOnDoor1", true);
AddUseItemCallback("", "tomb", "mansion_1", "KeyOnDoor2", true);
}
void KeyOnDoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "castle_1", 0.0f, true);
RemoveItem("torture_1");
}
void KeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
RemoveItem("tomb");
}
void OnLeave()
{
}
and i want to add this but i dont know how:
void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1);
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_grunt" , true);
}
But yeah basically what you said..I want to add onto my script but because i cant just put some coding straight after it whats the scripting i gotta put to separate them from each other cause when i go to run the game it dosent even start my map.
void OnStart()
{
AddUseItemCallback("", "torture_1", "castle_1", "KeyOnDoor1", true);
AddUseItemCallback("", "tomb", "mansion_1", "KeyOnDoor2", true);
}
void KeyOnDoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "castle_1", 0.0f, true);
RemoveItem("torture_1");
}
void KeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
RemoveItem("tomb");
}
void OnLeave()
{
}
and i want to add this but i dont know how:
void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1);
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_grunt" , true);
}
But yeah basically what you said..I want to add onto my script but because i cant just put some coding straight after it whats the scripting i gotta put to separate them from each other cause when i go to run the game it dosent even start my map.