![]() |
Need help with scripting - 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: Need help with scripting (/thread-19945.html) |
Need help with scripting - reper1210 - 01-15-2013 I want to add the following effect into this script but im not sure how to do it. void FadePlayerRollTo(float afX, float afSpeedMul, float afMaxSpeed); I dont know if it requires its own string or if i can put it with something. and for future reference should i be posting this question somewhere else? //////////////////////////////////////////////////////////////// void OnStart() { SetEntityPlayerInteractCallback("key_laboratory_1", "ActivateMonster", true); AddUseItemCallback("OpenDoor", "key_laboratory_1", "level_hub_1", "UnlockLevelDoor", true); } void OnEnter() { } void OnLeave() { } void ActivateMonster(string &in item) { SetEntityActive("servant_brute_1", true); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 0, "Idle"); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0, "Idle"); } void UnlockLevelDoor(string &in item, string &in entity) { SetLevelDoorLocked(entity, false); } RE: Need help with scripting - FlawlessHappiness - 01-15-2013 Yes post in developement support. I don't know in what way you want it, but you could put it when you unlock the door as an example. void UnlockLevelDoor(string &in item, string &in entity) { SetLevelDoorLocked(entity, false); FadePlayerRollTo(50, 20, 20); } RE: Need help with scripting - reper1210 - 01-15-2013 (01-15-2013, 10:53 PM)BeeKayK Wrote: Yes post in developement support. thanks for your help, actually that was the wrong code, this is the correct one i needed. // StartPlayerLookAt(string& mansion_door_1, 20, 20, string& asAtTargetCallback); StopPlayerLookAt(3); /////////////////////////////////////// i dont know what to so with astargetcallback now, im assuming the rest is correct but i don't know. void OnStart() { GiveItemFromFile("lantern", "lantern.ent"); SetEntityPlayerInteractCallback("key_laboratory_1", "ActivateMonster", true); AddUseItemCallback("OpenDoor", "key_laboratory_1", "level_hub_1", "UnlockLevelDoor", true); } void OnEnter() { } void OnLeave() { } void ActivateMonster(string &in item) { StartPlayerLookAt(string& mansion_door_1, 20, 20, string& asAtTargetCallback); StopPlayerLookAt(3); SetEntityActive("servant_brute_1", true); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 0, "Idle"); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0, "Idle"); } void UnlockLevelDoor(string &in item, string &in entity) { SetLevelDoorLocked(entity, false); } RE: Need help with scripting - FlawlessHappiness - 01-16-2013 If you don't know what to do with it, just make it blank like this: StartPlayerLookAt(string& mansion_door_1, 20, 20, ""); But if you stop the player looking at the brute, then i don't think he will move that much |