Frictional Games Forum (read-only)

Full Version: Scripts Recollection
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12
Hey all, i was wondering if i could get some help with a script.

How can i make the player freeze and not be able to move until an event is done?
(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) Smile

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 Big Grin THANK YOU!
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:

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 Smile
Sorry if anyone already asked this but how can i make a monster walk a specific path instead of just it standing still? Huh
Just gonna bump this, Since it's pretty usefull for the new people who need this Smile
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: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 Smile I have no life.

(Joke, I actually have a life. But i can help Big Grin)
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.
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.
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.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12