Vradcly
Member
Posts: 100
Threads: 6
Joined: Jan 2011
Reputation:
0
|
RE: Scripts Recollection
Well if you don't even want to try programming you can alway play with game maker, rpg maker or little big planet i guess...But for amnesia the only time you dont need to script for a level is when you have someone who does it for you or you just want to make a good looking level that is empty...
|
|
01-22-2011, 01:27 AM |
|
Ianlis
Junior Member
Posts: 10
Threads: 4
Joined: Jan 2011
Reputation:
0
|
RE: Scripts Recollection
What I'm saying is that if Frictional Games wants people to make custom content, they shouldn't make it so only professionals can do it. Now there's an idea.
Oh, and BTW, I'm gonna keep on trying with a level called "Escape". I've made two maps, and now I'm stuck on getting an enemy to spot a player when the walk through an area. Already did the code from the first page, all I'm trying to do now is figure out how to connect the grunt and the area.
(This post was last modified: 01-22-2011, 05:46 AM by Ianlis.)
|
|
01-22-2011, 05:42 AM |
|
Akumasama
Member
Posts: 122
Threads: 2
Joined: Nov 2010
Reputation:
0
|
RE: Scripts Recollection
(01-22-2011, 05:42 AM)Ianlis Wrote: What I'm saying is that if Frictional Games wants people to make custom content, they shouldn't make it so only professionals can do it. Now there's an idea.
I'm a 17 year old dude on middle school who also does this.
It has nothing to do with being professional and what not.
The only thing you need is motivation to keep learning, nothing more.
|
|
01-23-2011, 05:35 PM |
|
Tottel
Senior Member
Posts: 307
Threads: 9
Joined: Nov 2010
Reputation:
0
|
RE: Scripts Recollection
Scripting has nothing to do with being professional. Anyone can learn, and if you're not willing to do this, than don't even bother. It doesn't get much simpler than this while still providing you a fair amount of flexibility.
|
|
01-25-2011, 02:48 PM |
|
Beatlebattle
Junior Member
Posts: 27
Threads: 5
Joined: Jan 2011
Reputation:
0
|
RE: Scripts Recollection
You got to learn the basics at least. Even when you want to copy/paste scripts of others. I you don't know how and where to place the correct commands you'll end up frustrated because of errors which you don't understand. And really learning the basics is possible for everyone since there are video tutorials. What else do you want then some guy telling you what to type
About scripts;
I would like to know how to switch between levels without a level door. And how to do it with a passing-out effect?
By the way a script I love myself is when entering an area, the lights go on/off. This is the script for a lamp to go off:
______________________________________________________________________
void CollideLightsOut(string &in asParent, string &in asChild, int alState)
{
SetLampLit("entity name", true, true);
}
void OnStart()
{
AddEntityCollideCallback("Player", "AreaLightsOut", "CollideLightsOut", true, 1);
}
(This post was last modified: 01-27-2011, 07:11 PM by Beatlebattle.)
|
|
01-27-2011, 07:04 PM |
|
Oscar House
Senior Member
Posts: 302
Threads: 3
Joined: Nov 2010
Reputation:
9
|
RE: Scripts Recollection
void OnStart()
{
AddEntityCollideCallback("Player", "teleport_1", "Teleport", false, 1);
}
void Teleport(string &in asParent, string &in asChild, int alState)
{
FadeOut(3.0f);
ChangeMap("map2.map", "PlayerStartArea_1", "", "");
}
Couldn't find the passing out function though.
(This post was last modified: 01-27-2011, 09:13 PM by Oscar House.)
|
|
01-27-2011, 09:05 PM |
|
Beatlebattle
Junior Member
Posts: 27
Threads: 5
Joined: Jan 2011
Reputation:
0
|
RE: Scripts Recollection
Thanks for the level switching code, but I'm still looking for the passing out effect. I would like to use it when falling down and in the next level you wake up and get back on your feet. I'd like the script for that
|
|
01-29-2011, 12:19 AM |
|
adamhun
Junior Member
Posts: 34
Threads: 4
Joined: Dec 2010
Reputation:
0
|
RE: Scripts Recollection
void OnStart()
{
AddEntityCollideCallback("Player", "script_area", "change_map", false, 1);
}
void change_map(string &in asParent , string &in asChild , int alState)
{
ChangeMap("map.map", "PlayerStartArea_1", "", "");
}
I think everything's obvious. If not, then ask and I'll help ^^
-Retired-
(This post was last modified: 02-07-2011, 04:48 PM by adamhun.)
|
|
02-07-2011, 04:47 PM |
|
kozek
Junior Member
Posts: 3
Threads: 0
Joined: Feb 2011
Reputation:
0
|
RE: Scripts Recollection
Make a locked door and a key to unlock it by Frontcannon
[spoiler]
[code]
void OnStart()
{
AddUseItemCallback("", "R01_Key1", "mansion_1", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
}
I can't get this to work, Iam kind of new to scripting so all help is appriciated.
Iam changing mansion_1 to manison_3 and R01_Key1 to tomb_key1. But then when I start the game and load my story it says FATAL ERROR. What am I doing wrong?
(I have tried removing both false and true, at different times.)
|
|
02-22-2011, 10:27 AM |
|
Nye
Senior Member
Posts: 250
Threads: 8
Joined: Jan 2011
Reputation:
2
|
RE: Scripts Recollection
(02-22-2011, 10:27 AM)kozek Wrote: Make a locked door and a key to unlock it by Frontcannon
[spoiler]
[code]
void OnStart()
{
AddUseItemCallback("", "R01_Key1", "mansion_1", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
}
I can't get this to work, Iam kind of new to scripting so all help is appriciated.
Iam changing mansion_1 to manison_3 and R01_Key1 to tomb_key1. But then when I start the game and load my story it says FATAL ERROR. What am I doing wrong?
(I have tried removing both false and true, at different times.)
Code seems fine. I suspect your problem is to do with the names of your key/door. For the key, you need a "custom subitem name" in the "Entity Tab", this is the name you use for the AddUseItemCallBack. The name of the entity you use the key on (in your case, "mansion_1", needs to be the name of the actual object (ie. first field on the first tab).
Make sure you have that. If you still can't get it to work, when you get a fatal error, it will tell you the row and column numbers so you can easily identify where the problem is in your script file.
(This post was last modified: 02-25-2011, 01:38 AM by Nye.)
|
|
02-25-2011, 01:38 AM |
|
|