GS-Zone

Particulas Ir al Indice

Moderadores: Moderadores de Argentum, Especialistas de Argentum, Especialistas de Programación

28
Este tema se encuentra cerrado.

Nota » 23 Ene 2012 15:34

Estuve jugando como vos desis god pero hay veces aparece poco creo que llegue meterle hasta 70 xD

Y miqueas, vos querias algo sobre partìculas. Acà tenes :D

  1. Private Function Particle_Group_Next_Open() As Long
  2. '*****************************************************************
  3. 'Author: Aaron Perkins
  4. 'Last Modify Date: 10/07/2002
  5. '
  6. '*****************************************************************
  7. On Error GoTo ErrorHandler:
  8.     Dim loopc As Long
  9.    
  10.     If particle_group_last = 0 Then
  11.         Particle_Group_Next_Open = 1
  12.         Exit Function
  13.     End If
  14.    
  15.     loopc = 1
  16.     Do Until particle_group_list(loopc).active = False
  17.         If loopc = particle_group_last Then
  18.             Particle_Group_Next_Open = particle_group_last + 1
  19.             Exit Function
  20.         End If
  21.         loopc = loopc + 1
  22.     Loop
  23.    
  24.     Particle_Group_Next_Open = loopc
  25. Exit Function
  26. ErrorHandler:
  27.     Particle_Group_Next_Open = 1
  28. End Function
  29.  
  30. Private Function Particle_Group_Check(ByVal particle_group_index As Long) As Boolean
  31. '**************************************************************
  32. 'Author: Aaron Perkins
  33. 'Last Modify Date: 1/04/2003
  34. '
  35. '**************************************************************
  36.     'check index
  37.     If particle_group_index > 0 And particle_group_index <= particle_group_last Then
  38.         If particle_group_list(particle_group_index).active Then
  39.             Particle_Group_Check = True
  40.         End If
  41.     End If
  42. End Function
  43.  
  44. Public Function Particle_Group_Create(ByVal map_x As Integer, ByVal map_y As Integer, ByRef grh_index_list() As Long, ByRef rgb_list() As Long, _
  45.                                         Optional ByVal particle_count As Long = 20, Optional ByVal stream_type As Long = 1, _
  46.                                         Optional ByVal alpha_blend As Boolean, Optional ByVal alive_counter As Long = -1, _
  47.                                         Optional ByVal frame_speed As Single = 0.5, Optional ByVal id As Long, _
  48.                                         Optional ByVal x1 As Integer, Optional ByVal y1 As Integer, Optional ByVal angle As Integer, _
  49.                                         Optional ByVal vecx1 As Integer, Optional ByVal vecx2 As Integer, _
  50.                                         Optional ByVal vecy1 As Integer, Optional ByVal vecy2 As Integer, _
  51.                                         Optional ByVal life1 As Integer, Optional ByVal life2 As Integer, _
  52.                                         Optional ByVal fric As Integer, Optional ByVal spin_speedL As Single, _
  53.                                         Optional ByVal gravity As Boolean, Optional grav_strength As Long, _
  54.                                         Optional bounce_strength As Long, Optional ByVal x2 As Integer, Optional ByVal y2 As Integer, _
  55.                                         Optional ByVal XMove As Boolean, Optional ByVal move_x1 As Integer, Optional ByVal move_x2 As Integer, _
  56.                                         Optional ByVal move_y1 As Integer, Optional ByVal move_y2 As Integer, Optional ByVal YMove As Boolean, _
  57.                                         Optional ByVal spin_speedH As Single, Optional ByVal spin As Boolean, Optional grh_resize As Boolean, _
  58.                                         Optional grh_resizex As Integer, Optional grh_resizey As Integer)
  59. '**************************************************************
  60. 'Author: Aaron Perkins
  61. 'Modified by: Ryan Cain (Onezero)
  62. 'Last Modify Date: 5/14/2003
  63. 'Returns the particle_group_index if successful, else 0
  64. 'Modified by Juan Martín Sotuyo Dodero
  65. 'Modified by Augusto José Rando
  66. '**************************************************************
  67.    
  68.     If (map_x <> -1) And (map_y <> -1) Then
  69.         If Map_Particle_Group_Get(map_x, map_y) = 0 Then
  70.             Particle_Group_Create = Particle_Group_Next_Open
  71.             Particle_Group_Make Particle_Group_Create, map_x, map_y, particle_count, stream_type, grh_index_list(), rgb_list(), alpha_blend, alive_counter, frame_speed, id, x1, y1, angle, vecx1, vecx2, vecy1, vecy2, life1, life2, fric, spin_speedL, gravity, grav_strength, bounce_strength, x2, y2, XMove, move_x1, move_x2, move_y1, move_y2, YMove, spin_speedH, spin, grh_resize, grh_resizex, grh_resizey
  72.         End If
  73.     Else
  74.         Particle_Group_Create = Particle_Group_Next_Open
  75.         Particle_Group_Make Particle_Group_Create, map_x, map_y, particle_count, stream_type, grh_index_list(), rgb_list(), alpha_blend, alive_counter, frame_speed, id, x1, y1, angle, vecx1, vecx2, vecy1, vecy2, life1, life2, fric, spin_speedL, gravity, grav_strength, bounce_strength, x2, y2, XMove, move_x1, move_x2, move_y1, move_y2, YMove, spin_speedH, spin, grh_resize, grh_resizex, grh_resizey
  76.     End If
  77.  
  78. End Function
  79.  
  80. Public Function Particle_Group_Remove(ByVal particle_group_index As Long) As Boolean
  81. '*****************************************************************
  82. 'Author: Aaron Perkins
  83. 'Last Modify Date: 1/04/2003
  84. '
  85. '*****************************************************************
  86.     'Make sure it's a legal index
  87.     If Particle_Group_Check(particle_group_index) Then
  88.         Particle_Group_Destroy particle_group_index
  89.         Particle_Group_Remove = True
  90.     End If
  91. End Function
  92.  
  93. Public Function Particle_Group_Remove_All() As Boolean
  94. '*****************************************************************
  95. 'Author: Aaron Perkins
  96. 'Last Modify Date: 1/04/2003
  97. '
  98. '*****************************************************************
  99.     Dim Index As Long
  100.    
  101.     For Index = 1 To particle_group_last
  102.         'Make sure it's a legal index
  103.         If Particle_Group_Check(Index) Then
  104.             Particle_Group_Destroy Index
  105.         End If
  106.     Next Index
  107.    
  108.     Particle_Group_Remove_All = True
  109. End Function
  110.  
  111. Public Function Particle_Group_Find(ByVal id As Long) As Long
  112. '*****************************************************************
  113. 'Author: Aaron Perkins
  114. 'Last Modify Date: 1/04/2003
  115. 'Find the index related to the handle
  116. '*****************************************************************
  117. On Error GoTo ErrorHandler:
  118.     Dim loopc As Long
  119.    
  120.     loopc = 1
  121.     Do Until particle_group_list(loopc).id = id
  122.         If loopc = particle_group_last Then
  123.             Particle_Group_Find = 0
  124.             Exit Function
  125.         End If
  126.         loopc = loopc + 1
  127.     Loop
  128.    
  129.     Particle_Group_Find = loopc
  130. Exit Function
  131. ErrorHandler:
  132.     Particle_Group_Find = 0
  133. End Function
  134. Public Function Particle_Get_Type(ByVal particle_group_index As Long) As Byte
  135. On Error GoTo ErrorHandler:
  136.     Particle_Get_Type = particle_group_list(particle_group_index).stream_type
  137. Exit Function
  138. ErrorHandler:
  139.     Particle_Get_Type = 0
  140. End Function
  141. Private Sub Particle_Group_Destroy(ByVal particle_group_index As Long)
  142. '**************************************************************
  143. 'Author: Aaron Perkins
  144. 'Last Modify Date: 10/07/2002
  145. '
  146. '**************************************************************
  147. On Error Resume Next
  148.     Dim temp As particle_group
  149.     Dim i As Integer
  150.    
  151.     If particle_group_list(particle_group_index).map_x > 0 And particle_group_list(particle_group_index).map_y > 0 Then
  152.         MapData(particle_group_list(particle_group_index).map_x, particle_group_list(particle_group_index).map_y).particle_group_index = 0
  153.     ElseIf particle_group_list(particle_group_index).char_index Then
  154.         If Char_Check(particle_group_list(particle_group_index).char_index) Then
  155.             For i = 1 To charlist(particle_group_list(particle_group_index).char_index).particle_count
  156.                 If charlist(particle_group_list(particle_group_index).char_index).particle_group(i) = particle_group_index Then
  157.                     charlist(particle_group_list(particle_group_index).char_index).particle_group(i) = 0
  158.        
  159.                     'We don't resize arrays by now, it's really a waste...
  160.                     'If i = UBound(CharList(particle_group_list(particle_group_index).char_index).particle_group) Then
  161.                     '    CharList(particle_group_list(particle_group_index).char_index).particle_count = i - 1
  162.                     '    ReDim Preserve CharList(particle_group_list(particle_group_index).char_index).particle_group(1 To (i - 1)) As Long
  163.                     'End If
  164.        
  165.                     Exit For
  166.                 End If
  167.             Next i
  168.         End If
  169.     ElseIf particle_group_index = meteo_particle Then
  170.         meteo_particle = 0
  171.     End If
  172.    
  173.     particle_group_list(particle_group_index) = temp
  174.    
  175.     'Update array size
  176.     If particle_group_index = particle_group_last Then
  177.         Do Until particle_group_list(particle_group_last).active
  178.             particle_group_last = particle_group_last - 1
  179.             If particle_group_last = 0 Then
  180.                 particle_group_count = 0
  181.                 Exit Sub
  182.             End If
  183.         Loop
  184.         Debug.Print particle_group_last & "," & UBound(particle_group_list)
  185.         ReDim Preserve particle_group_list(1 To particle_group_last) As particle_group
  186.     End If
  187.     particle_group_count = particle_group_count - 1
  188. End Sub
  189. Private Sub Particle_Group_Render(ByVal particle_group_index As Long, ByVal screen_x As Integer, ByVal screen_y As Integer)
  190. '*****************************************************************
  191. 'Author: Aaron Perkins
  192. 'Modified by: Ryan Cain (Onezero)
  193. 'Modified by: Juan Martín Sotuyo Dodero
  194. 'Last Modify Date: 5/15/2003
  195. 'Renders a particle stream at a paticular screen point
  196. '*****************************************************************
  197.     Dim loopc As Long
  198.     Dim temp_rgb(0 To 3) As Long
  199.     Dim no_move As Boolean
  200.    
  201.     If GetTickCount - particle_group_list(particle_group_index).live > particle_group_list(particle_group_index).liv1 And Not particle_group_list(particle_group_index).liv1 = -1 Then
  202.         Particle_Group_Destroy particle_group_index
  203.         Exit Sub
  204.     End If
  205.        
  206.     With particle_group_list(particle_group_index)
  207.         'Set colors
  208.         temp_rgb(0) = .rgb_list(0)
  209.         temp_rgb(1) = .rgb_list(1)
  210.         temp_rgb(2) = .rgb_list(2)
  211.         temp_rgb(3) = .rgb_list(3)
  212.        
  213.         If GetTickCount - .live > .liv1 And Not .liv1 = -1 Then
  214.             Particle_Group_Destroy particle_group_index
  215.             Exit Sub
  216.         End If
  217.        
  218.         'See if it is time to move a particle
  219.         .frame_counter = .frame_counter + timerTicksPerFrame
  220.         If .frame_counter > .frame_speed Then
  221.             .frame_counter = 0
  222.             no_move = False
  223.         Else
  224.             no_move = True
  225.         End If
  226.            
  227.         'If it's still alive render all the particles inside
  228.         For loopc = 1 To .particle_count
  229.                
  230.         'Render particle
  231.             Particle_Render .particle_stream(loopc), _
  232.                         screen_x, screen_y, _
  233.                         .grh_index_list(Round(General_Random_Number(1, .grh_index_count), 0)), _
  234.                         temp_rgb(), _
  235.                         .alpha_blend, no_move, _
  236.                         .x1, .y1, .angle, _
  237.                         .vecx1, .vecx2, _
  238.                         .vecy1, .vecy2, _
  239.                         .life1, .life2, _
  240.                         .fric, .spin_speedL, _
  241.                         .gravity, .grav_strength, _
  242.                         .bounce_strength, .x2, _
  243.                         .y2, .XMove, _
  244.                         .move_x1, .move_x2, _
  245.                         .move_y1, .move_y2, _
  246.                         .YMove, .spin_speedH, _
  247.                         .spin, .grh_resize, .grh_resizex, .grh_resizey
  248.         Next loopc
  249.                
  250.     If no_move = False Then
  251.         'Update the group alive counter
  252.         If .never_die = False Then
  253.             .alive_counter = .alive_counter - 1
  254.         End If
  255.     End If
  256.    
  257.        
  258.     End With
  259. End Sub
  260.  
  261.  
  262. Private Sub Particle_Render(ByRef temp_particle As Particle, ByVal screen_x As Integer, ByVal screen_y As Integer, _
  263.                             ByVal grh_index As Long, ByRef rgb_list() As Long, _
  264.                             Optional ByVal alpha_blend As Boolean, Optional ByVal no_move As Boolean, _
  265.                             Optional ByVal x1 As Integer, Optional ByVal y1 As Integer, Optional ByVal angle As Integer, _
  266.                             Optional ByVal vecx1 As Integer, Optional ByVal vecx2 As Integer, _
  267.                             Optional ByVal vecy1 As Integer, Optional ByVal vecy2 As Integer, _
  268.                             Optional ByVal life1 As Integer, Optional ByVal life2 As Integer, _
  269.                             Optional ByVal fric As Integer, Optional ByVal spin_speedL As Single, _
  270.                             Optional ByVal gravity As Boolean, Optional grav_strength As Long, _
  271.                             Optional ByVal bounce_strength As Long, Optional ByVal x2 As Integer, Optional ByVal y2 As Integer, _
  272.                             Optional ByVal XMove As Boolean, Optional ByVal move_x1 As Integer, Optional ByVal move_x2 As Integer, _
  273.                             Optional ByVal move_y1 As Integer, Optional ByVal move_y2 As Integer, Optional ByVal YMove As Boolean, _
  274.                             Optional ByVal spin_speedH As Single, Optional ByVal spin As Boolean, Optional grh_resize As Boolean, _
  275.                             Optional grh_resizex As Integer, Optional grh_resizey As Integer)
  276. '**************************************************************
  277. 'Author: Aaron Perkins
  278. 'Modified by: Ryan Cain (Onezero)
  279. 'Modified by: Juan Martín Sotuyo Dodero
  280. 'Last Modify Date: 5/15/2003
  281. '**************************************************************
  282.     If no_move = False Then
  283.         If temp_particle.alive_counter = 0 Then
  284.             'Start new particle
  285.             InitGrh temp_particle.Grh, grh_index, alpha_blend
  286.             temp_particle.x = General_Random_Number(x1, x2) - 16
  287.             temp_particle.y = General_Random_Number(y1, y2) - 16
  288.             temp_particle.vector_x = General_Random_Number(vecx1, vecx2)
  289.             temp_particle.vector_y = General_Random_Number(vecy1, vecy2)
  290.             temp_particle.angle = angle
  291.             temp_particle.alive_counter = General_Random_Number(life1, life2)
  292.             temp_particle.friction = fric
  293.         Else
  294.             'Continue old particle
  295.             'Do gravity
  296.             If gravity = True Then
  297.                 temp_particle.vector_y = temp_particle.vector_y + grav_strength
  298.                 If temp_particle.y > 0 Then
  299.                     'bounce
  300.                     temp_particle.vector_y = bounce_strength
  301.                 End If
  302.             End If
  303.             'Do rotation
  304.             If spin = True Then temp_particle.Grh.angle = temp_particle.Grh.angle + (General_Random_Number(spin_speedL, spin_speedH) / 100)
  305.             If temp_particle.angle >= 360 Then
  306.                 temp_particle.angle = 0
  307.             End If
  308.            
  309.             If XMove = True Then temp_particle.vector_x = General_Random_Number(move_x1, move_x2)
  310.             If YMove = True Then temp_particle.vector_y = General_Random_Number(move_y1, move_y2)
  311.         End If
  312.        
  313.         'Add in vector
  314.         temp_particle.x = temp_particle.x + (temp_particle.vector_x \ temp_particle.friction)
  315.         temp_particle.y = temp_particle.y + (temp_particle.vector_y \ temp_particle.friction)
  316.    
  317.         'decrement counter
  318.          temp_particle.alive_counter = temp_particle.alive_counter - 1
  319.     End If
  320.    
  321.     'Draw it
  322.     If grh_resize = True Then
  323.         If temp_particle.Grh.grhindex Then
  324.              Grh_Render_Advance temp_particle.Grh, temp_particle.x + screen_x, temp_particle.y + screen_y, grh_resizex, grh_resizey, rgb_list(), True, True, alpha_blend
  325.             Exit Sub
  326.         End If
  327.     End If
  328.     If temp_particle.Grh.grhindex Then
  329.         Grh_Render temp_particle.Grh, temp_particle.x + screen_x, temp_particle.y + screen_y, rgb_list(), True, True, alpha_blend
  330.     End If
  331. End Sub
  332. Private Sub Particle_Group_Make(ByVal particle_group_index As Long, ByVal map_x As Integer, ByVal map_y As Integer, _
  333.                                 ByVal particle_count As Long, ByVal stream_type As Long, ByRef grh_index_list() As Long, ByRef rgb_list() As Long, _
  334.                                 Optional ByVal alpha_blend As Boolean, Optional ByVal alive_counter As Long = -1, _
  335.                                 Optional ByVal frame_speed As Single = 0.5, Optional ByVal id As Long, _
  336.                                 Optional ByVal x1 As Integer, Optional ByVal y1 As Integer, Optional ByVal angle As Integer, _
  337.                                 Optional ByVal vecx1 As Integer, Optional ByVal vecx2 As Integer, _
  338.                                 Optional ByVal vecy1 As Integer, Optional ByVal vecy2 As Integer, _
  339.                                 Optional ByVal life1 As Integer, Optional ByVal life2 As Integer, _
  340.                                 Optional ByVal fric As Integer, Optional ByVal spin_speedL As Single, _
  341.                                 Optional ByVal gravity As Boolean, Optional grav_strength As Long, _
  342.                                 Optional bounce_strength As Long, Optional ByVal x2 As Integer, Optional ByVal y2 As Integer, _
  343.                                 Optional ByVal XMove As Boolean, Optional ByVal move_x1 As Integer, Optional ByVal move_x2 As Integer, _
  344.                                 Optional ByVal move_y1 As Integer, Optional ByVal move_y2 As Integer, Optional ByVal YMove As Boolean, _
  345.                                 Optional ByVal spin_speedH As Single, Optional ByVal spin As Boolean, Optional grh_resize As Boolean, _
  346.                                 Optional grh_resizex As Integer, Optional grh_resizey As Integer)
  347.                                
  348. '*****************************************************************
  349. 'Author: Aaron Perkins
  350. 'Modified by: Ryan Cain (Onezero)
  351. 'Last Modify Date: 5/15/2003
  352. 'Makes a new particle effect
  353. 'Modified by Juan Martín Sotuyo Dodero
  354. '*****************************************************************
  355.     'Update array size
  356.     If particle_group_index > particle_group_last Then
  357.         particle_group_last = particle_group_index
  358.         ReDim Preserve particle_group_list(1 To particle_group_last)
  359.     End If
  360.     particle_group_count = particle_group_count + 1
  361.    
  362.     'Make active
  363.     particle_group_list(particle_group_index).active = True
  364.    
  365.     'Map pos
  366.     If (map_x <> -1) And (map_y <> -1) Then
  367.         particle_group_list(particle_group_index).map_x = map_x
  368.         particle_group_list(particle_group_index).map_y = map_y
  369.     End If
  370.    
  371.     'Grh list
  372.     ReDim particle_group_list(particle_group_index).grh_index_list(1 To UBound(grh_index_list))
  373.     particle_group_list(particle_group_index).grh_index_list() = grh_index_list()
  374.     particle_group_list(particle_group_index).grh_index_count = UBound(grh_index_list)
  375.    
  376.     'Sets alive vars
  377.     If alive_counter = -1 Then
  378.         particle_group_list(particle_group_index).alive_counter = -1
  379.         particle_group_list(particle_group_index).liv1 = -1
  380.         particle_group_list(particle_group_index).never_die = True
  381.     Else
  382.         particle_group_list(particle_group_index).alive_counter = alive_counter
  383.         particle_group_list(particle_group_index).liv1 = alive_counter
  384.         particle_group_list(particle_group_index).never_die = False
  385.     End If
  386.    
  387.     'alpha blending
  388.     particle_group_list(particle_group_index).alpha_blend = alpha_blend
  389.    
  390.     'stream type
  391.     particle_group_list(particle_group_index).stream_type = stream_type
  392.    
  393.     'speed
  394.     particle_group_list(particle_group_index).frame_speed = frame_speed
  395.    
  396.     particle_group_list(particle_group_index).x1 = x1
  397.     particle_group_list(particle_group_index).y1 = y1
  398.     particle_group_list(particle_group_index).x2 = x2
  399.     particle_group_list(particle_group_index).y2 = y2
  400.     particle_group_list(particle_group_index).angle = angle
  401.     particle_group_list(particle_group_index).vecx1 = vecx1
  402.     particle_group_list(particle_group_index).vecx2 = vecx2
  403.     particle_group_list(particle_group_index).vecy1 = vecy1
  404.     particle_group_list(particle_group_index).vecy2 = vecy2
  405.     particle_group_list(particle_group_index).life1 = life1
  406.     particle_group_list(particle_group_index).life2 = life2
  407.     particle_group_list(particle_group_index).fric = fric
  408.     particle_group_list(particle_group_index).spin = spin
  409.     particle_group_list(particle_group_index).spin_speedL = spin_speedL
  410.     particle_group_list(particle_group_index).spin_speedH = spin_speedH
  411.     particle_group_list(particle_group_index).gravity = gravity
  412.     particle_group_list(particle_group_index).grav_strength = grav_strength
  413.     particle_group_list(particle_group_index).bounce_strength = bounce_strength
  414.     particle_group_list(particle_group_index).XMove = XMove
  415.     particle_group_list(particle_group_index).YMove = YMove
  416.     particle_group_list(particle_group_index).move_x1 = move_x1
  417.     particle_group_list(particle_group_index).move_x2 = move_x2
  418.     particle_group_list(particle_group_index).move_y1 = move_y1
  419.     particle_group_list(particle_group_index).move_y2 = move_y2
  420.    
  421.     particle_group_list(particle_group_index).rgb_list(0) = rgb_list(0)
  422.     particle_group_list(particle_group_index).rgb_list(1) = rgb_list(1)
  423.     particle_group_list(particle_group_index).rgb_list(2) = rgb_list(2)
  424.     particle_group_list(particle_group_index).rgb_list(3) = rgb_list(3)
  425.    
  426.     particle_group_list(particle_group_index).grh_resize = grh_resize
  427.     particle_group_list(particle_group_index).grh_resizex = grh_resizex
  428.     particle_group_list(particle_group_index).grh_resizey = grh_resizey
  429.    
  430.     'handle
  431.     particle_group_list(particle_group_index).id = id
  432.    
  433.     particle_group_list(particle_group_index).live = GetTickCount()
  434.    
  435.     'create particle stream
  436.     particle_group_list(particle_group_index).particle_count = particle_count
  437.     ReDim particle_group_list(particle_group_index).particle_stream(1 To particle_count)
  438.    
  439.     'plot particle group on map
  440.     If (map_x <> -1) And (map_y <> -1) Then
  441.         MapData(map_x, map_y).particle_group_index = particle_group_index
  442.     End If
  443.    
  444. End Sub
  445. Public Function Map_Particle_Group_Get(ByVal map_x As Integer, ByVal map_y As Integer) As Long
  446. '*****************************************************************
  447. 'Author: Aaron Perkins
  448. 'Last Modify Date: 2/20/2003
  449. 'Checks to see if a tile position has a particle_group_index and return it
  450. '*****************************************************************
  451.     If InMapBounds(map_x, map_y) Then
  452.         Map_Particle_Group_Get = MapData(map_x, map_y).particle_group_index
  453.     Else
  454.         Map_Particle_Group_Get = 0
  455.     End If
  456. End Function
  457. Public Function General_Char_Particle_Create(ByVal ParticulaInd As Long, ByVal char_index As Integer, Optional ByVal particle_life As Long = 0) As Long
  458.  
  459. Dim rgb_list(0 To 3) As Long
  460. rgb_list(0) = RGB(StreamData(ParticulaInd).colortint(0).r, StreamData(ParticulaInd).colortint(0).g, StreamData(ParticulaInd).colortint(0).b)
  461. rgb_list(1) = RGB(StreamData(ParticulaInd).colortint(1).r, StreamData(ParticulaInd).colortint(1).g, StreamData(ParticulaInd).colortint(1).b)
  462. rgb_list(2) = RGB(StreamData(ParticulaInd).colortint(2).r, StreamData(ParticulaInd).colortint(2).g, StreamData(ParticulaInd).colortint(2).b)
  463. rgb_list(3) = RGB(StreamData(ParticulaInd).colortint(3).r, StreamData(ParticulaInd).colortint(3).g, StreamData(ParticulaInd).colortint(3).b)
  464.  
  465. General_Char_Particle_Create = Engine.Char_Particle_Group_Create(char_index, StreamData(ParticulaInd).grh_list, rgb_list(), StreamData(ParticulaInd).NumOfParticles, ParticulaInd, _
  466.     StreamData(ParticulaInd).AlphaBlend, IIf(particle_life = 0, StreamData(ParticulaInd).life_counter, particle_life), StreamData(ParticulaInd).speed, , StreamData(ParticulaInd).x1, StreamData(ParticulaInd).y1, StreamData(ParticulaInd).angle, _
  467.     StreamData(ParticulaInd).vecx1, StreamData(ParticulaInd).vecx2, StreamData(ParticulaInd).vecy1, StreamData(ParticulaInd).vecy2, _
  468.     StreamData(ParticulaInd).life1, StreamData(ParticulaInd).life2, StreamData(ParticulaInd).friction, StreamData(ParticulaInd).spin_speedL, _
  469.     StreamData(ParticulaInd).gravity, StreamData(ParticulaInd).grav_strength, StreamData(ParticulaInd).bounce_strength, StreamData(ParticulaInd).x2, _
  470.     StreamData(ParticulaInd).y2, StreamData(ParticulaInd).XMove, StreamData(ParticulaInd).move_x1, StreamData(ParticulaInd).move_x2, StreamData(ParticulaInd).move_y1, _
  471.     StreamData(ParticulaInd).move_y2, StreamData(ParticulaInd).YMove, StreamData(ParticulaInd).spin_speedH, StreamData(ParticulaInd).spin, _
  472.     StreamData(ParticulaInd).grh_resize, StreamData(ParticulaInd).grh_resizex, StreamData(ParticulaInd).grh_resizey)
  473.  
  474. End Function
  475.  
  476. Public Function General_Particle_Create(ByVal ParticulaInd As Long, ByVal x As Integer, ByVal y As Integer, Optional ByVal particle_life As Long = 0) As Long
  477.  
  478. Dim rgb_list(0 To 3) As Long
  479. rgb_list(0) = RGB(StreamData(ParticulaInd).colortint(0).r, StreamData(ParticulaInd).colortint(0).g, StreamData(ParticulaInd).colortint(0).b)
  480. rgb_list(1) = RGB(StreamData(ParticulaInd).colortint(1).r, StreamData(ParticulaInd).colortint(1).g, StreamData(ParticulaInd).colortint(1).b)
  481. rgb_list(2) = RGB(StreamData(ParticulaInd).colortint(2).r, StreamData(ParticulaInd).colortint(2).g, StreamData(ParticulaInd).colortint(2).b)
  482. rgb_list(3) = RGB(StreamData(ParticulaInd).colortint(3).r, StreamData(ParticulaInd).colortint(3).g, StreamData(ParticulaInd).colortint(3).b)
  483.  
  484. General_Particle_Create = Engine.Particle_Group_Create(x, y, StreamData(ParticulaInd).grh_list, rgb_list(), StreamData(ParticulaInd).NumOfParticles, ParticulaInd, _
  485.     StreamData(ParticulaInd).AlphaBlend, IIf(particle_life = 0, StreamData(ParticulaInd).life_counter, particle_life), StreamData(ParticulaInd).speed, , StreamData(ParticulaInd).x1, StreamData(ParticulaInd).y1, StreamData(ParticulaInd).angle, _
  486.     StreamData(ParticulaInd).vecx1, StreamData(ParticulaInd).vecx2, StreamData(ParticulaInd).vecy1, StreamData(ParticulaInd).vecy2, _
  487.     StreamData(ParticulaInd).life1, StreamData(ParticulaInd).life2, StreamData(ParticulaInd).friction, StreamData(ParticulaInd).spin_speedL, _
  488.     StreamData(ParticulaInd).gravity, StreamData(ParticulaInd).grav_strength, StreamData(ParticulaInd).bounce_strength, StreamData(ParticulaInd).x2, _
  489.     StreamData(ParticulaInd).y2, StreamData(ParticulaInd).XMove, StreamData(ParticulaInd).move_x1, StreamData(ParticulaInd).move_x2, StreamData(ParticulaInd).move_y1, _
  490.     StreamData(ParticulaInd).move_y2, StreamData(ParticulaInd).YMove, StreamData(ParticulaInd).spin_speedH, StreamData(ParticulaInd).spin, _
  491.     StreamData(ParticulaInd).grh_resize, StreamData(ParticulaInd).grh_resizex, StreamData(ParticulaInd).grh_resizey)
  492.  
  493. End Function
  494. Public Function Char_Particle_Group_Create(ByVal char_index As Integer, ByRef grh_index_list() As Long, ByRef rgb_list() As Long, _
  495.                                         Optional ByVal particle_count As Long = 20, Optional ByVal stream_type As Long = 1, _
  496.                                         Optional ByVal alpha_blend As Boolean, Optional ByVal alive_counter As Long = -1, _
  497.                                         Optional ByVal frame_speed As Single = 0.5, Optional ByVal id As Long, _
  498.                                         Optional ByVal x1 As Integer, Optional ByVal y1 As Integer, Optional ByVal angle As Integer, _
  499.                                         Optional ByVal vecx1 As Integer, Optional ByVal vecx2 As Integer, _
  500.                                         Optional ByVal vecy1 As Integer, Optional ByVal vecy2 As Integer, _
  501.                                         Optional ByVal life1 As Integer, Optional ByVal life2 As Integer, _
  502.                                         Optional ByVal fric As Integer, Optional ByVal spin_speedL As Single, _
  503.                                         Optional ByVal gravity As Boolean, Optional grav_strength As Long, _
  504.                                         Optional bounce_strength As Long, Optional ByVal x2 As Integer, Optional ByVal y2 As Integer, _
  505.                                         Optional ByVal XMove As Boolean, Optional ByVal move_x1 As Integer, Optional ByVal move_x2 As Integer, _
  506.                                         Optional ByVal move_y1 As Integer, Optional ByVal move_y2 As Integer, Optional ByVal YMove As Boolean, _
  507.                                         Optional ByVal spin_speedH As Single, Optional ByVal spin As Boolean, Optional grh_resize As Boolean, _
  508.                                         Optional grh_resizex As Integer, Optional grh_resizey As Integer)
  509. '**************************************************************
  510. 'Author: Augusto José Rando
  511. '**************************************************************
  512.     Dim char_part_free_index As Integer
  513.    
  514.     'If Char_Particle_Group_Find(char_index, stream_type) Then Exit Function ' hay que ver si dejar o sacar esto...
  515.     If Not Char_Check(char_index) Then Exit Function
  516.     char_part_free_index = Char_Particle_Group_Next_Open(char_index)
  517.    
  518.     If char_part_free_index > 0 Then
  519.         Char_Particle_Group_Create = Particle_Group_Next_Open
  520.         Char_Particle_Group_Make Char_Particle_Group_Create, char_index, char_part_free_index, particle_count, stream_type, grh_index_list(), rgb_list(), alpha_blend, alive_counter, frame_speed, id, x1, y1, angle, vecx1, vecx2, vecy1, vecy2, life1, life2, fric, spin_speedL, gravity, grav_strength, bounce_strength, x2, y2, XMove, move_x1, move_x2, move_y1, move_y2, YMove, spin_speedH, spin, grh_resize, grh_resizex, grh_resizey
  521.     End If
  522.  
  523. End Function
  524.  
  525. Public Function Char_Particle_Group_Remove(ByVal char_index As Integer, ByVal stream_type As Long)
  526. '**************************************************************
  527. 'Author: Augusto José Rando
  528. '**************************************************************
  529.     Dim char_part_index As Integer
  530.    
  531.     If Char_Check(char_index) Then
  532.         char_part_index = Char_Particle_Group_Find(char_index, stream_type)
  533.         If char_part_index = -1 Then Exit Function
  534.         Call Particle_Group_Remove(char_part_index)
  535.     End If
  536.  
  537. End Function
  538.  
  539. Public Function Char_Particle_Group_Remove_All(ByVal char_index As Integer)
  540. '**************************************************************
  541. 'Author: Augusto José Rando
  542. '**************************************************************
  543.     Dim i As Integer
  544.    
  545.     If Char_Check(char_index) And Not charlist(char_index).particle_count = 0 Then
  546.         For i = 1 To UBound(charlist(char_index).particle_group)
  547.             If charlist(char_index).particle_group(i) <> 0 Then Call Particle_Group_Remove(charlist(char_index).particle_group(i))
  548.         Next i
  549.         Erase charlist(char_index).particle_group
  550.         charlist(char_index).particle_count = 0
  551.     End If
  552.    
  553. End Function
  554.  
  555. Private Function Char_Particle_Group_Find(ByVal char_index As Integer, ByVal stream_type As Long) As Integer
  556. '*****************************************************************
  557. 'Author: Augusto José Rando
  558. 'Modified: returns slot or -1
  559. '*****************************************************************
  560.  
  561. Dim i As Integer
  562.  
  563. For i = 1 To charlist(char_index).particle_count
  564.     If particle_group_list(charlist(char_index).particle_group(i)).stream_type = stream_type Then
  565.         Char_Particle_Group_Find = charlist(char_index).particle_group(i)
  566.         Exit Function
  567.     End If
  568. Next i
  569.  
  570. Char_Particle_Group_Find = -1
  571.  
  572. End Function
  573.  
  574. Private Function Char_Particle_Group_Next_Open(ByVal char_index As Integer) As Integer
  575. '*****************************************************************
  576. 'Author: Augusto José Rando
  577. '*****************************************************************
  578. On Error GoTo ErrorHandler:
  579.     Dim loopc As Long
  580.    
  581.     If charlist(char_index).particle_count = 0 Then
  582.         Char_Particle_Group_Next_Open = charlist(char_index).particle_count + 1
  583.         charlist(char_index).particle_count = Char_Particle_Group_Next_Open
  584.         ReDim Preserve charlist(char_index).particle_group(1 To Char_Particle_Group_Next_Open) As Long
  585.         Exit Function
  586.     End If
  587.    
  588.     loopc = 1
  589.     Do Until charlist(char_index).particle_group(loopc) = 0
  590.         If loopc = charlist(char_index).particle_count Then
  591.             Char_Particle_Group_Next_Open = charlist(char_index).particle_count + 1
  592.             charlist(char_index).particle_count = Char_Particle_Group_Next_Open
  593.             ReDim Preserve charlist(char_index).particle_group(1 To Char_Particle_Group_Next_Open) As Long
  594.             Exit Function
  595.         End If
  596.         loopc = loopc + 1
  597.     Loop
  598.    
  599.     Char_Particle_Group_Next_Open = loopc
  600.  
  601. Exit Function
  602.  
  603. ErrorHandler:
  604.     charlist(char_index).particle_count = 1
  605.     ReDim charlist(char_index).particle_group(1 To 1) As Long
  606.     Char_Particle_Group_Next_Open = 1
  607.  
  608. End Function

