• 🏆 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!

[Trigger] Return to Stockpile?

Status
Not open for further replies.
Level 5
Joined
Nov 6, 2014
Messages
70
ABILITY: Expel
The sorceress will hurl a bolt of energy causing a twirling sparks cloak the target, making it fade, causing it to return to another dimension.
The target is then removed but its wood and gold cost is returned to the stockpile resource of the owner.
SOURCE ABILITY: Firebolt

  • SorceressExpel
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • ((Target unit of ability being cast) is A Hero) Equal to False
      • (Unit-type of (Casting unit)) Equal to Blood Elf Sorceress
      • (Ability being cast) Equal to Expel
    • Actions
      • Set BloodElfSorceress_EXPGold[1] = (Get (Unit-type of (Target unit of ability being cast))'s wood cost)
      • Set BloodElfSorceress_EXPGold[1] = (Get (Unit-type of (Target unit of ability being cast))'s gold cost)
      • Set BloodElfSorceress_EXPcaster[1] = (Casting unit)
      • Set BloodElfSorceress_EXPTarg[1] = (Target unit of ability being cast)
      • Set BloodElfSorceress_EXPPlayer[1] = (Owner of (Target unit of ability being cast))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of (Target unit of ability being cast)) Less than 6
        • Then - Actions
          • Special Effect - Create a special effect at (Target point of ability being cast) using EXPSET4FXSPLSBFS\Taex\taex.mdx
          • Set BloodElfSorceress_ExpEfx[1] = (Last created special effect)
          • Wait 1.00 seconds
          • Unit - Remove (Target unit of ability being cast) from the game
          • Memory Leak - Destroy BloodElfSorceress_ExpEfx[1]
          • Player - Add BloodElfSorceress_EXPGold[1] to BloodElfSorceress_EXPPlayer[1] Current gold
          • Player - Add BloodElfSorceress_EXPWood[1] to BloodElfSorceress_EXPPlayer[1] Current lumber
        • Else - Actions
ERRORS FOUND:
24v4cq9.jpg


Don't know how to fix this.
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
#1

With the wait, this trigger will not run as intended because the globals will be rewritten, and so will the target unit.

#2

In the TESH I see no such function that is GetUnitGoldCost() and I've never see the GUI have anything like that either. On a less important note you save the Gold value into BES_EXPGold[1] and then save right over it instantly with the lumber cost.

My question to you is, what type of WE are you using?

Also, there is likely a better way to do this, such as indexing each of your buildings and then retrieving the lumber/gold cost from a catalog.

Edit: Also, the ability does not have a target point of ability being cast, so you'll need to change it to the position of the unit or have it create it on the unit (probably want the former since the unit is going to be removed)
 
Level 19
Joined
Jul 14, 2011
Messages
875
Are you using TESH's syntax check? I think it just checks the current trigger, ignoring everything else including globals. Just save instead. Lol, gui doesnt have syntax check.

Try disabling WEU, or any other custom functions. TriggerStrings and TriggerData were the files I think.
 
Level 5
Joined
Nov 6, 2014
Messages
70
#1

With the wait, this trigger will not run as intended because the globals will be rewritten, and so will the target unit.

#2

In the TESH I see no such function that is GetUnitGoldCost() and I've never see the GUI have anything like that either. On a less important note you save the Gold value into BES_EXPGold[1] and then save right over it instantly with the lumber cost.

My question to you is, what type of WE are you using?

Also, there is likely a better way to do this, such as indexing each of your buildings and then retrieving the lumber/gold cost from a catalog.

Edit: Also, the ability does not have a target point of ability being cast, so you'll need to change it to the position of the unit or have it create it on the unit (probably want the former since the unit is going to be removed)

It's WEU, so how would I be able to create such spell?
Target point of ability being cast seem to confuse me, but it has target unit of ability being cast?
 
Level 19
Joined
Jul 14, 2011
Messages
875
If youre using jngp then why is the regular syntax checker showing? You should disable it(when viewing the terrain Grimoire tab > Disable WE Syntax Checker) and enable jasshelper(the jasshelper tab > Enable Jasshelper).

Also, to disable WEU features, go to the UMSWE tab and UNCHECK 'Enable UMSWE' - you need to restart the editor for this.
 
Status
Not open for further replies.
Top