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

Detect "AbilityOrderString" by Trigger

Status
Not open for further replies.
Level 11
Joined
Oct 20, 2007
Messages
342
Summary: Detect Multiple AbilityOrderString "CODE" by Looping

I have many of skill, around 50~80

so i make an AI system, i want make it random casting an abillity,
and i choose to use this trigger:
  • Custom script: call IssuePointOrderLocBJ( udg_Temp_Unit1, "OrderSTRING", udg_Temp_Point1 )
and the problem is order string....

how to make a loop to set OrderSTRING in my string variable with array.


AbilityOrderString example like:
Abillity NameOrderString
Flame Strike flamestrike
Holy Light holybolt
Phoenix sommonphoenix
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
If you want to use orderstrings, you could simply use the GUI action "issue order".

If you want to use jass, it's probably more efficient (and easier IMO) to use order id's instead of order strings.

  • Initialization
  • Events
    • Map Initialization
  • Actions
    • Custom script: set udg_abilities[0] = 'A000'
    • Custom script: set udg_abilities[1] = 'A001'
    • etc.
abilities is an array of integer. The 'A000' is the raw data id of an ability.

  • Use random spell
  • Events
    • ...
  • Actions
    • Initialize TempUnit, TempPoint
    • Set RandomInteger = Random Integer between 0 and (the number of abilities added in first trigger)
    • Custom script: call IssuePointOrderByIdLoc(udg_TempUnit, udg_abilities[udg_RandomInteger], udg_TempPoint)
 
Level 11
Joined
Oct 20, 2007
Messages
342
the 1st trigger i can understand, but how can i edit the code after the spell is created???(not important....)

I have done with it, but i can't find out why it doesn't work !??!?

  • Order string test Integer
    • Events
      • Player - Player 2 (Blue) skips a cinematic sequence
    • Conditions
    • Actions
      • Set Temp_Unit1 = Mage 0015 <gen>
      • Set Temp_Point1 = (Player 4 (Purple) start location)
      • Set Temp_Ability1 = [Skill] Breath of Fire 224
      • Unit - Add Temp_Ability1 to Temp_Unit1
      • -------- -----------------------------------
      • Custom script: call IssuePointOrderByIdLoc( udg_Temp_Unit1, udg_Temp_Ability1, udg_Temp_Point1 )
      • -------- -----------------------------------
But this WORK
  • Order string test Integer
    • Events
      • Player - Player 2 (Blue) skips a cinematic sequence
    • Conditions
    • Actions
      • Set Temp_Unit1 = Mage 0015 <gen>
      • Set Temp_Point1 = (Player 4 (Purple) start location)
      • Set Temp_Ability1 = [Skill] Breath of Fire 224
      • Unit - Add Temp_Ability1 to Temp_Unit1
      • -------- This is the Different --------
      • Unit - Order Temp_Unit1 to Neutral Pandaren Brewmaster - Breath Of Fire Temp_Point1
      • -------- ------------------- --------
BUT this trigger
  • Unit - Order Temp_Unit1 to Neutral Pandaren Brewmaster - Breath Of Fire Temp_Point1
can't use of variable.....
the action's option only can choose from "preset" that world editor giving.
bcoz of i can't even use a variable, that y i choose jass
 
Last edited:
Status
Not open for further replies.
Top