Imagen

Imagen

Wildem.
Hola...!
¿Ustes vende un caballete?
-Si
¿Te rompieron el ojete?
-Anda a la puta que te pario...

JKJKASDKLJA
^Maper^
553
Destructor de Mentes [4]
Registrado: Años de membresía
Mensajes: 665
Aportes: 3

Nota » 23 Ene 2012 15:40

no flaco no xD eso es todo el ore :P

Dije el paquete y fijate poniendo un tiempo de vida de 50

Imagen
Ninja en progreso
924
Dragon Ancestral [5]
Registrado: Años de membresía
Ubicación: • olivos •
Mensajes: 4103
Aportes: 13

Nota » 23 Ene 2012 16:11

Saves que, ahora se ven tan rapidas que casi ni se aprecian-.

Imagen

Imagen

Wildem.
Hola...!
¿Ustes vende un caballete?
-Si
¿Te rompieron el ojete?
-Anda a la puta que te pario...

JKJKASDKLJA
^Maper^
553
Destructor de Mentes [4]
Registrado: Años de membresía
Mensajes: 665
Aportes: 3

Nota » 23 Ene 2012 16:13

Aumenta la vidaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Imagen
Ninja en progreso
924
Dragon Ancestral [5]
Registrado: Años de membresía
Ubicación: • olivos •
Mensajes: 4103
Aportes: 13

