[SCRIPT] Need help with several scripts. - 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: [SCRIPT] Need help with several scripts. (/thread-16413.html) Pages:
1
2
|
RE: Need help with several scripts. - Cruzore - 06-27-2012 For the .lang file, there can't be any writing mistake. I've checked 10 times at least. Make sure CustomSubItemTypeName of the items in the level editor match with the names on the .lang file. It#s not the name of the item itself, it's the name under CustomSubItemTypeName that will be used. RE: Need help with several scripts. - Cruzore - 06-28-2012 Might be a little late, but for the portcullis/lever problem: Keep in mind that the portcullis is opened by: void SetMoveObjectState(string& asName, float afState); Moves an object to a certain state. asName - internal name afState - state of the object, 0 = closed, 1 = open, values inbetween are valid too! or the extended version with more options: void SetMoveObjectStateExt(string& asName, float afState, float afAcc, float afMaxSpeed, float afSlowdownDist, bool abResetSpeed); Moves an object to a certain state, extended method. asName - internal name afState - state of the object, 0 = closed, 1 = open, values inbetween are valid too! afAcc - acceleration afMaxSpeed - maximum speed afSlowdownDist - Distance to the target state before decceleration occurs. abResetSpeed - Set to True if the prop's speed should be reset before performing the movement, else the prop will accelerate from it's current speed to afMaxSpeed. and the callback for a changed lever: void SetEntityConnectionStateChangeCallback(string& asName, string& asCallback); A callback called when ever the connection state changes (button being switched on, lever switched, etc). Callback syntax: void Func(string &in asEntity, int alState) alState: -1 = off, 0 = between, 1 = on Now for the sample: PHP Code: void OnEnter() However, you will have to experiment on which position of the lever you want the portcullis to open or close. RE: Need help with several scripts. - Randael - 06-28-2012 alright, i will try it that way later, and i will look into the item thing, i didnt know it isnt using the item name itself(since like... no tutorial even mentioned that customSub thing ) |