Sign in to follow this  
Guest cwright

Dynamic objects problem

Recommended Posts

Hello all, I've started to play with dynamic objects, with the possible objective of adding dynamic object creation to AutoAsm so that, for example, moving traffic could be added along VTP roads. Thanks to Edgar for his 'Dynamic Scenery Design Notes', which got me going. My current objective is to make a large number of instances of an object follow the same path. I used a modified file as a test which I include below. The objects all follow the same path, but with delays to separate them. If I add two Cessnas then it works fine. But if I try to add a third Cessna it fails. One Cessna follows the path correctly while the second (or the second and third!) stays at the start of the path without moving. If anyone could tell me where I'm going wrong I'd be most grateful. Many thanks. Best regards, Chris*****************************************************************************************************include dyn_header.incdata_base label word; DATABASE HEADER ******************************************************** dw 0001 ;00 world set number dd 6167745 ;02 N bound Meter units - N55:30:00 dd 5500962 ;06 S bound - N49:30:00 dd 202817900 ;10 E bound 32-bit pseudo degrees -E17:30:00 dd 119304647 ;14 W bound - E11:00:00 dd 0 ;18 VOR_DATA dw 0 ;22 lowest vor freq (channel 0-199) dw 0 ;24 highest vor freq (108.00-117.95) dd 0 ;26 seeds level 8 dd 0 ;30 seeds level 9 dd 0 ;34 seeds level 10 dd 0 ;38 seeds level 11 dd 0 ;42 seeds level 12 dd 0 ;46 seeds level 13 dd 0 ;50 seeds level 14 dd 0 ;54 seeds level 15 dd 0 ;58 OBJECT_DATA dd 0 ;62 LIBRARY_DATA dd 0 ;66 FACILITIES_DATA dd 0 ;70 ANCHOR POINT DATA dd 0 ;74 COM RADIO DATA dd 0 ;78 ADF DATD_LAT48A dd dyn_path_data - data_base ;82 DYNAMIC OBJECT PATHS dd 0,0 ;86 Library id min dd 0,0 ;94 Library id max dd 0 ;102 MISC_DATA (ground alt db) dd 0 ;106 TITLE AND DESCRIPTION DATA dd 0 ;110 dd 0 ;114 EXCEPTION LIST PTR dd 0 ;118 dd 0 ;122 (not saved to filelist) dw 0 ;126 (not saved to filelist) ;128; DYN_PATH DATABASE *********************************************************dyn_path_data label wordrel_base = dyn_path_data LATBAND_REL 11069,11720,dyn_data_1 ; Berlin area - N51:00:00-N54:00:00 EOL; loading section ***********************************************************dyn_data_1 label word FE_DYNAMIC_HEADER 11720, 11069, 2548, 2184, dynamic_end ; N51:00:00-N54:00:00 ; this is the loading bounds DYN_PATH_HEAD 11720+300, 11069-600, 2548, 2184; activation section ******************************************************** SET_LAT_ANCHOR 5831143, 47736 ; N52:28:16eddi_cessna1 label word ADD_OBJECT MODEL_CESSNA_ID,eddi_behave1,00110000b+0eddi_cessna2 label word ADD_OBJECT MODEL_CESSNA_ID,eddi_behave2,00110000b+1 ;******** If the following two lines are enabled it fails! ***********;eddi_cessna3 label word ; ADD_OBJECT MODEL_CESSNA_ID,eddi_behave3,00110000b+2DYN_EOF; ------------------------------; eddi_behave1 - Cessna 1; ------------------------------eddi_behave1 label word SET_COLOR 0,C_DARK_OLIVE ; spinner SET_COLOR 1,C_DARK_OLIVE ; top fuselage SET_COLOR 2,C_LIGHT_BLUE ; bottom fuselage SET_COLOR 3,C_DARK_OLIVE ; stabs SET_COLOR 4,C_DARK_OLIVE ; wing SET_LLA 5832865, 7683 , 159749460, 22734 , 50, 0 ;DWAIT 0 DCALL cessna_path_0 DJUMP eddi_behave1; ------------------------------; eddi_behave2 - Cessna 2; ------------------------------eddi_behave2 label word SET_COLOR 0,C_DARK_OLIVE ; spinner SET_COLOR 1,C_DARK_OLIVE ; top fuselage SET_COLOR 2,C_LIGHT_BLUE ; bottom fuselage SET_COLOR 3,C_DARK_OLIVE ; stabs SET_COLOR 4,C_DARK_OLIVE ; wing SET_LLA 5832865, 7683 , 159749460, 22734 , 50, 0 DWAIT 5 DCALL cessna_path_0 DJUMP eddi_behave2; ------------------------------; eddi_behave3 - Cessna 3; ------------------------------eddi_behave3 label word SET_COLOR 0,C_DARK_OLIVE ; spinner SET_COLOR 1,C_DARK_OLIVE ; top fuselage SET_COLOR 2,C_LIGHT_BLUE ; bottom fuselage SET_COLOR 3,C_DARK_OLIVE ; stabs SET_COLOR 4,C_DARK_OLIVE ; wing SET_LLA 5832865, 7683 , 159749460, 22734 , 50, 0 DWAIT 10 DCALL cessna_path_0 DJUMP eddi_behave3cessna_path_0 label word SET_HEADING 16201 MOVE_XYZ 10, 744,0, 0 SET_HEADING 16201 MOVE_XYZ 10, 68,0, 0 SET_HEADING 16201 MOVE_XYZ 10, 68,0, 0 SET_HEADING 16201 MOVE_XYZ 10, 72,0, 0 SET_HEADING 24393 MOVE_XYZ 10, 44,0,-43 SET_HEADING 6007 MOVE_XYZ 10,-69,0,-105 SET_HEADING 6007 MOVE_XYZ 10,-73,0,-110 SET_HEADING 6189 MOVE_XYZ 10,-137,0,-196 SET_HEADING 5825 MOVE_XYZ 10,-69,0,-110 SET_HEADING 5825 MOVE_XYZ 10,-69,0,-110 SET_HEADING 6189 MOVE_XYZ 10,-137,0,-196 SET_HEADING 6007 MOVE_XYZ 10,-69,0,-105 SET_HEADING 5825 MOVE_XYZ 10,-137,0,-215 etc etc.............................. SET_HEADING 32768 MOVE_XYZ 10, 0,0,-215 SET_HEADING 32768 MOVE_XYZ 10, 0,0,-105 SET_HEADING 32768 MOVE_XYZ 10, 0,0,-115 SET_HEADING 32768 MOVE_XYZ 10, 0,0,-215 DRETURNdynamic_end label wordEOL

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this