Nota » 23 Ene 2012 20:48

Pera, pera pera, yo estoy loco le amnde 1400 y andubo de 10 jajajajajajajajaj!!!!! la verdad no pensaba que habia que sarparse tanto-. pero creo que anda mejor que las de iao 1.4.9 :mrgreen:

Gracias chicos, no habia que tocar codes, sinò sarparse un poco ^^

Imagen

Imagen

Wildem.
Hola...!
¿Ustes vende un caballete?
-Si
¿Te rompieron el ojete?
-Anda a la puta que te pario...

JKJKASDKLJA
^Maper^
553
Destructor de Mentes [4]
Registrado: Años de membresía
Mensajes: 665
Aportes: 3

Nota » 23 Ene 2012 21:26

Wildem escribió:Pera, pera pera, yo estoy loco le amnde 1400 y andubo de 10 jajajajajajajajaj!!!!! la verdad no pensaba que habia que sarparse tanto-. pero creo que anda mejor que las de iao 1.4.9 :mrgreen:

Gracias chicos, no habia que tocar codes, sinò sarparse un poco ^^


Yo siempre dije que era la vida esa cosa fea

Imagen
Ninja en progreso
924
Dragon Ancestral [5]
Registrado: Años de membresía
Ubicación: • olivos •
Mensajes: 4103
Aportes: 13

