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
Daniel Breathing?
xiphirx Offline
Senior Member

Posts: 662
Threads: 16
Joined: Nov 2010
Reputation: 5
#10
RE: Daniel Breathing?

Sorry, but I am unsure as to whether you know why I used floats and not integers...

You do know that the definition of the function prototype is as follows?
void AddTimer(string& asName, float afTime, string& asFunction);

You see, it is supposed to take a float value in, not an integer. This keeps the game from converting the integer into a float at runtime, which is slightly faster. It also gets you into a good habit of following things how they're supposed to be used rather then just using "what works".

Also, my point is that you do not need "Breathe02", you just need one function that repeatedly calls itself. You missed putting an argument for the timer so it would repeat itself, which is why it didn't work in the first place.

It's not a matter of opinion, my code is the correct way to do it.

05-31-2011, 12:31 AM
Find


Messages In This Thread
Daniel Breathing? - by laser50 - 05-30-2011, 12:07 PM
RE: Daniel Breathing? - by Kyle - 05-30-2011, 01:01 PM
RE: Daniel Breathing? - by laser50 - 05-30-2011, 10:29 PM
RE: Daniel Breathing? - by xiphirx - 05-30-2011, 10:46 PM
RE: Daniel Breathing? - by Kyle - 05-30-2011, 11:05 PM
RE: Daniel Breathing? - by xiphirx - 05-30-2011, 11:06 PM
RE: Daniel Breathing? - by Kyle - 05-30-2011, 11:09 PM
RE: Daniel Breathing? - by xiphirx - 05-30-2011, 11:49 PM
RE: Daniel Breathing? - by Kyle - 05-31-2011, 12:22 AM
RE: Daniel Breathing? - by xiphirx - 05-31-2011, 12:31 AM



Users browsing this thread: 1 Guest(s)