Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Tiberian Technologies Forum » [REQUEST]Sound on turret rotate
Re: [REQUEST]Sound on turret rotate [message #478237 is a reply to message #478104] Thu, 27 December 2012 18:35 Go to previous messageGo to previous message
Omar007 is currently offline  Omar007
Messages: 1711
Registered: December 2007
Location: Amsterdam
Karma:
General (1 Star)
It does allow you to do whatever you want and it's more of a personal preference but I'd like to be able to give a function pointer instead of a number so that that function is executed when the timer ends instead of the Timer_Expired function where you have to check the number.

So kinda like
//Ampersand is actually optional but just added it to make it obvious that I'm giving the address of the function to the timer
Commands->Start_Timer(obj, this, 0.5f, &myFunction);

public void myFunction()
{
    //Do stuff
}


It'd also make it readable what the job of the timer is by reading the name of the function attached to it. (assuming the programmer named it 'harvesterCheckTimer' and not 'timer123' or something)

But as I said it is more of a personal thing. The system does not suck in that it is limited or anything. It's just that it could be done in a more useable manner.
Scripts wouldn't ever need custom timer numbers to be set in LE.
You would never have the problem of Script A and Script B both running a timer with number 1337 on the same object. (if Timer_Expired is indeed only called on the calling script and not on the object, you don't have this problem anyway; it has been a while so I'm not sure which one it was)


http://tiberiumredux.omarpakker.nl/Old Unused Parts/Plaatjes/PromoteBanner_Hades_small.jpg

[Updated on: Thu, 27 December 2012 18:53]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Going away for Xmas
Next Topic: [outdated] How to get TT working under Wine (Linux)
Goto Forum:
  


Current Time: Tue May 28 18:55:52 MST 2024

Total time taken to generate the page: 0.00851 seconds