Nota » 24 Ene 2012 15:08

miqueas150 escribió:
Wildem escribió:Pera, pera pera, yo estoy loco le amnde 1400 y andubo de 10 jajajajajajajajaj!!!!! la verdad no pensaba que habia que sarparse tanto-. pero creo que anda mejor que las de iao 1.4.9 :mrgreen:

Gracias chicos, no habia que tocar codes, sinò sarparse un poco ^^


Yo siempre dije que era la vida esa cosa fea

Si hacés eso Wildem, dentro de un par de segundos/minutos, despedite de la partícula... Así te tendría que funcionar bien sin desaparecer, y no entendí porque decían HandlePartículas, :|, eso no tiene nada que ver.

Particle Fountain:
[1]
Name=Fountain
NumOfParticles=20
X1=0
Y1=0
X2=0
Y2=0
Angle=0
VecX1=-20
VecX2=20
VecY1=-10
VecY2=-50
Life1=10
Life2=50
Friction=8
Spin=1
Spin_SpeedL=1
Spin_SpeedH=1
Grav_Strength=2
Bounce_Strength=-5
AlphaBlend=1
Gravity=1
XMove=0
YMove=0
move_x1=0
move_x2=0
move_y1=0
move_y2=0
Radio=0
life_counter=-1
Speed= .5
resize=0
rx=10
ry=10
NumGrhs=1
Grh_List=20202,
ColorSet1=255,0,0
ColorSet2=255,171,168
ColorSet3=255,0,0
ColorSet4=255,190,190


