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


Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tutorial] Using funcdefs
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#7
RE: [Tutorial] Using funcdefs

Took me quite a few read-throughs but I'm starting to understand funcdefs and where they might be useful choices in coding.

I wrote out a 250-line script which will let the player use a crowbar on any door they see, and the crux of the script is a large switch-case function executed based on a step (which is determined by whether the door is open or whether its weak enough to break with the crowbar, etc). The whole thing is a mess to read since all the outcomes are mashed into a single function. I'm thinking I might do a design overhaul and use funcdefs now...that might even be easier seeing as I can expand it to include other tools like a hammer and chipper or whatever other tool there might be. I'm not sure if it would shorten the script but I think it would certainly make it easier to dissect and read for other people...

I hope you do more of these in the future, it's always a pleasure to learn more about programming Smile

10-31-2011, 01:54 AM
Find


Messages In This Thread
[Tutorial] Using funcdefs - by Apjjm - 08-12-2011, 09:57 PM
RE: [Tutorial] Using funcdefs - by DRedshot - 08-12-2011, 11:59 PM
RE: [Tutorial] Using funcdefs - by Endlvl - 08-13-2011, 04:39 AM
RE: [Tutorial] Using funcdefs - by Your Computer - 08-13-2011, 05:21 AM
RE: [Tutorial] Using funcdefs - by plutomaniac - 08-13-2011, 08:49 AM
RE: [Tutorial] Using funcdefs - by Apjjm - 08-14-2011, 12:43 AM
RE: [Tutorial] Using funcdefs - by palistov - 10-31-2011, 01:54 AM



Users browsing this thread: 1 Guest(s)