The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Curious about internal names.
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#1
Curious about internal names.

Alright so this is not exactly something I need help with, it's just something I'm kinda curious about.

When you use a script like AddTimer or most callbacks, you can input an internal name for this script (pretty much always being the first parameter). These internal names are used to reference the callback in the script if you are gonna use it for anything. For example a looping timer that you want to stop; you need to use RemoveTimer with the internal name of the timer you want to stop.

I think I know all I need to know about internal names and how to use them, but what actually happens when you leave that string blank?

Often when I define timers, I leave the name empty just because I won't need it. If the timer is only ran once, I see no need to use the internal name, therefore I just keep things simple and don't name it anything. Is this bad practise? Should I name it something even if I don't use it? Does it make any difference?

I suspect that when the name is empty, the engine uses a placeholder type of name for the timer (like timer001 for example). If not, then I suppose it doesn't name it anything at all, but how does it reference itself internally?


I'm not really depending on an answer. As I said, I'm just a bit curious about this. If you know anything, I'd be interested to know =)

02-11-2014, 11:40 AM
Find


Messages In This Thread
Curious about internal names. - by Mudbill - 02-11-2014, 11:40 AM
RE: Curious about internal names. - by Mudbill - 02-11-2014, 02:49 PM



Users browsing this thread: 1 Guest(s)