Adiós.


PD: No fumen tanto, porque sino flashean como en estos post's...

Director del Proyecto IndeX - AO
Mannakia escribió:Closed moderhipocradores , tema ya solucionado, jesus me ilumino en un sueño, y programamos junto, la verdad un genio, sabe lenguaje V** (V Multiply Multiply) que es sobre como programaron las primeras microcelulas.

Dunkan escribió:Chiters?, Pero esto no tenía la "Samke Security" ?

Imagen
Imagen
Programador
356
Dragon Ancestral [6]
Registrado: Años de membresíaAños de membresíaAños de membresíaAños de membresía
Mensajes: 4551
Aportes: 46
Premios: 2
Usuario superado (2)

Nota » 24 Ene 2012 15:11

Pero lord, la particula que le puse 1400 me sigue andando xd

Imagen

Imagen

Wildem.
Hola...!
¿Ustes vende un caballete?
-Si
¿Te rompieron el ojete?
-Anda a la puta que te pario...

JKJKASDKLJA
^Maper^
553
Destructor de Mentes [4]
Registrado: Años de membresía
Mensajes: 665
Aportes: 3

Nota » 24 Ene 2012 15:13

Wildem escribió:Pero lord, la particula que le puse 1400 me sigue andando xd

Decime para que pensás que sirve ese valor?... Encima que te permita un valor tan alto ¿...?, acaso le dio más color a la partícula?...

