• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Issue order targeting point with custom script.

Status
Not open for further replies.
Level 4
Joined
Jun 8, 2020
Messages
28
Need your help guys.

Making own AI for custom map, and i need to order hero to plant the mine at random point around hero.
My problem is that dont know how to issue order targetting point with custom script. To plant the mine i have to use custrom script as it is missing in standart actions.

Usualy i was using custom script to issue order with no target. Example.

call IssueImmediateOrderById(udg_Hero_Palladin, 852625)

Buн how to do it targeting a point?
 
Last edited:
Level 4
Joined
Jun 8, 2020
Messages
28
Having problem with syntax.


call IssuePointOrderById( udg_Hero_orcSniper, 852278, OffsetLocation(GetUnitLoc(GetEnumUnit()), GetRandomReal(-100.00, 100.00), GetRandomReal(-100.00, 100.00)) )
What is wrong here?
 
Level 24
Joined
Jun 26, 2020
Messages
1,850
Ay, If you have TESH you can see all the functions, if not, do what @LazZ said, use the function in GUI and convert it to a custom script code.

PD: The function is called PolarProjectionBJ not OffsetLocation, and if the angle is between -100 and 100, you won't get all the posible points you can get, change it to 0 and 360.
 
Status
Not open for further replies.
Top