![]() |
Scripting help !!! :E - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Scripting help !!! :E (/thread-13448.html) |
Scripting help !!! :E - Sundayz - 02-20-2012 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. RE: Scripting help !!! :E - flamez3 - 02-20-2012 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? RE: Scripting help !!! :E - Sundayz - 02-20-2012 (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..) RE: Scripting help !!! :E - flamez3 - 02-20-2012 Make the things you want to come on after you read the note inactive. And use these FadeOut() FadeIn() SetEntityActive() RE: Scripting help !!! :E - Sundayz - 02-20-2012 What you mean ? Can you if possible make a Script example ? ![]() RE: Scripting help !!! :E - flamez3 - 02-20-2012 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. RE: Scripting help !!! :E - Sundayz - 02-20-2012 (02-20-2012, 02:11 PM)flamez3 Wrote: void OnStart() (02-20-2012, 02:11 PM)flamez3 Wrote: Okay (02-20-2012, 02:11 PM)flamez3 Wrote: (if someone has an other suggestion for the sound or something tell me please :-) ) RE: Scripting help !!! :E - flamez3 - 02-21-2012 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! RE: Scripting help !!! :E - Sundayz - 02-21-2012 Okay thanks a lot ! (02-21-2012, 03:22 AM)flamez3 Wrote: For the sound: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. |