No amigo, fijate bien para que sirve. Le da un tiempo de vida a la partícula, y cuando acaba, muere. (Osea es eliminada)


Adiós.

Director del Proyecto IndeX - AO
Mannakia escribió:Closed moderhipocradores , tema ya solucionado, jesus me ilumino en un sueño, y programamos junto, la verdad un genio, sabe lenguaje V** (V Multiply Multiply) que es sobre como programaron las primeras microcelulas.

Dunkan escribió:Chiters?, Pero esto no tenía la "Samke Security" ?

Imagen
Imagen
Programador
356
Dragon Ancestral [6]
Registrado: Años de membresíaAños de membresíaAños de membresíaAños de membresía
Mensajes: 4551
Aportes: 46
Premios: 2
Usuario superado (2)

Nota » 24 Ene 2012 15:19

Pero no entiendo, vos desis que lo que puse es cualquier cosa o hay otro problema?

pd: Lord responde un seg el mp que te mande ^^

Imagen

Imagen

Wildem.
Hola...!
¿Ustes vende un caballete?
-Si
¿Te rompieron el ojete?
-Anda a la puta que te pario...

JKJKASDKLJA
^Maper^
553
Destructor de Mentes [4]
Registrado: Años de membresía
Mensajes: 665
Aportes: 3

