• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Custom buildings

Status
Not open for further replies.
Level 2
Joined
Jun 26, 2012
Messages
7
Well, i have spend a full hour now, searching for a Thread about this, but haven't found anything. I'm not even sure, if this belongs here, sorry if I'm wrong.

For the map, I'm working on, i was trying to customize my tower models a bit, since the standart WC3 models can get boring very fast, even with attachments.
For example I wanted to create a Priest, standing on a small pillar, or a small Castle, surroundet by guard Towers.
I had seen models like this in You-TD and Castle Fight, but never found a guide on how to do this.
Does anyone know how to do modify towers without importing stuff?

Thanks in advance
Triar
 
Level 2
Joined
Sep 8, 2010
Messages
13
Just to make it clear, do you want to change the tower models? If so it's under Art - Model File. I assume you want to change the projectile aswell which is under Combat - Attack 1 - Projectile Art.

Edit: What do you mean with surrounded by guard towers? Please be more specific.
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
http://www.eeve.org/doc/youtd/c2.html#3

Looks like YouTD uses a custom system to attach those things to the tower.

It can be done without that though, albeit in a simpler manner:
Make the tower's unit model a small pillar or castle.

1. Get a unit indexer (find one in the spells section), this will give every unit in the map a unique custom value. The custom value will be used to index all the affects associated with the tower.

2. The trigger:
  • New Tower
  • Events
    • Unit - tower is built
  • Conditions
    • Unit type of built unit is your tower
  • Actions
    • Set TempPoint = position of built unit
    • Set TempIndex = custom value of built unit
    • Special effect - create a special effect attached to the overhead of built unit using "Units\Human\Priest"
    • Set TowerSFXa[TempIndex] = last created special effect
    • Set TempPoint2 = TempPoint1 offset by 70,70
    • Special effect - create a special effect at TempPoint2 using "Units\Human\GuardTower"
    • Set TowerSFXb[TempIndex] = last created special effect
    • Custom script: call RemoveLocation(udg_TempPoint2)
    • Set TempPoint2 = TempPoint1 offset by -70,70
    • Special effect - create a special effect at TempPoint2 using "Units\Human\GuardTower"
    • Set TowerSFXc[TempIndex] = last created special effect
    • Custom script: call RemoveLocation(udg_TempPoint2)
    • Custom script: call RemoveLocation(udg_TempPoint)
Then in another trigger, when the unit dies, you destroy all special effects associated with it, using the unit's custom value as the array index.

A better way to do this would be using vJASS or hashtables, since you can have two-dimensional arrays. In this example, each additional sfx is a new variable.
 
Level 2
Joined
Jun 26, 2012
Messages
7
#GianticInferno
The normal "change", like model and projectile, is what can get boring. I already created towers with other models, but this gets repetitive, really fast.
I planned to create a castle as base and guard towers on all 4 corners of the model.
Hope this was a better explanation. =)

#rulerofiron99
Thanks, I will try using your version.
And thanks a second time. You showed me, that I haven't understood really much about triggering. Maybe is hould go back to the tutorials again. =/
Or maybe I finnaly should start to get used to vJASS and hashtables, since they are highly appreciated. Though that will take some time. =(
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
Now that I think some more about it, what you really want is a custom blank model that has multiple attachment points.

For example, when a building in warcraft burns, fire is created at various points on the building - each of these is a different attachment point. If you can use those instead, you won't need any triggers, since you'll just give the unit a whole bunch of abilities based on Capture the Flag (this ability allows you to attach a model to a model at a specified attachment point).
 
Status
Not open for further replies.
Top