| 06-10-2006, 11:53 PM | #2 |
Turn collision for the caster back on. From personal experience, removing collision allows units to bypass all obstacles, but they themselves are still obstacles. |
| 06-10-2006, 11:56 PM | #3 |
Yes, you could use a IsXSafe and IsYSafe function, or check but this in a condition: Trigger: Conditions
![]() (Min X of (Playable map area)) Less than (X of (Your Location)))
![]() (Min Y of (Playable map area)) Less than (X of (Your Location)))
![]() (Max X of (Playable map area)) Greater than (Y of (Your Location)))
![]() (Max Y of (Playable map area)) Greater than (Y of (Your Location)))That will prevent setting a location outside of the map EDIT: I looked over the thread, and mysteriously, i posted twice at exactly the same time =/ Odd... EDIT2: This is to prevent going off the map |
| 06-11-2006, 03:32 AM | #4 |
Hmm thats one problem solved, but theres still cliffs and water that I could jet by. |
| 06-11-2006, 04:14 AM | #5 |
There is a way to check if a unit is standing on a cliff or not. Possibly when you do the "Is it more than 800 away or dead" check, you could also check to see if the unit is standing on the Cliff terrain types, and if so stop it. Theres another way to check if something is trying to go up a cliff too that works via looking at cliff height, but i can't remember it. |
| 06-11-2006, 03:29 PM | #6 |
I tried it with terrain type, and the appropriate cliff(s). But it still could go up them fine. |
| 06-11-2006, 04:45 PM | #7 |
You can use Vexorian's CheckPathability function (http://www.wc3jass.com/viewtopic.php?t=2374), this will tell you if a position is pathable for a unit. In your instance, the easiest way to include it would be: Copy those functions into your custom script area Create a global boolean called IsPathable Add this line: Trigger: Custom script: set udg_IsPathable = CheckPathability(GetUnitX(udg_Caster),GetUnitY(udg_Caster)) |
| 06-11-2006, 04:47 PM | #8 |
Hmm... that may work. But I dont quite understand how to impliment that. |
| 06-11-2006, 05:21 PM | #9 |
Copy the functions from that link into your custom script section (at the top of your list of triggers, there should be something with the name of your map and a map icon next to it, click on that and paste in the area where trigger text normall goes). Create a global boolean variable called IsPathable. Copy the line I showed above. Before moving the unit, check if IsPathable is equal to true. |
| 06-11-2006, 05:40 PM | #10 |
I dont understand where you want to copy the line and what the global boolean is. |
| 06-11-2006, 05:49 PM | #11 |
Oops, forgot to say where to put that line :> The global boolean is like your global unit variable Caster. Create it in the same place, with type boolean. Copy that custom script line to the top of the actions in Charge Effect trigger. |
| 06-11-2006, 05:53 PM | #12 |
Ah, okay, thank you. I get an error: Type mismatch in assignment. |
| 06-11-2006, 06:11 PM | #13 |
You did make the IsPathable variable of type boolean? |
| 06-11-2006, 06:21 PM | #15 |
Put an if/then/else around the move action like so: Trigger: You don't set it in the first trigger at all. You only use it in the second one. |
