How do I prevent a unit from getting out of a region.
I tried moving the unit back to the region if it left, but it would imbalance my map if it did so.
Or, is there some sort of flag for a unit that makes it not leave the range of something.
You can use the terrain editor to paint no-pathing zones. If you're using triggered movement of some kind (which by-passes pathing under certain conditions) you can use the Unit Leaves Region event with a While + Move Unit Instantly function, setting the While condition to Triggering Unit in Triggering Region = False, and setting the move point to "Position of Triggering Unit offset by 0.1 toward Angle Between Triggering Unit and Center of Triggering Region." And be sure to add a "wait 0.1 seconds" function within the While loop to avoid lag...
Something like that should work. Worked for me. Play around with it some.
I was interested in something similar to this. Is it possible to make only one type of unit not able to cross a boundary? (Not teleporting triggers, just collision with the no-path for that unit only)
"Position of Triggering Unit offset by 0.1 toward Angle Between Triggering Unit and Center of Triggering Region."
This did it for me :)
I'm making a foosball-like game, so that the players cant get out of the line.
I was interested in something similar to this. Is it possible to make only one type of unit not able to cross a boundary? (Not teleporting triggers, just collision with the no-path for that unit only)
"Position of Triggering Unit offset by 0.1 toward Angle Between Triggering Unit and Center of Triggering Region." This did it for me :) I'm making a foosball-like game, so that the players cant get out of the line.
How do I prevent a unit from getting out of a region. I tried moving the unit back to the region if it left, but it would imbalance my map if it did so. Or, is there some sort of flag for a unit that makes it not leave the range of something.
You can use the terrain editor to paint no-pathing zones. If you're using triggered movement of some kind (which by-passes pathing under certain conditions) you can use the Unit Leaves Region event with a While + Move Unit Instantly function, setting the While condition to Triggering Unit in Triggering Region = False, and setting the move point to "Position of Triggering Unit offset by 0.1 toward Angle Between Triggering Unit and Center of Triggering Region." And be sure to add a "wait 0.1 seconds" function within the While loop to avoid lag...
Something like that should work. Worked for me. Play around with it some.
I was interested in something similar to this. Is it possible to make only one type of unit not able to cross a boundary? (Not teleporting triggers, just collision with the no-path for that unit only)
"Position of Triggering Unit offset by 0.1 toward Angle Between Triggering Unit and Center of Triggering Region." This did it for me :) I'm making a foosball-like game, so that the players cant get out of the line.
Theres something called conditions :).
Glad to help :)
Also I love foosball. I destroy my family every time I play it with them ^^