Custom Script Targetting

Meowier

New Member
Reaction score
6
In my code, a unit is ordered to cast 'healing scroll' as an ability, i've got the code and all, but i'm not sure what to put down to get the 'picked unit'.

Custom script: IssueImmediateOrderById(GetPickedUnit,857223)

WE isn't liking that. :p
 

vypur85

Hibernate
Reaction score
803
Code:
GetEnumUnit ()

The above should work.

Edit:

Oh yeah, you forgot the 'call' too.

Code:
Custom script: call IssueImmediateOrderById ( GetEnumUnit() ,857223 )
 

Meowier

New Member
Reaction score
6
That doesn't change anything... maybe i've put what you suggested in the wrong bit? :S
 

Meowier

New Member
Reaction score
6
Using the same format... how would I register it to get different variabled units? Such as Last Created Unit, or Triggering unit, etc?
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
Using the same format... how would I register it to get different variabled units? Such as Last Created Unit, or Triggering unit, etc?

You know you can just try converting a trigger to see what they are..

JASS:
Last Created Unit - bj_lastCreatedUnit

Triggering Unit - GetTriggerUnit()
 

Meowier

New Member
Reaction score
6
I've put it in and enabling the trigger isn't working, WE isn't liking the coding. I tried grabbing a normal 'units does action with no target' code, and turning it into JASS, to grab the custom code. But it isn't liking that, either. :/
 

vypur85

Hibernate
Reaction score
803
> the trigger isn't working

Hmmm... It means you did something wrong. Showing the trigger will help a lot. As for your question, I'll just show you the example:

Code:
Custom script: call IssueImmediateOrderById ( GetTriggerUnit() , 857223 )
Custom script: call IssueImmediateOrderById ( [B]bj_lastCreatedUnit[/B] , 857223 )

Notice the bolded code above? Not all is capital letter. And it doesn't have the (). Just in case...

Edit:
Anyway, I wonder what Order ID is this: 857223.
 

Meowier

New Member
Reaction score
6
The last created unit one is what I want, the triggering unit was just an example (i'll probably need it sometime tho)

The code you gave didn't work, and the ID is for the spell 'item healing scroll'
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top