Right, I want to be able to place buildings like in Majesty series. This is how it should work: in my interface widow down below I should always have buttons responsible for construction. When I click on the needed building icon, my pointer should change it's form as it does when I issue an order to an SCV (say) to build something. When I then click on a suitable area, that place should then contain the green building silhouette till the end of the game. That's the mission for now. Please help me to implement it.
In original SC2 you have to pick an SCV to do this but I need to be able to do this without an SCV. I saw an "Issue order" trigger in the editor, but, once again it demands an SCV to function. How to do it without an SCV?
don't expect people to answer within an hour of posting a question.
Now as to your problem:
There are some solutions for this.
You can for example use a hidden unit with the building buttons to create the building templates as you want.
or you can use a mouse click event and the corresponding actions to retrieve the click location and then place the required actor at that spot.
Rollback Post to RevisionRollBack
Helral's Lair Meow meoow meeow. I'm ze evil SC2MapsterKitten. UI Tutorials listing current projects: UI support for other projects Helrals Random Dungeon Map (progressing very slowly) monitoring wiki and UI development forum
Jesus people is there a way to make a game where I click on the map and a building appears there????
Mouse coordinates can be received using the "mouse moved" event. Alternatively you could just get the mouse position on "mouse click". The latter would be ideal, because it causes less lag. Just set a point variable to "position from X/Y" and then set the x and y values to "mouse X word position" and "mouse Y world position".
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
Right... so as far as I understood the building-placement in sc2 is done through actors (should have guessed that really :) ), so I believe I need a building-placing actor to appear near my mouse when I "use a dialog element" and then I will need another actor to appear where I "place the building". Finally I will remember the specified coordinates for the building placed in a variable and tell my AI to send a worker there to build the frickin structure. When that starts the latter actor disappears.
Now can anyone advice me on the names of the actors that I need?
Yes, and if you could expand a little bit on the "warp-gate-force-select" and "hide-a-worker" comments I would greatly appreciate this. In the end I only need the right actors to appear at the right time in the right place (and disappear likewise) and I don't care how that is implemented.
An scv is used to place the building.
When the building is placed a trigger captures the event and cancels the order.
The place where the building was supposed to be is then used to create the needed building.
When the building is created its model is then changed to the "placement" one (green one) via action.
The building is then rendered invincible and intargetable.
I don't want to use an SCV. I want a building-builder. If I tie the ability to build to a building it cannot build because it cannot move.
I don't want the green building to be the "actual" building. How do Blizzards make it just the silhouette?
Use a warpgate ablity instead, and rather than using protos units, use building. Have an inviible unit have said ability. The ability by default spawn an icon on the right area above the command card. No need for crazy triggering and such.