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

Custom Script

Status
Not open for further replies.
Level 14
Joined
Dec 29, 2009
Messages
931
  • Q1 Finish
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Selling unit) Equal to Sergeant Karael 0060 <gen>
      • (Buying unit) Equal to HS_PlayerHero[(Player number of (Owner of (Buying unit)))]
      • (Item-type of (Sold Item)) Equal to Finish Quest
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Q1_Killcount[(Player number of (Owner of (Buying unit)))] Less than 20
        • Then - Actions
          • Cinematic - Clear the screen of text messages for (Player group((Owner of (Buying unit))))
          • Game - Display to (Player group((Owner of (Buying unit)))) for 4.00 seconds the text: |cffffcc00Sergeant ...
        • Else - Actions
          • Set Q1_SFXTempLoc[(Player number of (Owner of (Buying unit)))] = (Position of HS_PlayerHero[(Player number of (Owner of (Buying unit)))])
          • Special Effect - Create a special effect at Q1_SFXTempLoc[(Player number of (Owner of (Buying unit)))] using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
          • Custom script: call RemoveLocation(udg_Q1_SFXTempLoc[GetConvertedPlayerId(GetBuyingUnit())])
The action in question is this one;

  • Custom script: call RemoveLocation(udg_Q1_SFXTempLoc[GetConvertedPlayerId(GetBuyingUnit())])
I thought this would work, but aparently not.
I need to remove this location;

  • Set Q1_SFXTempLoc[(Player number of (Owner of (Buying unit)))] = (Position of HS_PlayerHero[(Player number of (Owner of (Buying unit)))])
Any help offered is greatly appreciated.
 
Level 14
Joined
Dec 29, 2009
Messages
931
ap0calypse! I can always count on you. :p

I figured it would be something like that.
Just started using NewGen WE and I was looking through the function list, that's how I found the GetBuyingUnit.
If I might ask, what's the +1 at the end for?

Anywho, thank you. You're amazingly helpful as usual.

EDIT:

2nng39.png


I tried including the +1 as well, and it came up with an additional error.
What did I do wrong?

call RemoveLocation(udg_Q1_SFXTempLoc[GetPlayerID(GetOwningPlayer(GetBuyingUnit()))])

EDIT2: Yeah, just saw I made a capitalization error (ID vs. Id) haha.
Works fine, no errors!

Thanks again!
~Archange1
 
Status
Not open for further replies.
Top