• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[General] Random Unit

Status
Not open for further replies.
Level 4
Joined
Nov 17, 2015
Messages
91
Hello! I'd like a trigger to create a random unit from a variety of units. Can you tell me how to do this? Pictures appreciated, Thanks in advance! :goblin_good_job:

Other info:
I'm using this to make a random critter spawn after an enemy is killed. :grin:
 

ILH

ILH

Model Reviewer
Level 26
Joined
May 8, 2012
Messages
1,246
Here you go
  • RCreepsConfig
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set RCreepsUnits[1] = Chicken
      • Set RCreepsUnits[2] = Frog
      • Set RCreepsUnits[3] = Rabbit
      • Set RCreepsUnitsTotal = 3
  • RCreepsActive
    • Events
      • Unit - Peasant 0016 <gen> Dies
      • Unit - Peasant 0017 <gen> Dies
    • Conditions
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Set RCreepsDice = (Random integer number between 1 and RCreepsUnitsTotal)
      • Unit - Create 1 RCreepsUnits[RCreepsDice] for (Triggering player) at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempPoint)
 

Attachments

  • BeeszBuzz's Request.w3x
    19.2 KB · Views: 40
Last edited:
Level 4
Joined
Nov 17, 2015
Messages
91
Here you go
  • RCreepsConfig
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set RCreepsUnits[1] = Chicken
      • Set RCreepsUnits[2] = Frog
      • Set RCreepsUnits[3] = Rabbit
      • Set RCreepsUnitsTotal = 3
  • RCreepsActive
    • Events
      • Unit - Peasant 0016 <gen> Dies
      • Unit - Peasant 0017 <gen> Dies
    • Conditions
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Set RCreepsDice = (Random integer number between 1 and RCreepsUnitsTotal)
      • Unit - Create 1 RCreepsUnits[RCreepsDice] for (Triggering player) at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempPoint)

Sorry for late reply, but this is the most awesome post i've ever gotten in a response! Thanks a million!!!
 
Status
Not open for further replies.
Top