Nota » 24 Ene 2012 15:26

Wildem escribió:Pero no entiendo, vos desis que lo que puse es cualquier cosa o hay otro problema?

pd: Lord responde un seg el mp que te mande ^^

No me mandaste ningún mp, y si no te funciona de la forma que te puse la partícula hay un problema.

El life_counter tiene que estar como Optional...


Adiós.

Director del Proyecto IndeX - AO
Mannakia escribió:Closed moderhipocradores , tema ya solucionado, jesus me ilumino en un sueño, y programamos junto, la verdad un genio, sabe lenguaje V** (V Multiply Multiply) que es sobre como programaron las primeras microcelulas.

Dunkan escribió:Chiters?, Pero esto no tenía la "Samke Security" ?

Imagen
Imagen
Programador
356
Dragon Ancestral [6]
Registrado: Años de membresíaAños de membresíaAños de membresíaAños de membresía
Mensajes: 4551
Aportes: 46
Premios: 2
Usuario superado (2)

Nota » 24 Ene 2012 15:33

Lord Fers escribió:
Wildem escribió:Pero lord, la particula que le puse 1400 me sigue andando xd

Decime para que pensás que sirve ese valor?... Encima que te permita un valor tan alto ¿...?, acaso le dio más color a la partícula?...

No amigo, fijate bien para que sirve. Le da un tiempo de vida a la partícula, y cuando acaba, muere. (Osea es eliminada)


