| 06-08-2003, 08:43 PM | #1 |
For a map I am makeing I have 2 different types of units, Defensives and Offensives neither of these are controlled by the player. but I cant figure out the triggers to get them to do what I want, so heres how it works, I want the player to buy them at merc camps then they'll be transferred to the computers control. Then if it is an offensive I want it to start hunting out towers and killing them, but when I try to do this it gets the first tower fine then just stops even though I have a trigger that detects when offensive units kill towers and tells them to go find another. For defensive units I want them to patrol an area after they are bought ,but there are multiple mini bases players can capture and I want them to patrol the base they were bought at. this is realy annoying because I think it may require jass and I dont know jass emote_confused but this is all thats left and the map will be done... |
| 06-08-2003, 11:18 PM | #2 |
I don't think this would require JASS... But anyway, to make it computer controlled, use the trigger EVENT: Unit - Unit enters region Syntax: A unit enters (Playable map area) CONDITION: Or, then Unit-Type Comparison Syntax: (Unit-type of (triggering unit) Equal to (offensive unit name) or (Unit-type of (triggering unit) Equal to (defensive unit name) NOTE: For the condition, if there are multiple offensive units, then for the second part of the or condition, pick "Or" again, repeating as necessary ACTION: Unit - Change Owner Syntax: Change ownership of (Triggering unit) to Player X (color) and Change/Retain color Above, Player X is the computer player. If the repeated ors for the condition are annoying you, as an alternative you can skip condition and put If/Then/Else commands for each unit type. e.g., If (unit-type of (Triggering unit)0 equal to OFFENSIVE OR DEFENSIVE UNIT then Change ownership of (Triggering unit) to Player X (color) and Change/Retain color Else do Do nothing. For each unit you can make an if then else. I think that would work to convert them under your control, it may not be the best way though It could be wrong, it could be right. |
| 06-10-2003, 06:26 AM | #3 |
the ownership isnt giving me a problem, its getting them to do what I want afterward :( |
| 06-10-2003, 09:57 AM | #4 |
This definately does not require JASS. Take a look over the trigger that detects when a tower has been killed, thats probably where the problem is. If you still dont see a problem post it here and I'll tell you if anything's wrong with that. As for the patrolling, dont use the patroll command, just have them walk to one base, wait awhile, then walk to the next base. The triggers for that should be very straight forward. Hope this helps! |
