• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Help with custom script

Status
Not open for further replies.
Level 11
Joined
May 31, 2008
Messages
698
Can someone tell me how to fix this custom script?

Custom script: call RemoveLocation(udg_Move[(Player number of (Owner of (Triggering unit)))])

The error is Expected '('

I have tried adding and removeng numerous parentheses, but i cant figure out the correct way. And i just copied "Move[(Player number of (Owner of (Triggering unit)))]" right from my trigger

And i really need this because without it my map becomes very laggy very fast
 
Level 11
Joined
May 31, 2008
Messages
698
it worked!!! Thank you so much +rep to both of you (even tho busterkomo disabled it >.< ). BTW do you know of anywhere that i can get all (or some common) commands ...or whatever you would call them... for custom script cuz that wud be useful. I just refer to the "things that leak" thread if i forget what they are :D
 
Level 13
Joined
Sep 29, 2008
Messages
671
First set the variable in a test trigger. Like your is

  • Untitled Trigger 002
    • Events
    • Conditions
    • Actions
      • Set Move[(Player number of (Triggering player))] = (Center of (Playable map area))
Then convert this into custom text. Edit > Convert to Custom Text
Then this appears.

JASS:
function Trig_Untitled_Trigger_002_Actions takes nothing returns nothing
    set udg_Move[GetConvertedPlayerId(GetTriggerPlayer())] = GetRectCenter(GetPlayableMapRect())
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_002 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_002 = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Untitled_Trigger_002, function Trig_Untitled_Trigger_002_Actions )
endfunction

Then you can get the custom script there so you'll know.
"udg_Move[GetConvertedPlayerId(GetTriggerPlayer())]"

I always do this because I too don't know jass. ^^
 
Status
Not open for further replies.
Top