Home AMX User Forum AMXForums Archive Threads Residential Forum

Timeline Problem

glr-ftiglr-fti Junior MemberPosts: 286
Does anyone know why this timeline event does not trigger when I use the array that is commented out? It triggers if I specify the timeline id as shown but not if I use the array. Thanks.

DEFINE_CONSTANT
LONG Camera_Sequence_TL[] =
{  
			 65204
			,65205
			,65206
			,65207
			,65208
			,65209
			,65210
			,65211
			,65212
			,65213
			,65214
			,65215
			,65216
			,65217
			,65218
			,65219
			,65220
			,65221
			,65222
			,65223
}
LONG 			Camera_Sequence_TL_Times[] = {2500,5000,7500,10000,12500,15000,17500,20000,22500,25000,27500,30000,32500,35000,37500}

DEFINE_EVENT
// Camera Sequencing
BUTTON_EVENT[dvTP,288]
{                
    PUSH:
    {
    	nTP_NUM=GET_LAST(dvTP)					// WHICH TP IS THIS?
	SEND_STRING 0,"ITOA(Camera_Sequence_TL[NTP_NUM])"
	TIMELINE_CREATE(Camera_Sequence_TL[ntp_num],Camera_Sequence_TL_Times,LENGTH_ARRAY(Camera_Sequence_TL_Times),TIMELINE_RELATIVE,TIMELINE_REPEAT)
    }
}
TIMELINE_EVENT[65204]
TIMELINE_EVENT[65205]
TIMELINE_EVENT[65206]
TIMELINE_EVENT[65207]
TIMELINE_EVENT[65208]
TIMELINE_EVENT[65209]
TIMELINE_EVENT[65210]
TIMELINE_EVENT[65211]
TIMELINE_EVENT[65212]
TIMELINE_EVENT[65213]
TIMELINE_EVENT[65214]
TIMELINE_EVENT[65215]
TIMELINE_EVENT[65216]
TIMELINE_EVENT[65217]
TIMELINE_EVENT[65218]
TIMELINE_EVENT[65219]
TIMELINE_EVENT[65220]
TIMELINE_EVENT[65221]
TIMELINE_EVENT[65222]
TIMELINE_EVENT[65223]
/*TIMELINE_EVENT[Camera_Sequence_TL[1]]
TIMELINE_EVENT[Camera_Sequence_TL[2]]
TIMELINE_EVENT[Camera_Sequence_TL[3]]
TIMELINE_EVENT[Camera_Sequence_TL[4]]
TIMELINE_EVENT[Camera_Sequence_TL[5]]
TIMELINE_EVENT[Camera_Sequence_TL[6]]
TIMELINE_EVENT[Camera_Sequence_TL[7]]
TIMELINE_EVENT[Camera_Sequence_TL[8]]
TIMELINE_EVENT[Camera_Sequence_TL[9]]
TIMELINE_EVENT[Camera_Sequence_TL[10]]
TIMELINE_EVENT[Camera_Sequence_TL[11]]
TIMELINE_EVENT[Camera_Sequence_TL[12]]
TIMELINE_EVENT[Camera_Sequence_TL[13]]
TIMELINE_EVENT[Camera_Sequence_TL[14]]
TIMELINE_EVENT[Camera_Sequence_TL[15]]
TIMELINE_EVENT[Camera_Sequence_TL[16]]
TIMELINE_EVENT[Camera_Sequence_TL[17]]
TIMELINE_EVENT[Camera_Sequence_TL[18]]
TIMELINE_EVENT[Camera_Sequence_TL[19]]
TIMELINE_EVENT[Camera_Sequence_TL[20]]
TIMELINE_EVENT[Camera_Sequence_TL[21]]*/
{                          
    send_string 0,"'sequence= ',timeline.sequence,'   Timeline id =',itoa(timeline.id)"
    SEND_STRING dvAutoPatchOptima,"'CI',ITOA(TIMELINE.SEQUENCE),'O',ITOA(timeline.id-65203),'T'"
}

Comments

  • DHawthorneDHawthorne Old Timer Posts: 4,584
    Off hand, I'd say the TIMELINE_EVENT doesn't handle arrays. The documentation is not real clear on what events do and what do not, but it doesn't surprise me in this case; timelines were always a bit different than other event types.
  • dchristodchristo Junior Member Posts: 177
    It may have to do with how you're defining the constant. Instead of LONG Camera_Sequence_TL[], try using LONG Camera_Sequence_TL[20] to specify the length of the array.

    --D
  • Joe HebertJoe Hebert Junior Member Posts: 2,159
    I can confirm that TIMELINE arrays do not work at this time.

    Check out tech note 657
  • glr-ftiglr-fti Junior Member Posts: 286
    Thanks for the replies. I guess I need to hard code the id.
Sign In or Register to comment.