• 🏆 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!

NEED HELP! With units!

Status
Not open for further replies.
Level 4
Joined
Sep 4, 2007
Messages
54
Ok! I'm making a game called: "Elemental Battlefield" and everyone who played the prequel (Water and Fire) wants me to make the units autosend to the enemy (A lot like Castle Fight).
So I want the player to be able to select the unit and look at its stats but no be able to command it! Any help would be appreciated
 
Level 34
Joined
Sep 6, 2006
Messages
8,873
Change the ownership of the unit to neutral passive, then switch back to the proper player, not a very good solution, but the only thing I can think of now. Do you want it to stop and fight things it comes in contact with?
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
ah sorry you mean like creeps in dota yes make a dummy computer in your team and make unit change owner to that dummy computer when sold then order attack-move
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
I just played it, and it's exactly what I said.

Castle Fight does this;

-Adds Ward classification to their command card

-makes a trigger that probably looks something like;

  • Reassign
    • Events
      • Unit - A Unit Is Issued an Order Targeting a Point
      • Unit - A Unit is Issued an Order Targeting a Unit
      • Unit - A Unit is Issued an Order with No Target
    • Conditions
      • (Triggering Unit is a Ward) Equal to True
    • Actions
      • Set TempPoint = (Center of CastleBases[(Custom Value of (Triggering Unit))])
      • Trigger - Turn Off (This Trigger)
      • Unit - Order (Triggering Unit) to Attack-move to TempPoint
      • Trigger - Turn On (This Trigger)
      • Custom script: call RemoveLocation(udg_TempPoint)
-TempPoint is a Point variable
-CastleBases is a Region array, with slots set to all the regions (eg; 0 = left base, 1 = right base)
-The unit's custom value should be set to the array slot of the region they're ordered to go to
 
Level 4
Joined
Sep 4, 2007
Messages
54
errr, first of all, I couldn't find the boolean comparison for Unit is a Ward. Secondly, the Castlebases thing, I don't get.
Thirdly, both sides have the same choice of races, that means theses guys will have the same point value... How can I get them to go to the opposite side if they have the same point vaue?
 
Status
Not open for further replies.
Top