Difference between revisions of "CPU-usage of Functions"

94 bytes removed ,  17:23, 13 September 2007
Well blast, that didn't work
imported>Haama
(Ok, that should make things "easier")
imported>Haama
(Well blast, that didn't work)
Line 29: Line 29:
Start out by finding the base (or control) FPS. Add only the tracker item through the console ('''player.AddItem YourTrackerItem 1''') and write down the FPS. Then add both the tracker and a single test item (don't leave the console in-between adding the two), write down the message, and remove the test items ('''player.RemoveItem YourTestItem #'''). Continue alternating between the two tests, and mix up how many test items you add.
Start out by finding the base (or control) FPS. Add only the tracker item through the console ('''player.AddItem YourTrackerItem 1''') and write down the FPS. Then add both the tracker and a single test item (don't leave the console in-between adding the two), write down the message, and remove the test items ('''player.RemoveItem YourTestItem #'''). Continue alternating between the two tests, and mix up how many test items you add.


Here's an easier way to do the tests above. Note that it will automatically alternate tests for you, and you can set NumTestItems to however many you would like to test through the console ('''set YourQuest.NumTestItems to #'''), and pItem to the test item through the console ('''set YourQuest.pItem to ########''', with the FormID). Add this script to a quest, and start it through the console ('''StartQuest YourQuest''').
Here's an easier way to do the tests above. Note that it will automatically alternate tests for you, and you can set NumTestItems to however many you would like to test through the console ('''set YourQuest.NumTestItems to #'''). Add this script to a quest, and start it through the console ('''StartQuest YourQuest''').
<pre>scn aaaTesterScript
<pre>scn aaaTesterScript


ref pItem
short NumTestItems
short NumTestItems
short Testing
short Testing
Line 40: Line 39:
begin GameMode
begin GameMode
   set fQuestDelayTime to .01 ;so you don't have to wait
   set fQuestDelayTime to .01 ;so you don't have to wait
   set ItemCount to (player.GetItemCount pItem)
   set ItemCount to (player.GetItemCount YourTestItem)
   if ItemCount
   if ItemCount
     player.RemoveItem pItem ItemCount
     player.RemoveItem YourTestItem ItemCount
   endif
   endif
   if (Testing == 0) ;Control tests
   if (Testing == 0) ;Control tests
Line 49: Line 48:
   else
   else
     player.AddItem YourTrackerItem 1
     player.AddItem YourTrackerItem 1
     player.AddItem pItem NumTestItems
     player.AddItem YourTestItem NumTestItems
     set Testing to 0
     set Testing to 0
   endif
   endif
Anonymous user