• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

building creating units using mana

Status
Not open for further replies.
Level 12
Joined
May 22, 2015
Messages
1,051
Do you need the units to train like normal with the progress bar and ability to cancel, etc? It is more complicated with that, but most likely still doable.

If not, you can just use dummy spells that don't do anything (penguin squeak, for example). Give them the appropriate mana cost and the trigger is very easy:
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) equal to (SpawnUnit1)
  • Actions
    • Unit - Create 1 (Unit1) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing 270
Note that SpawnUnit1 is the dummy ability for Unit1. Unit1 is one of the units that the building can create. There is also a single point leak in there.

I can look into the other way, but I don't know exactly how it would work. I would need to mess around with the triggers at home.
 
Level 9
Joined
Jun 10, 2013
Messages
473
Do you need the units to train like normal with the progress bar and ability to cancel, etc? It is more complicated with that, but most likely still doable.

If not, you can just use dummy spells that don't do anything (penguin squeak, for example). Give them the appropriate mana cost and the trigger is very easy:
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) equal to (SpawnUnit1)
  • Actions
    • Unit - Create 1 (Unit1) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing 270
Note that SpawnUnit1 is the dummy ability for Unit1. Unit1 is one of the units that the building can create. There is also a single point leak in there.

I can look into the other way, but I don't know exactly how it would work. I would need to mess around with the triggers at home.

No that's perfect !

EDIT: Damn can't give you rep again
 
Level 9
Joined
Jun 10, 2013
Messages
473
One last thing I have this trigger that at the start of the game should you have a certain race like NE it will ask if you want to be "MY CUSTOM RACE" yes or no should you press no your the NE should you press ye your my new race and have the new units it all works perfectly but I now I want 3 races to chose from so when you pick NE instead of seeing the above you'll see custom race 1,2 and 3 the you pick the Race.

//Note I don't want players to be able to play as the Vanilla races and I plan for each race to have 3 different options (will probably expand to 4 or 5 per race)

So I was thinking the best would be an altered form of my current system only problem is I don't now how to alter it to what I want

*Pics*
http://www.hiveworkshop.com/forums/members/229903-albums8332.html
 
Level 19
Joined
Oct 7, 2014
Messages
2,209
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) equal to (SpawnUnit1)
  • Actions
    • Unit - Create 1 (Unit1) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing 270

This trigger has a leak.

Create a point variable for your location
Assign the variable with your location
Remove the location after using it.

  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) equal to (SpawnUnit1)
  • Actions
    • Set Location = (Position of (Triggering unit)) facing 270
    • Unit - Create 1 (Unit1) for (Owner of (Triggering unit)) at Location facing 270
    • Custom script: call RemoveLocation(udg_Location)
 
Status
Not open for further replies.
Top