Adiós.


y por eso el lo que que queria era que muera la particula por que antes le quedaba siemrpe viva o se le desvanecia rapidamente

Imagen
Ninja en progreso
924
Dragon Ancestral [5]
Registrado: Años de membresía
Ubicación: • olivos •
Mensajes: 4103
Aportes: 13

Nota » 24 Ene 2012 15:53

miqueas150 escribió:
Lord Fers escribió:
Wildem escribió:Pero lord, la particula que le puse 1400 me sigue andando xd

Decime para que pensás que sirve ese valor?... Encima que te permita un valor tan alto ¿...?, acaso le dio más color a la partícula?...

No amigo, fijate bien para que sirve. Le da un tiempo de vida a la partícula, y cuando acaba, muere. (Osea es eliminada)


Adiós.


y por eso el lo que que queria era que muera la particula por que antes le quedaba siemrpe viva o se le desvanecia rapidamente

Es un error que se desvanezca estando siempre visible...

EDIT: Supongo que está solucionado, así que perdonen xD.
Última edición por Lord Fers el 24 Ene 2012 15:53, editado 1 vez en total

Director del Proyecto IndeX - AO
Mannakia escribió:Closed moderhipocradores , tema ya solucionado, jesus me ilumino en un sueño, y programamos junto, la verdad un genio, sabe lenguaje V** (V Multiply Multiply) que es sobre como programaron las primeras microcelulas.

Dunkan escribió:Chiters?, Pero esto no tenía la "Samke Security" ?

Imagen
Imagen
Programador
356
Dragon Ancestral [6]
Registrado: Años de membresíaAños de membresíaAños de membresíaAños de membresía
Mensajes: 4551
Aportes: 46
Premios: 2
Usuario superado (2)

Este tema se encuentra cerrado.
Anterior

Volver a Otras versiones

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 0 invitados