• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!

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