• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Infinite Building Range?

Status
Not open for further replies.
Level 3
Joined
Apr 23, 2011
Messages
46
Hey Guys! i wanted to make an unit buildig without moving,and the building target is far away, but in the object editor under spelss didnt i found the build "spell". is there a way to do that?
 
Level 14
Joined
Aug 8, 2010
Messages
1,022
I am not a pro! :D But i think that it is possible to give your unit a Dummy spell that is a Target Point-spell (like Blink) and then make a trigger like the one below :)
  • Infinite range
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to YourDummyMagic
    • Actions
      • Unit - Create 1 YourBuilding for (Owner of (Triggering unit)) at (Target point of ability being cast) facing Default building facing degrees
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
  • Build Range
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (String((Issued order))) Equal to farm
          • (String((Issued order))) Equal to humanbarracks
          • (String((Issued order))) Equal to townhall
    • Actions
      • Trigger - Turn off (This trigger)
      • Set tempLoc = (Target point of issued order)
      • Unit - Create 1 Acolyte Dummy for (Owner of (Triggering unit)) at tempLoc facing 0.00 degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call IssueBuildOrder(bj_lastCreatedUnit, OrderId2StringBJ(GetIssuedOrderId()), GetLocationX(udg_tempLoc), GetLocationY(udg_tempLoc))
      • Custom script: call RemoveLocation(udg_tempLoc)
      • Trigger - Turn on (This trigger)
      • Wait 0.00 seconds
      • Unit - Order (Triggering unit) to Stop
This works for undead-style constructing ^^ (with human buildings, you could change the repair-spell to have a long range and instead of ordering the unit to "stop", order it to repair the constructing building).
 

Attachments

  • Build Range.w3x
    17 KB · Views: 70

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
I remember World Editor Unlimited allowed you to view the build abilities. You could use JASSNewGenPack (JNGP) with integrated WEU and edit them, or simply WEU alone. Or, JNGP has this «object editor hack», I've never used it so I don't know what it does, but you could try to see if it gets the Object Editor to display the building abilities.
 
@ap0calypse
Ah I was just making test map but I see you have wrote the same trigger I have made..

About humans and other non undead races: yeah order triggering unit to stop, create a dummy like worker which will do the job and just create another trigger which kills/removes dummy with event: interrupts constructing, or finishes contructing (with condition unit type equal to given dummy unit). Done.

@XScorchX If you will need test map although, pm me.

EDIT: Although ap0calypse already thrown most important stuff I'll add how to check whats the string of issued order if we are talking about buidlings.
  • init
    • Events
      • Unit - Unit is issued order targetting a point
    • Conditions
    • Actions
      • Game - Displays to (All players) message (String(Issued of issued order)
So just select your peons and click to build any building. Message with order will be displayed.

For humans all strings:
altarofkings, farm, townhall, blacksmith, humanbarracks, humanlumbermill, workshop, arcanevault, arcanesanctum, gryphonaviary, scouttower.
 
Status
Not open for further replies.
Top