• 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.

Class changer

Status
Not open for further replies.

S11

S11

Level 3
Joined
Apr 29, 2012
Messages
41
Can someone help me with this class changer, and tell me what i did wrong. What i need to do is make a class changer to change into a class when they get to level 10

So if i was a novice and i wanted to be a squire id have to be lvl 10 in order to change my class other wise the class merchant wouldn't allow me to change into a squire because i have to be level 10

This is what i have for the trigger

35jwn5f.jpg
 
Level 25
Joined
May 11, 2007
Messages
4,650
Why don't you use the "If HeroName(Player bla bla bla" in the If All conditions are True action?

Also, the trigger doesn't have summoned unit, I think you're after the (Unit-Type of (Sold unit)) equal to Squire.

also, just remove the Buying unit, instead of removing ALL player units.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Create in the OE a Dummy Squire unit.
TUnit is a Unit variable.

  • GUI Trigger
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Unit-type of (Sold unit)) Equal to DummySquire
    • Actions
      • Set TUnit = (Buying unit)
      • Unit - Remove (Sold unit) from the game
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of TUnit) Equal to Footman
          • (Hero level of TUnit) Greater than or equal to 10
        • Then - Actions
          • Unit - Replace TUnit with a Squire using The new unit's max life and mana
          • -------- You can also remove the unit and create a new one or replace it. --------
        • Else - Actions
          • -------- Do whatever you want like Displaying a Message saying "You can't upgrade yet" or something. --------
 

S11

S11

Level 3
Joined
Apr 29, 2012
Messages
41
Why don't you use the "If HeroName(Player bla bla bla" in the If All conditions are True action?

Also, the trigger doesn't have summoned unit, I think you're after the (Unit-Type of (Sold unit)) equal to Squire.

also, just remove the Buying unit, instead of removing ALL player units.

i had it as sold but it didnt work when i tested so i just hit back to summoned but thank you for the info


Create in the OE a Dummy Squire unit.
TUnit is a Unit variable.

  • GUI Trigger
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Unit-type of (Sold unit)) Equal to DummySquire
    • Actions
      • Set TUnit = (Buying unit)
      • Unit - Remove (Sold unit) from the game
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of TUnit) Equal to Footman
          • (Hero level of TUnit) Greater than or equal to 10
        • Then - Actions
          • Unit - Replace TUnit with a Squire using The new unit's max life and mana
          • -------- You can also remove the unit and create a new one or replace it. --------
        • Else - Actions
          • -------- Do whatever you want like Displaying a Message saying "You can't upgrade yet" or something. --------

thank you so much
 
Last edited:
Status
Not open for further replies.
Top