-
Notifications
You must be signed in to change notification settings - Fork 34
Modding Movement through units
Robosturm edited this page May 3, 2021
·
5 revisions
This is something a lot of people have asked or requested. After some thinking through. I came up with a solution that is possible since several releases.
Step by steup walk through:
-
Give a unit the ability to ignore unit collision. See oozium-code for an example.
-
Go to the movement table used by the given unit and add the following code:
var currentUnit = terrain.getUnit(); if ((currentUnit !== null) && (unit.getOwner().isAlly(currentUnit .getOwner()))) { if (unit should not cross this currentUnit condition) { return -1; } }
- Replace the pseudo code for when a unit should not cross through the other unit. E.g. an air unit should cross another air unit or a sea unit another sea unit etc. Be creative.
E-Mail-Contact: [email protected] ask for help here. :)