Detonador de carga, se acciona cuando el jugador pulsa la tecla de cursor izquierda, y este le aumenta uno en la capacidad de disparos cargando la munición (flecha) en el arma
[gui]Cargar
Acontecimientos
Jugador - Jugador 1 (rojo) PulsaBLQ the Tecla cursor izquierda key
Condiciones
Acciones
Set T_JUGENT = (Player number of (Triggering player))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
T_FLECHAS[T_JUGENT] Igual a 0
Entonces: Acciones
Set T_FLECHAS[T_JUGENT] = 1
Partida - Display to (All players) the text: Flecha cargada
Otros: Acciones
Partida - Display to (All players) the text: Ya tienes una flech...
[/gui]
El detonador de casteo se acciona cuando el jugador PULSA la tecla cursor arriba, y teniendo en cuenta que la munición ya haya sido cargada anteriormente y que no se haya lanzado un proyectil en tiempo anterior de manera consecutiva.
[gui]PULL Cast
Acontecimientos
Jugador - Jugador 1 (rojo) PulsaBLQ the Tecla cursor arriba key
Condiciones
Acciones
Set T_JUGENT = (Player number of (Triggering player))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
T_PULLON[T_JUGENT] Igual a 1
T_FLECHAS[T_JUGENT] Igual a 1
T_FUERZA[T_JUGENT] Igual a 3
Entonces: Acciones
Set T_PULLON[T_JUGENT] = 2
Otros: Acciones
[/gui]
Este detonador periódico carga la fuerza del proyectil mientras mantenemos pulsada la tecla cursor arriba de disparo.
[gui]PULL Loop
Acontecimientos
Tiempo - Every 0.05 seconds of game time
Condiciones
Acciones
For each (Integer A) from 1 to 12, do (Actions)
Bucle: Acciones
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
T_PULLON[(Integer A)] Igual a 2
Entonces: Acciones
Set T_FUERZA[(Integer A)] = (T_FUERZA[(Integer A)] + 1)
Texto flotante - Create floating text that reads (String(T_FUERZA[(Integer A)])) above T_HEROES[(Integer A)] with Z offset 50.00, using font size 20.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Texto flotante - Change (Last created floating text): Desactivar permanence
Texto flotante - Mostrar (Last created floating text) for T_GJUG[(Integer A)]
Texto flotante - Change the lifespan of (Last created floating text) to 0.10 seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
T_FUERZA[(Integer A)] Igual a 20
Entonces: Acciones
Set T_PULLON[(Integer A)] = 3
Detonador - Run OFF Cast
(ignoring conditions)
Otros: Acciones
Otros: Acciones
[/gui]
Cuando la potencia del proyectil ya fue seleccionada y el tecla cursor arriba fue Des-Presionada (o soltada) entonces crea la unidad que hace las veces de misil y le da pie a su movimiento mediante el loop, teniendo en cuenta datos seteados en este mismo detonador como, velocidad, distancia, y demás datos de importancia.
[gui]OFF Cast
Acontecimientos
Jugador - Jugador 1 (rojo) Suelta the Tecla cursor arriba key
Condiciones
T_PULLON[(Player number of (Triggering player))] Igual a 2
Acciones
Set T_JUGENT = (Player number of (Triggering player))
Set T_PULLON[T_JUGENT] = 3
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
T_PULLON[T_JUGENT] Igual a 3
Entonces: Acciones
Set P2 = (Position of T_HEROES[T_JUGENT])
Set P1 = ((Position of T_HEROES[T_JUGENT]) offset by ((Real(T_FUERZA[T_JUGENT])) x 47.00) towards (Facing of T_HEROES[T_JUGENT]) degrees)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
(Distance between P1 and P2) Mayor que o igual a 950.00
Entonces: Acciones
Set PG = (P2 offset by 950.00 towards (Angle from P2 to P1) degrees)
Otros: Acciones
Set PG = ((Position of T_HEROES[T_JUGENT]) offset by ((Real(T_FUERZA[T_JUGENT])) x 47.00) towards (Facing of T_HEROES[T_JUGENT]) degrees)
Unidad - Create 1 DUM 2 for T_JUG[T_JUGENT] at (P2 offset by 50.00 towards (Facing of T_HEROES[T_JUGENT]) degrees) facing P1
Unidad - Add Forma de Cuervo de tormenta to (Last created unit)
Unidad - Remove Forma de Cuervo de tormenta from (Last created unit)
Unidad - Turn collision for (Last created unit) Apagado
Set Proyectiles[T_JUGENT] = (Last created unit)
Set ProyDir[T_JUGENT] = (Angle from P2 to P1)
Set VelAscendente[T_JUGENT] = (0.50 x ((Distance between PG and P2) / (1.25 x (Real(T_FUERZA[T_JUGENT])))))
Set VelPlana[T_JUGENT] = (1.50 x (Real(T_FUERZA[T_JUGENT])))
Custom script: set udg_TZPUNT[udg_T_JUGENT] = 150 + GetLocationZ(udg_P2) - GetLocationZ(udg_PG)
Set VelAscendente[T_JUGENT] = (VelAscendente[T_JUGENT] - (TZPUNT[T_JUGENT] / ((Distance between PG and P2) / (1.25 x (Real(T_FUERZA[T_JUGENT]))))))
Custom script: set udg_TZPUNT[udg_T_JUGENT] = GetLocationZ(udg_P2) + 150
Set Altura[T_JUGENT] = TZPUNT[T_JUGENT]
Unidad - Add a 2.00 second GenÃ
rico expiration timer to (Last created unit)
Set T_PULLON[T_JUGENT] = 4
Custom script: call RemoveLocation (udg_P1)
Custom script: call RemoveLocation (udg_P2)
Custom script: call RemoveLocation (udg_PG)
Otros: Acciones
[/gui]
Este detonador es el periódico que genera el movimiento de el proyectil y su detonación en caso en que deba haberla, luego procede a la acción de nulleo para que un nuevo proyectil pueda ser cargado y disparado. (esto concluye con que solo puede haber un proyectil disparado por unidad)
[gui]OFF Loop
Acontecimientos
Tiempo - Every 0.05 seconds of game time
Condiciones
Acciones
-------- --------
For each (Integer A) from 1 to 12, do (Actions)
Bucle: Acciones
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
T_PULLON[(Integer A)] Igual a 4
Entonces: Acciones
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
(Proyectiles[(Integer A)] is alive) Igual a True
Entonces: Acciones
Set P2 = (Position of Proyectiles[(Integer A)])
Set P1 = (P2 offset by VelPlana[(Integer A)] towards ProyDir[(Integer A)] degrees)
Custom script: set udg_TZPUNT[GetForLoopIndexA()] = GetLocationZ(udg_P1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
(Altura[(Integer A)] - TZPUNT[(Integer A)]) Mayor que 0.00
Entonces: Acciones
Set VelAscendente[(Integer A)] = (VelAscendente[(Integer A)] - 1.00)
Set Altura[(Integer A)] = (Altura[(Integer A)] + VelAscendente[(Integer A)])
Unidad - Move Proyectiles[(Integer A)] instantly to P1
Set GROUP = (Units within 35.00 of P1 matching ((((Matching unit) is alive) Igual a True) and ((((Matching unit) is Una estructura) No igual a True) and (((Matching unit) belongs to an enemy of T_JUG[(Integer A)]) Igual a True))))
Animación - Change Proyectiles[(Integer A)] flying height to (Altura[(Integer A)] - TZPUNT[(Integer A)]) at 0.00
Grupo de unidad - Pick every unit in GROUP and do (Actions)
Bucle: Acciones
Set T_PICK[(Integer A)] = (Picked unit)
Set T_TP1 = (Position of (Picked unit))
Efecto especial - Create a special effect at T_TP1 using Objects\Spawnmodels\Human\HumanBlood\HumanBloodFootman.mdl
Unidad - Cause T_HEROES[(Integer A)] to damage (Picked unit), dealing ((Real(T_FUERZA[(Integer A)])) x 50.00) damage of attack type HÃ
roe and damage type Normal
Unidad - Remove Proyectiles[(Integer A)] from the game
Efecto especial - Destroy (Last created special effect)
Custom script: call RemoveLocation (udg_T_TP1)
Custom script: call DestroyGroup(udg_GROUP)
Otros: Acciones
Custom script: call RemoveLocation (udg_P1)
Custom script: call RemoveLocation (udg_P2)
Otros: Acciones
Set ProyDir[(Integer A)] = 0.00
Set Altura[(Integer A)] = 0.00
Set VelAscendente[(Integer A)] = 0.00
Set VelPlana[(Integer A)] = 0.00
Set Proyectiles[(Integer A)] = Ninguna unidad
Set T_PULLON[(Integer A)] = 1
Set T_FLECHAS[(Integer A)] = 0
Set T_FUERZA[(Integer A)] = 3
Otros: Acciones
[/gui]