• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Strange thing on a trigger

Status
Not open for further replies.
Level 4
Joined
Feb 28, 2020
Messages
48
hi, i did this simple trigger for allow player to perma farm the hostile mob, but i cant use a bigger number of "65 sec" if i want to use a biger number the trigger just dont work, i would like to understand why, on my map its will be better to use a biger number like 300 or 600
 

Attachments

  • ui1.PNG
    ui1.PNG
    13 KB · Views: 27
  • ui2.PNG
    ui2.PNG
    12.1 KB · Views: 26
Level 12
Joined
Feb 5, 2018
Messages
521
INI TRIGGER

  • Ini
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet ReSpawn_Time = 120.00
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (Actions)
        • Loop - Actions
          • Set VariableSet Temp_Integer = (Temp_Integer + 1)
          • Unit - Set the custom value of (Picked unit) to Temp_Integer
          • Set VariableSet Creep_Point[Temp_Integer] = (Position of (Picked unit))
RESPAWN TRIGGER

  • Creep ReSpawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Neutral Hostile
      • (Custom value of (Triggering unit)) Greater than 0
    • Actions
      • Custom script: local integer i = GetUnitTypeId(GetTriggerUnit())
      • Custom script: local integer ii = GetUnitUserData(GetTriggerUnit())
      • Wait (ReSpawn_Time + ((Real((Level of (Triggering unit)))) x 2.00)) seconds
      • Custom script: call SetUnitUserData(CreateUnit(Player(12),i,GetLocationX(udg_Creep_Point[ii]),GetLocationY(udg_Creep_Point[ii]),270),ii)
RE-ADD UNIT TO RESPAWN

  • Add Creeps ReSpawn
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Owner of (Triggering unit)) Equal to Neutral Hostile
    • Actions
      • Set VariableSet Temp_Integer = (Temp_Integer + 1)
      • Unit - Set the custom value of (Triggering unit) to Temp_Integer
      • Set VariableSet Creep_Point[Temp_Integer] = (Position of (Triggering unit))
This is a creep system I found from my old map. I tried the search tool to find the author for this but couldn't find it.

NOTE: This system is originated from hiveworkshop, just couldn't find the author.

Tried this with the 120 seconds and it worked. The player number for neutral hostile has changed, since they added more players. I didn't try which number it is, but I am guessing it is number 25. For this you can just use a super fast respawn time and try player numbers in the call SetUnitUserData(CreateUnit(Player(12).
 

Attachments

  • CreepSystem.w3m
    17 KB · Views: 11
Level 4
Joined
Feb 28, 2020
Messages
48
gonna check that, thx, i really dont know how custom script work, but i guess a simple copy pasta gonna do the job
 
Status
Not open for further replies.
Top