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
Vradcly Offline
Member

Posts: 100
Threads: 6
Joined: Jan 2011
Reputation: 0
#51
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
Find
Ianlis Offline
Junior Member

Posts: 10
Threads: 4
Joined: Jan 2011
Reputation: 0
#52
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. Tongue
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
Find
Akumasama Offline
Member

Posts: 122
Threads: 2
Joined: Nov 2010
Reputation: 0
#53
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. Tongue

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
Find
Tottel Offline
Senior Member

Posts: 307
Threads: 9
Joined: Nov 2010
Reputation: 0
#54
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
Find
Beatlebattle Offline
Junior Member

Posts: 27
Threads: 5
Joined: Jan 2011
Reputation: 0
#55
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 Tongue

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
Find
Oscar House Offline
Senior Member

Posts: 302
Threads: 3
Joined: Nov 2010
Reputation: 9
#56
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.

[Image: 2exldzm.png]
(This post was last modified: 01-27-2011, 09:13 PM by Oscar House.)
01-27-2011, 09:05 PM
Find
Beatlebattle Offline
Junior Member

Posts: 27
Threads: 5
Joined: Jan 2011
Reputation: 0
#57
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 Smile
01-29-2011, 12:19 AM
Find
adamhun Offline
Junior Member

Posts: 34
Threads: 4
Joined: Dec 2010
Reputation: 0
#58
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
Find
kozek Offline
Junior Member

Posts: 3
Threads: 0
Joined: Feb 2011
Reputation: 0
#59
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
Find
Nye Offline
Senior Member

Posts: 250
Threads: 8
Joined: Jan 2011
Reputation: 2
#60
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. Smile

(This post was last modified: 02-25-2011, 01:38 AM by Nye.)
02-25-2011, 01:38 AM
Find




Users browsing this thread: 1 Guest(s)