Jump to content


Newbie DarkRadiant Questions

7453 replies to this topic

#7451 Destined


    Advanced Member

  • Member
  • PipPipPip
  • 1120 posts

Posted 20 June 2017 - 08:02 AM

Which is why I suggested it. As I said, you will have to set a starting time anyway (except you want to start at exactly 0.00), so it should not really matter.




Right, yes that will work. Thanks Destined. :D

Glad I could help.

#7452 Aosys



  • Member
  • PipPip
  • 166 posts

Posted 20 June 2017 - 11:11 AM

Ah, I should probably specify one thing: the script I got is from the wiki, specifically this page:




I realize that main is where you activate scripts at map start, but trying to do so would only trigger the first runClock method because of some kind of conflict. So if I had something like

void main ()
	runClock($clock_hand_big, $clock_hand_small);
	runClockDummy($clock_hand_big2, $clock_hand_small2);
	runClockDummy($clock_hand_big3, $clock_hand_small3);
	runClockDummy($clock_hand_big4, $clock_hand_small4);

only the line after sys.waitFrame() gets activated. That's why I tried using the "starting the clock during the mission" method, which is what's broken currently.

#7453 Obsttorte


    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPip
  • 4921 posts

Posted 20 June 2017 - 02:59 PM

This is because it will wait for the first command to be executed before proceeding with the next one. As this one however contains an infinite loop, all oncoming code is unreachable. The code will behave like this in any case, independent on whether you place it in the main method or somewhere else. You have to start the functions as threads to get them to work in parallel. So your main method has to look like this:

void main()
    thread runClock($clock_hand_big, $clock_hand_small);
    thread runClockDummy($clock_hand_big2, $clock_hand_small2);
    thread runClockDummy($clock_hand_big3, $clock_hand_small3);
    thread runClockDummy($clock_hand_big4, $clock_hand_small4);

  • Aosys likes this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#7454 Aosys



  • Member
  • PipPip
  • 166 posts

Posted 20 June 2017 - 05:20 PM

Thanks for the help guys, that fixed it! Should the wiki page maybe be updated to reflect this solution/add the angles approach?

Reply to this topic


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users