1. scope NeuerTurm initializer Init
  2. private function Actions takes nothing returns nothing
  3. call DisplayTextToForce( GetPlayersAll(), "Test1")
  4. if GetUnitTypeId(GetEnteringUnit()) == 'h001' then
  5. call SetzeNeueEinheit(100, 0, 10, 1200, 4)
  6. endif
  7. if GetUnitTypeId(GetEnteringUnit()) == 'h002' then
  8. call SetzeNeueEinheit(100, 0, 1, 600, 0.2)
  9. endif
  10. if GetUnitTypeId(GetEnteringUnit()) == 'h003' then
  11. call SetzeNeueEinheit(100, 0, 15, 300, 1.5)
  12. endif
  13. if GetUnitTypeId(GetEnteringUnit()) == 'h004' then
  14. call SetzeNeueEinheit(100, 0, 10, 600, 2)
  15. endif
  16. if GetUnitTypeId(GetEnteringUnit()) == 'h000' then
  17. call SetzeNeueEinheit(100, 0, 50, 600, 10)
  18. endif
  19. endfunction
  20. private function Init takes nothing returns nothing
  21. local trigger NeuerTurm = CreateTrigger()
  22. call TriggerRegisterEnterRectSimple( NeuerTurm, GetEntireMapRect() )
  23. call TriggerAddAction( NeuerTurm, function Actions )
  24. endfunction
  25. endscope

Diesen Code in Standard-Formatierung anzeigen
goto:
Vergleichen mit :

Neuen Code Posten


Text-Kopier-Fenster