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


Thread Rating:
  • 16 Vote(s) - 4.44 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripts Recollection
ufando Offline
Junior Member

Posts: 3
Threads: 1
Joined: Apr 2011
Reputation: 0
#81
RE: Scripts Recollection

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?
(This post was last modified: 04-24-2011, 11:01 AM by ufando.)
04-24-2011, 09:56 AM
Find
Jahffax Offline
Junior Member

Posts: 7
Threads: 1
Joined: Apr 2011
Reputation: 0
#82
RE: Scripts Recollection

(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!
04-24-2011, 11:36 AM
Find
Exostalker Offline
Member

Posts: 204
Threads: 10
Joined: Aug 2010
Reputation: 3
#83
RE: Scripts Recollection

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

(This post was last modified: 05-09-2011, 04:02 PM by Exostalker.)
04-29-2011, 02:38 PM
Find
wisecow Offline
Junior Member

Posts: 4
Threads: 1
Joined: Mar 2011
Reputation: 0
#84
RE: Scripts Recollection

Sorry if anyone already asked this but how can i make a monster walk a specific path instead of just it standing still? Huh
06-08-2011, 02:38 PM
Find
laser50 Offline
Member

Posts: 242
Threads: 22
Joined: Apr 2011
Reputation: 0
#85
RE: Scripts Recollection

Just gonna bump this, Since it's pretty usefull for the new people who need this Smile

Current Project: [WIP] Lost Memories
Progress: 15%
CLICK FOR MY MODDB PAGE
06-17-2011, 10:25 PM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#86
RE: Scripts Recollection

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.

(This post was last modified: 06-17-2011, 10:29 PM by Tanshaydar.)
06-17-2011, 10:28 PM
Website Find
laser50 Offline
Member

Posts: 242
Threads: 22
Joined: Apr 2011
Reputation: 0
#87
RE: Scripts Recollection

(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)

Current Project: [WIP] Lost Memories
Progress: 15%
CLICK FOR MY MODDB PAGE
06-17-2011, 10:34 PM
Find
Fireintex Offline
Junior Member

Posts: 3
Threads: 0
Joined: Nov 2011
Reputation: 0
#88
RE: Scripts Recollection

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.
11-09-2011, 12:09 AM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#89
RE: Scripts Recollection

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:52 AM
Find
Fireintex Offline
Junior Member

Posts: 3
Threads: 0
Joined: Nov 2011
Reputation: 0
#90
RE: Scripts Recollection

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.
(This post was last modified: 11-09-2011, 01:34 AM by Fireintex.)
11-09-2011, 12:55 AM
Find




Users browsing this thread: 4 Guest(s)