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
Frontcannon Offline
Senior Member

Posts: 538
Threads: 10
Joined: Jul 2010
Reputation: 2
#21
RE: Scripts Recollection

void OnStart()
{
    AddUseItemCallback("", "R01_Key1", "mansion_1", "KeyOnDoor", true);
    AddUseItemCallback("", "R01_Key2", "mansion_2", "KeyOnDoor2", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("mansion_1", false, true);
    PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
}

void KeyOnDoor2(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("mansion_2", false, true);
    PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
}


╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
10-25-2010, 05:37 PM
Find
Everlone Offline
Member

Posts: 178
Threads: 11
Joined: Oct 2010
Reputation: 2
#22
RE: Scripts Recollection

great I was so close to it Smile big thx to you Smile

[Image: 555233.jpg]
10-25-2010, 05:48 PM
Find
zlandael Offline
Junior Member

Posts: 29
Threads: 1
Joined: Sep 2010
Reputation: 0
#23
RE: Scripts Recollection

Good job guys!
10-27-2010, 01:07 AM
Find
mastersmith98 Offline
Junior Member

Posts: 21
Threads: 3
Joined: Oct 2010
Reputation: 0
#24
RE: Scripts Recollection

Maybe we should create a page on the wiki with all of these examples? It would be a place for someone to post script examples that aren't quite tutorials.

EDIT: wow sorry about that, I'm totally out of it. I didn't realize I already said this a few posts ago, my bad.

Join the Amnesia Modders group on Moddb!
10-27-2010, 01:55 AM
Find
anzki Offline
Member

Posts: 88
Threads: 6
Joined: Apr 2010
Reputation: 1
#25
RE: Scripts Recollection

Add message:
1.Make category to language file with any name you want to! Let's say category named:"Example". (To easily add this use HPLangtool found in the same folder as the level editor.)
2.Inside the category ("Example", or anything you have put it's name.) create entry with any name you want. Example; "Entry1".
3.Use this script where you want the message to be showed:
SetMessage(string &asTextCategory, string &asTextEntry, float afTime);
-string &asTextCategory and string &asTextEntry will be the name of a category and entry.
-float afTime will be the time the message is on screen in form; 1.0f(=1 second.)

Example using category "Example" and entry "Entry1", showing the entry for 20 seconds:
SetMessage("Example", "Entry1", 20.0f);

[Image: 2qnr5av.png]
10-27-2010, 02:32 PM
Find
Arvaga Offline
Junior Member

Posts: 8
Threads: 1
Joined: Oct 2010
Reputation: 1
#26
RE: Scripts Recollection

BUMP.

I added how to make a lever functional.

C'mon don't let this thread die =P.

Visit the scripts recollection thread to find scripts for your custom stories.
11-11-2010, 05:29 PM
Find
Frontcannon Offline
Senior Member

Posts: 538
Threads: 10
Joined: Jul 2010
Reputation: 2
#27
RE: Scripts Recollection

I've been map-building for the past weeks, but now the scripting start's again!

I think you'll have plenty material soon enough Big Grin


╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
11-11-2010, 06:05 PM
Find
Equil Offline
Member

Posts: 94
Threads: 8
Joined: Sep 2010
Reputation: 0
#28
RE: Scripts Recollection

Could someone post a script on how to make a basic puzzle? For example I'd like to know how to write that puzzle in the storage map where you need to clear the rubble with the explosive . I tried looking at the dev scripts but they make no sense to me Undecided
01-03-2011, 03:33 PM
Find
Frontcannon Offline
Senior Member

Posts: 538
Threads: 10
Joined: Jul 2010
Reputation: 2
#29
RE: Scripts Recollection

The explosive puzzle is far from being 'basic'. If you don't understand anything what you're reading, it's just going to be frustrating to try scripting your own. It involves CombineItemCallbacks in a special Inventory.hps which so far nobody here seems to understand, lots of custom particle effects and animations to make it look real etc etc...

The most basic puzzle would be a locked door and a key item, try to look and that and built from its code.


╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
01-03-2011, 04:20 PM
Find
Equil Offline
Member

Posts: 94
Threads: 8
Joined: Sep 2010
Reputation: 0
#30
RE: Scripts Recollection

Quote:The explosive puzzle is far from being 'basic'. If you don't understand anything what you're reading, it's just going to be frustrating to try scripting your own. It involves CombineItemCallbacks in a special Inventory.hps which so far nobody here seems to understand, lots of custom particle effects and animations to make it look real etc etc...

The most basic puzzle would be a locked door and a key item, try to look and that and built from its code.


I already have working locked doors in my map with key items, I just want to add some more advanced puzzles to my map so it's not so bland as "Find key, next area, find another key, escape". Any ideas?
(This post was last modified: 01-03-2011, 04:25 PM by Equil.)
01-03-2011, 04:25 PM
Find




Users browsing this thread: 1 Guest(s)