| 12-25-2003, 05:42 PM | #1 |
I'm make a copy of a board game in wc3 and as you all know the units walk a certain distance every turn(1-6 squares) and you can move either right, left, up or down. Now my problem is that when the units are walking on one path, i.e. straight up and theres another path right next to it, the player can just push right and move into that one and thus creating a shortut for himself, and this definetely inst was was intended. Atm I'm using pathing blockers to stop the to pass but they'll just run around since i'm using a X Y EndDest system for them to move. Do i have to make modifications to my move system or is there some smart way to make them NOT go around and just stop. Perhaps a region that tells them to not to cheat and makes the unit stop. Or even better instantly moves them to the start as a punishment for trying to cheat? It doesn't seem a very good system to me since the move distance cant be as exact as you want it and theres always some small glitch between the square they're supposed to stand on and the grass around. Well, happy for answers... |
| 12-25-2003, 05:59 PM | #2 |
I'm not entirely sure i udnerstand what you want, but i do have a suggestion. Add a condition to your move trigger. This condition checks if a boolean variable is true. If it is false, it will not accept the move command. The trigger automatically resets to true after the move is complete (either use a calculated wait or some form of dynamic region) |
| 12-25-2003, 06:04 PM | #3 |
I see what you mean but you kinda left out the solution. How would the seperate trigger that controls the booleans true/false state look. Also i dont know anything about dyamic regions. Or are you meaning that if the move takes more then the calculated time that it usually takes then the move is canceled? |
| 12-25-2003, 07:18 PM | #4 |
Player-movement goes before trigger-ordered-movement, meaning that wont work. You need to disable the unit while it's moving. (AKA change owner to Neutral Passive during the actual movement). Just change it back to the player when it reaches destination. You may have to set a player variable for whom to give it back to. Regards Dead-Inside |
| 12-25-2003, 11:54 PM | #5 |
I've solved that problem by just have all of player 1 units be owned by player 5, in that way he cant move them and the Selection trigger which decides which one of the units you will move only works for that players allies. Much simplier than your solution. Though you still haven't come up with a solution with my little problem; anyways i made it the easy and basic way and ending up with this trigger; Events Unit - A unit enters Blocker1 <gen> Unit - A unit enters Blocker2 <gen> Unit - A unit enters Blocker3 <gen> Unit - A unit enters Blocker4 <gen> Unit - A unit enters Blocker5 <gen> Unit - A unit enters Blocker6 <gen> Unit - A unit enters Blocker7 <gen> Unit - A unit enters Blocker8 <gen> If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((Triggering unit) is owned by Player 1 (Red)) Equal to True Then - Actions Set Warnings[1] = (Warnings[1] + 1) Unit - Move (Triggering unit) instantly to (Center of Player 1 start1 <gen>) Else - Actions Of course there's a textmessage and a If/Then/Else function for each player in the game. I think it turned ut ok. |
