• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Custom Script

Status
Not open for further replies.
Level 14
Joined
Dec 29, 2009
Messages
928
  • 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
928
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