Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script helpers by modders for modders
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#9
RE: Script helpers by modders for modders

It's a common file used throughout multiple script files.

If you know of The Second Dimension (which I'd find likely) and looked at its code (which I'd find unlikely), you'd see that there's a section in every map that had the exact same code. It's under a comment that says //GENERAL SCRIPTS or something. This is because Amnesia does not use the #include, so MrBehemoth had to add the same code to every file in order to access it.

If we made a helper file with useful helpers, then others could download that, use #include, and then use those helpers without having to know how they work under-the-hood. For example, we could have a function there like CreateExplosion(). The user of this helper would give it some arguments, like position, velocity etc. but the function itself in the helper file would be specifying things like "GetPosition, PlaySoundAtPosition, CreateImpulse, AddScreenEffects" and so on, which the user would not need to touch or even know about. They just need to know the result. Hope this makes sense.

(This post was last modified: 10-08-2015, 08:54 PM by Mudbill.)
10-08-2015, 08:50 PM
Find


Messages In This Thread
Script helpers by modders for modders - by Vale - 10-08-2015, 02:46 PM
RE: Script helpers by modders for modders - by Mudbill - 10-08-2015, 08:50 PM



Users browsing this thread: 1 Guest(s)