• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Wierd Bug: Buildings moving at game startup?

Status
Not open for further replies.
Level 7
Joined
Jul 1, 2008
Messages
1,025
Hi there, I think I've found a new bug, I have lots of buildings I needed to rotate so set them to "Is a building: False" on the units stats and rotated them then set them back to a building. Everything looked fine in the editor and I didnt think anything more of it, but then when the map starts up they all seem to have moved abit to the left?

It dosnt mean to matter whether theyre set as units or buildings, some of them have moved and others havnt, it makes no sense at all...

Has anyone come accross this before or knows how to help? It driving me mad!
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
This could be because of the preset ground textures.

When you're trying to create a building in the world editor, you can only place it on specified blocks (a guard tower, for example, consist of 2x2 of those blocks).
A unit doesn't have that problem.

So when you place a building, marked as a unit and then reset it to a building, it will jump to the 'correct' position in-game (correct meaning one of those aforementioned blocks).

I don't think I can explain it any better, I hope you understand this (I got kinda confused myself :S).
That's my guess though: I'm still not sure, never seen that bug before.
 
Level 7
Joined
Jul 1, 2008
Messages
1,025
ahh I see what you mean, if that is whats causing the bug then it must be something to do with the pathing texture aswel because I have some buildings still set as Units and others set as Buildings (buildings that have been rotated and set back as buildings) and both seem to have the same problem. I hope that made sense aswel.

Would it work if I set them back as building but change their pathing texture to NONE and set their colision size appropriatley so troops wouldnt be able to walk through them?
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
That seems like it could help, but as I already said: I've never seen this before, so I don't know how to fix it.
Try everything you can think of and - when you did find something - could you please post it here? (for future reference) :D

I'll try out a few things later today (I hope I don't forget :/).

Edit: it happens to all units (even regular units, like the peasant).
I tried whatever I could think of, but there's still a slight position switch.

Even triggering this (call SetUnitX(unit, X)) showed no results.
They only moved a few pixels though, so it isn't really noticeable in regular games.
 
Last edited:
Level 7
Joined
Jul 1, 2008
Messages
1,025
Unfortunatly no changing the pathing texture to None didnt work, also whenever you change the pathing texture of a building it resets the rotation meaning you have to go and set it as a unit again to rotate.

I've managed to get a temporary fix though, I created a new unit based off the Knight, rotated the unit then set it as a building and it hasnt shifted ingame. This is going to create pathing issues ingame tho as I can't change the pathing texture without the editor reseting the building rotation.

I'll send you the map in question, if you get a moment I'd appreciate it if u took a look, towards the North east of the map you'l find a small village with a cathedral and a paladin at it's centre, note how the cathedral is aligned with the Lanterns beside it. When you open the map ingame you'l see the Cathedral has somehow jumped way out.

I know this isnt a game breaking issue but it realy messes up your terrain. Unless we can find a fix I'll prolly leave this issue until the terrains complete then just re-create all the buildings using the Knight unit as a base. Thanks for your advice though, added to ur rep.

EDIT: The maps a Azeroth style strategy map based off the Warhammer world and is heavily a work in progress.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Yeah, it does look pretty bad in-game, in comparison to how it was in the WE at least.

I replaced the cathedral with a doodad based off the "shrub" (environmental).
These doodads don't shift positions, so for 'unused' buildings like these it seems to be the best option (the cathedral stays alligned with these lanterns).

A few pathing blockers and it should be about correct.

Edit: you can use http://www.hiveworkshop.com/forums/pastebin.php next time you want to send a file to someone.
Just upload a file there, copy/paste the URL and send it to someone ^^ (the file will automatically get deleted after a certain amount of time).
 
Ok I fixed problem at least here!
Do next:
1st. Select problematic unit!
2nd. Change it to unit (Stats - is a building = false)
3th. Set unit facing angle
4th. Change it to building (Stats - is a building = true)

It should work!

Care don't edit unit after that it will set facing angle to default so you would be forced to do this from start! (it probable want to do same thing ingame so it move it a little, do this and it should work)

Work with pathing ground as well, but I suggest you to use pathing blockers instead, there is no blizzard created pathing ground large enough for this building!
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Ok I fixed problem at least here!
Do next:
1st. Select problematic unit!
2nd. Change it to unit (Stats - is a building = false)
3th. Set unit facing angle
4th. Change it to building (Stats - is a building = true)

It should work!

Care don't edit unit after that it will set facing angle to default so you would be forced to do this from start! (it probable want to do same thing ingame so it move it a little, do this and it should work)

Work with pathing ground as well, but I suggest you to use pathing blockers instead, there is no blizzard created pathing ground large enough for this building!
Huh? Are you sure this works?

I tried this as well and the cathedral still moved a little (not much, but enough to look stupid amongst those lanterns).
He actually said he tested that himself :p
Mashmalo said:
[...] set them to "Is a building: False" on the units stats and rotated them then set them back to a building.
 
Hmmmmmm set:
art - maximum Pitch Angle to default (15.00)
art - maximum Roll Angle to default (15.00)
and do again that what I posted above!
Cathedral will stay other building move!

Dunno why is that, but those 2 values rotate building (if you use neg numbers)
Maybe they move it or whatever if you change default (positive) value!

EDIT:


attachment.php

 

Attachments

  • WC3ScrnShot_011611_010123_01.jpg
    WC3ScrnShot_011611_010123_01.jpg
    833.3 KB · Views: 169
Level 7
Joined
Jul 1, 2008
Messages
1,025
Hmmmmmm set:
art - maximum Pitch Angle to default (15.00)
art - maximum Roll Angle to default (15.00)
and do again that what I posted above!
Cathedral will stay other building move!

Dunno why is that, but those 2 values rotate building (if you use neg numbers)
Maybe they move it or whatever if you change default (positive) value!

EDIT:


attachment.php


o0 thanks! Sorry for my slow reply I didnt see there were anymore posts, I'll check this out next time im at my home comp, I didnt think about changing the pitching angle, did you create a cathedral unit or use the old one and just change the pitching angle?

The Cathedral actualy needs to be a unit not a doodad as it will be training units so I'll just have to create a trigger that moves the created unit to the doorway of the cathedral when it finished training.
 
Level 2
Joined
Jul 2, 2012
Messages
5
It's an old thread, and it's the one that described my problem exactly, however the solution mentioned here about Pitch/Roll angles is wrong, so I'd like to share how I was able to fix this shifting building issue, anno domini 2023.

---

World Editor version 1.34

Here's the precise sequence of steps for placing rotated buildings in World Editor without having them move after the game starts:

1. Place your building on the map
2. In Object Editor, change the field Stats - Is a Building to False
3. Select the building, hold Ctrl, and left-click drag the mouse to rotate it
4. In Object Editor, change the Stats - Is a Building field back to True

By following these steps exactly, the building will not move after the game starts.

Important: Do not relocate the building after it loses its "is a Building" status. What seems to cause the building to shift is if you relocate it while the field Stats - Is a Building is False. Once the building is changed to a unit in the Object Editor, you can only rotate it - do not relocate it, or else it will move in-game; place it when it's a building, rotate it when it's a unit.

This solution was tested and observed using a "Barn" doodad model on top of a "City Building 10" unit data sheet.
 
Last edited:
Status
Not open for further replies.
Top