Hey, been trying to do this for awhile now, but all the tutorials I seem to find are for galaxy rather then gui or I just end up not following or finding the piece I need. I'm trying to turn ignore terrain height flag from off to on using triggers.
This is what I got:
Catalog - Set value of Units "Missile" "e_unitFlagIgnoreTerrainZInit" for player (Owner of (Last created unit)) to "Set"
The "set" Is probably wrong because I have no clue what would go there to turn it from off to on. I tried using 1 and tried using true, but got nothing from the testing (Though maybe I did some other parts of my trigger wrong?) I would also like to know if there is, and how to do, a unit of my choice via triggers rather then manually going into the object editor and finding the units name.
The correct way to refference the field would be
Catalog - Set value of Units "Medivac" "FlagArray[IgnoreTerrainZInit]" for player 1 to "1"
however, this is one of those fields that cannot be written. So the best way I can think of to achive what you want is to dublicate your unit, set one of them to ignore terrain height, and then replace one unit with the other when needed. Or you can use one that ignore terrain height, and then use the trigger "Change Unit Height", to simulate the flag being off.
Well missiles and jumps and things like that walk over hills and cliffs funky. I can fix the hills when a unit is moving, but if they are sterile then they still look funky. So I had to add this flag to fix that. Cliffs are a entirely different issue that I couldn't find a work around with math, sterile or moving. So I have to add this to the unit for that too. I was going to use this for a lot of things. Basically everything you see in Diablo that I can possibly make in sc2 was going to be made with this as a big helper. I can still have units thrown off cliffs and missiles being made and jumping over anything other then a cliff without this, but I don't think I can make the bridge. For death I think I can just make 1 unit with this flag checked and have his model change accordingly ( I haven't tried this yet, but I think I have seen this in the editor somewhere; I think it may use actors rather then models ).
Just stumbled over a trigger, and I thought of you :)
Set Unit State
It looks like you can set the ignore terrain height flag in there
I doubt it will make ground units behave like air units for pathing though, so if u plan to have some ability to jump to a targeted area, possibly over unpathable area, then it probally wont help. I have toyed a bit with such an ability before. Never really got something I was satisfied with.
yes. I have been able to make it look good over flat ground. But if the unit should jump from cliff to cliff, you can't move him to the position that os not pathable. Anyway, I abandoned that project, so it's not nagging me anymore :)
You could simply say that you have to be able to walk in a somwhat straight line to the target point (check pathing cost)
Hey, been trying to do this for awhile now, but all the tutorials I seem to find are for galaxy rather then gui or I just end up not following or finding the piece I need. I'm trying to turn ignore terrain height flag from off to on using triggers. This is what I got: Catalog - Set value of Units "Missile" "e_unitFlagIgnoreTerrainZInit" for player (Owner of (Last created unit)) to "Set" The "set" Is probably wrong because I have no clue what would go there to turn it from off to on. I tried using 1 and tried using true, but got nothing from the testing (Though maybe I did some other parts of my trigger wrong?) I would also like to know if there is, and how to do, a unit of my choice via triggers rather then manually going into the object editor and finding the units name.
Thanks for reading!
The correct way to refference the field would be
Catalog - Set value of Units "Medivac" "FlagArray[IgnoreTerrainZInit]" for player 1 to "1"
however, this is one of those fields that cannot be written. So the best way I can think of to achive what you want is to dublicate your unit, set one of them to ignore terrain height, and then replace one unit with the other when needed. Or you can use one that ignore terrain height, and then use the trigger "Change Unit Height", to simulate the flag being off.
What are you trying to achive?
@SBeier: Go
Well missiles and jumps and things like that walk over hills and cliffs funky. I can fix the hills when a unit is moving, but if they are sterile then they still look funky. So I had to add this flag to fix that. Cliffs are a entirely different issue that I couldn't find a work around with math, sterile or moving. So I have to add this to the unit for that too. I was going to use this for a lot of things. Basically everything you see in Diablo that I can possibly make in sc2 was going to be made with this as a big helper. I can still have units thrown off cliffs and missiles being made and jumping over anything other then a cliff without this, but I don't think I can make the bridge. For death I think I can just make 1 unit with this flag checked and have his model change accordingly ( I haven't tried this yet, but I think I have seen this in the editor somewhere; I think it may use actors rather then models ).
Just stumbled over a trigger, and I thought of you :)
Set Unit State
It looks like you can set the ignore terrain height flag in there
I doubt it will make ground units behave like air units for pathing though, so if u plan to have some ability to jump to a targeted area, possibly over unpathable area, then it probally wont help. I have toyed a bit with such an ability before. Never really got something I was satisfied with.
@SBeier: Go
Well, I'll be damned, I should of remembered seeing it there, it brings back memories now. Well, thanks a lot!~ =D
Btw, move the unit instantly at a fast pace, and it will look like he's just jumping cause our eyes our fooled.
yes. I have been able to make it look good over flat ground. But if the unit should jump from cliff to cliff, you can't move him to the position that os not pathable. Anyway, I abandoned that project, so it's not nagging me anymore :)
You could simply say that you have to be able to walk in a somwhat straight line to the target point (check pathing cost)