Custom Script ability-related problems

Meowier

New Member
Reaction score
6
I'm still having problems with custom scripts involving the use of abilities, I have a trigger that basically creates an illusion of everything in a target area of effect.

The spell in question is 'Item illusion', which has been converted to a unit ability, etc, etc.

Here is the custom script code

Code:
Custom script:   call IssueTargetOrder(GetLastCreatedUnit(),"852274",GetWUnit())
 

YourFace

<span style="color:#9C9C9C;"><strong>Runner Up - T
Reaction score
91
and what exactly is the problem?

does the trigger have no effect? they go to wrong place?

also
Code:
Custom script:   call IssueTargetOrder(GetLastCreatedUnit(),"852274",[B]GetWUnit[/B]()
GetWUnit?
 

Meowier

New Member
Reaction score
6
Ah, I forgot about explaining that.

The problem is that World Editor does not like the code, which would probably mean the script doesn't work.

Something is wrong with it, and I know very little about custom scripting.

I would suspect that the problem with it is the names, WUnit and GetLastCreatedUnit
 

saw792

Is known to say things. That is all.
Reaction score
280
IssueTargetOrder() takes a string order, not an order ID inside a string. Things like "move" "attack" "shockwave" etc are acceptable. Also, GetWUnit() does not exist.

If WUnit is your GUI unit variable name then it must be used as udg_WUnit (with no brackets at the end). Brackets are only used for functions.
 

Meowier

New Member
Reaction score
6
Yes, a custom script is needed. In actions - units - order unit to ---- on unit, there is no 'item illusion'.

I've changed the variable bit to what you suggested, but what should I be changing IssueTargetOrder too?

What about LastCreatedUnit, is that correct?
 

Meowier

New Member
Reaction score
6
Code:
Custom script:   call IssueTargetOrderById(GetLastCreatedUnit()","852274",udg_WUnit

I've been doing what you've said, but it's saying

Line 237 Expected '
 

Meowier

New Member
Reaction score
6
Alright. What saw just said worked, i'm going to go test the ability and see if I need any further help.

Thank you!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top