• 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.

Units not going to where they're commanded to go to...

Status
Not open for further replies.
Level 3
Joined
Nov 11, 2004
Messages
32
In this game, when you kill units they're teleported to a section above your base. If you click on your barracks and click "Attack playercolor", the units should Attack-Move to that base. Instead, they're moving all over the place.

(Btw, the game is bearly 5% completed. Please don't tell me how crappy it looks. :p)

http://www.box43.net/~zombieguy/notitle.w3x
 
Level 8
Joined
Jul 3, 2004
Messages
404
here's a few ideas.....

IDEA 1
--------
1. create 3 of the same unit in the Object editor (with same name and everything)

2.Add all 3 unit's to the buildning.

3. Trigger.



Code:
attack blue
    Events
        Unit - A unit Finishes training a unit
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Trained unit)) Equal to Footman
            Then - Actions
            Unit - Order (Trained unit) to Attack-Move To (Position of Barracks 0021 <gen>)
            Else - Actions
-------------------
IDEA 2
-------------------

1.Add a "write trigger"
Code:
Write Trigger
    Events
        Player - Player 1 (Red) types a chat message containing -Ablue as An exact match
    Conditions
    Actions
        If ((Triggering player) Equal to Player 1 (Red)) then do (Trigger - Turn on attack blue <gen>) else do (Do nothing)
This triggerr will activate the next trigger

Code:
attack blue
    Events
        Unit - A unit Finishes training a unit
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Trained unit)) Equal to Player 1 (Red)
            Then - Actions
            Else - Actions
                Unit - Order (Trained unit) to Attack-Move To (Position of Barracks 0021 <gen>)

Just don't forget to turn off the other triggers each time you enter a -A???? (???? = name of player)

I shure hope this can help you

Code:
 
Level 3
Joined
Nov 11, 2004
Messages
32
Umm... I don't think you understand how this works. You do not train units.
When you kill a unit, it is added to your army. When you click "attack playercolor" on your barracks, all the units that you've collected are transported to your base. They then move to where you've commanded them to move to. (Only, they seem to always only want to move to purple)
 
Level 3
Joined
Nov 11, 2004
Messages
32
omfg so simple.

I completely forgot that if you base all the spells from the same spell (the attack playercolor abilities), they all cast at once. :((

Thanks anyway, Wolf. :)
 
Status
Not open for further replies.
Top