Sundayz
Junior Member
Posts: 6
Threads: 2
Joined: Feb 2012
Reputation:
0
|
Scripting help !!! :E
Hello everyone, i'm sundayz and i started doing custom story in Amnesia :-)
But the problem is scripting which is very difficult :/
i know the basic etc..
But i wan't to do something and i really don't know how to do it !!!
I wan't my character when he read a letter (letter2 for example) after reading the letter he's teleported to an other map. I wan't to do this without loading when he enter the map and a scary sound .
I hope u understand what i wan't to do (I'm french i'm sorry if you don't understand very well...)
I hope u will help me, thanks.
|
|
02-20-2012, 12:41 PM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
RE: Scripting help !!! :E
You can't load another map without the loading. You can map the duplicate into the original map so you can teleport there without the loading?
|
|
02-20-2012, 12:52 PM |
|
Sundayz
Junior Member
Posts: 6
Threads: 2
Joined: Feb 2012
Reputation:
0
|
RE: Scripting help !!! :E
(02-20-2012, 12:52 PM)flamez3 Wrote: You can't load another map without the loading. You can map the duplicate into the original map so you can teleport there without the loading? Well i mean for example:
you are on a room and after doing something there is a black screen and you see that the room is different (example there is body in the ground or blood etc..)
|
|
02-20-2012, 12:56 PM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
RE: Scripting help !!! :E
Make the things you want to come on after you read the note inactive. And use these
FadeOut()
FadeIn()
SetEntityActive()
(This post was last modified: 02-20-2012, 01:13 PM by flamez3.)
|
|
02-20-2012, 01:12 PM |
|
Sundayz
Junior Member
Posts: 6
Threads: 2
Joined: Feb 2012
Reputation:
0
|
RE: Scripting help !!! :E
What you mean ?
Can you if possible make a Script example ?
|
|
02-20-2012, 01:40 PM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
RE: Scripting help !!! :E
void OnStart()
{
SetEntityPlayerInteractCallback("nameofnote", "Scare", true);
}
void Scare(string &in asEntity)
{
SetEntityActive("nameofentity", true);
}
Or if you want to teleport the player to a different part of the map:
void OnStart()
{
SetEntityPlayerInteractCallback("nameofnote", "Scare", true);
}
void Scare(string &in asEntity)
{
TeleportPlayer("nameofPlayerStartArea");
}
Make another start area where you want the player to transport.
(This post was last modified: 02-20-2012, 02:11 PM by flamez3.)
|
|
02-20-2012, 02:11 PM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
RE: Scripting help !!! :E
For the sound:
PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);
asSoundName - internal name
asSoundFile - the sound to use + extension .snt
asEntity - the entity to create the sound at, can be “Player”
afFadeTime - time in seconds the sound needs to fade
abSaveSound - determines whether a sound should “remember” its state. If true, the sound is never attached to the entity! Also note that saving should on be used on looping sounds!
(This post was last modified: 02-21-2012, 03:22 AM by flamez3.)
|
|
02-21-2012, 03:22 AM |
|
Sundayz
Junior Member
Posts: 6
Threads: 2
Joined: Feb 2012
Reputation:
0
|
RE: Scripting help !!! :E
Okay thanks a lot !
(02-21-2012, 03:22 AM)flamez3 Wrote: For the sound:
PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);
asSoundName - internal name
asSoundFile - the sound to use + extension .snt
asEntity - the entity to create the sound at, can be “Player”
afFadeTime - time in seconds the sound needs to fade
abSaveSound - determines whether a sound should “remember” its state. If true, the sound is never attached to the entity! Also note that saving should on be used on looping sounds! Rofl what u told me to do don't work i'll give you what i wrote and tell me what is wrong (i really start to script)
void OnStart()
{
AddDebugMessage("OnStart!", false);
SetEntityPlayerInteractCallback("letter3", "Scare", true);
}
void Scare(string &in asEntity)
{
TeleportPlayer("PlayerStartArea_20");
}
My letter is really letter3 and the area i wan't my player to go is this one too these things are not wrong i'm sure.
(This post was last modified: 02-21-2012, 12:05 PM by Sundayz.)
|
|
02-21-2012, 11:47 AM |
|
|