Help in a trigger

Necrolytie

Member
Reaction score
0
I'm making an RPG and want to create a trigger that creates a spirit in the cemetery nearest the location of the dead hero. But I'm not getting, can someone help me?

The rest I already have planned. :(
 

TheOverWhelm

Member
Reaction score
16
Distance Between Points.
Have a custom unit represent the cemeteries locations and put them in a unit array, 1 to 10 or whatever
Code:
set tempreal = 0
set tempreal2 = 0
Set point1 to position of dieing unit
Integer A loop 1 to 10
   set point2
   set tempreal = distance between points
      if tempreal less than tempreal2 then
          set tempreal2= tempreal
          set tempinteger=IntegerA
   call RemoveLocation(udg_point2)
spawn X at UnitArray[tempinteger]

Hope you can understand the freehand XD
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top