Time Counter.

ceriux

Adventurer
Joined
Feb 17, 2005
Messages
2,297
Reaction score
5
Age
36
Location
At my computer :)
Would be able to know what time it is in game time... since the blacksmith in edana only opens at 7 and i have no idea what time it is -.-
 

J-M v2.5.5

BANNED
BANNED
Joined
Feb 26, 2005
Messages
5,675
Reaction score
1
Age
35
Location
Nijmegen, the Netherlands.
Bind a key to "time". Now hit that key and look in the bottom-right of your screen.
Or change the time yourself using settime [value] in the console ([value] ranges from 0 to 24).
 

J-M v2.5.5

BANNED
BANNED
Joined
Feb 26, 2005
Messages
5,675
Reaction score
1
Age
35
Location
Nijmegen, the Netherlands.
Yes, but only for a certain amount of time. The clock is a bit slower (or faster, but I think it's slower) than the time, regardless of what time you set the game time to.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Well, I'm sorry we don't have digital quartz crystal accuracy. :p

worlditems/block_base.script:
Code:
// Clock brush
{  game_spawn

   	setangle face.x 0
	setprop ent_me speed 0
	setvard local.lasthour -1
	setvard local.lastminute -1
}


   //Syncronize the time
{	worldevent_time

	//~3300 speed == 1 rotation / second

	if( local.updatehourhand ) callevent set_hour_hand PARAM1 PARAM3
	if( local.updateminutehand ) callevent set_minute_hand PARAM2 PARAM3
}


{	set_hour_hand


	if PARAM1 != local.lasthour

	//Calculate the hour hand position
	local L_HOUR_POSITION PARAM1
	multiply L_HOUR_POSITION 30

	local L_MIN_OFFSET PARAM1
	divide L_MIN_OFFSET 60
	multiply L_MIN_OFFSET 30

	local L_HAND_POSITION L_HOUR_POSITION
	add L_HAND_POSITION L_MIN_OFFSET
	
	multiply L_HAND_POSITION -1
 	setangle face.x L_HAND_POSITION
	setvard local.lasthour PARAM1
   	
	//Calulate the speed
	local L_HAND_SPEED -3220	//Negative to go clockwise
	divide L_HAND_SPEED 43200  	//12 * 3600
	multiply L_HAND_SPEED PARAM2
	setprop ent_me avelocity $vec(L_HAND_SPEED,0,0)
}

{	set_minute_hand


	if PARAM1 != local.lastminute

	//Calculate the minute hand position
	local L_HAND_POSITION PARAM1
	divide L_HAND_POSITION 60
	multiply L_HAND_POSITION 360

	multiply L_HAND_POSITION -1
 	setangle face.x L_HAND_POSITION
	setvard local.lastminute PARAM2
   	
	//Calulate the speed
	local L_HAND_SPEED -3220	//Negative to go clockwise
	divide L_HAND_SPEED 3600  	//
	multiply L_HAND_SPEED PARAM2
	setprop ent_me avelocity $vec(L_HAND_SPEED,0,0)
}

Suspect it has something to do with the hand velocity not being quite equal to the time. Be hard to compensate for with any accuracy (especially since script math only lets you float two places.) Tis strange though - it looks as though it should reset every hour.
 
Top