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

[JASS] custom script help

Status
Not open for further replies.
Level 4
Joined
Aug 3, 2008
Messages
58
  • Set WispCreation[(Player number of (Owner of (Casting unit)))] = (Position of (Casting unit))
how do you remove that location for custom script?

  • Custom script: call RemoveLocation(udg_??????)
its an array so im not sure

thank you
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
let me start with some JASS for you here,,
Player Number of () = GetPlayerId
this returns the ID of the player according to JASS (Player Red = 0, Player Blue = 1, etc..)
You use GUI in general, and GUI uses this functionGetConvertedPlayerId
This returns the ID according to GUI (Player Red = 1, Player Blue = 2, etc..)

so we have this so far:
  • Custom script: call RemoveLocation(udg_WispCreation[GetConvertedPlayerId()]
Owner of () = GetOwningPlayer This returns the owner of the unit

Casting Unit = GetSpellAbilityUnit

So we have now:
  • Custom script: call RemoveLocation(udg_WispCreation[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))]
I hope i actually learned you something instead of doing it for you ;)

-Yixx,,-

EDIT: Dont forget to put '()' after GetSpellAbilityUnit (like thisGetSpellAbilityUnit()

That HAS to be there,,
 
Status
Not open for further replies.
Top