Penultimate
New Member
- Reaction score
- 2
Hi, I'm new to thehelper.net and I believe this is the correct place to post this thread. If not, then I do apologize.
Now that I'm done with the introduction, I will talk about the topic. I read on XXXconanXXX's AI-Basics and Triggers that a way to order a computer controlled unit to cast a spell, you need to either choose a spell from the preset list, or you type the order string of the spell.
Here is what I have:
The problem I was having involved how the unit Rashok, wouldn't cast an ability. I have put the ability finger of death in Rashok's ability list. Also, Rashok is a Hero. And Finger of Death uses the order string fingerofdeath.
If anyone can help explain to me how to fix my problem, it would be most appreciated. And thank you in advance for reading this post.
Now that I'm done with the introduction, I will talk about the topic. I read on XXXconanXXX's AI-Basics and Triggers that a way to order a computer controlled unit to cast a spell, you need to either choose a spell from the preset list, or you type the order string of the spell.
Here is what I have:
JASS:
function Trig_Rashok_Actions takes nothing returns nothing
call TriggerSleepAction( 2.00 )
call IssueTargetOrderBJ( gg_unit_U000_0020, "fingerofdeath", GetAttacker() )
endfunction
//===========================================================================
function InitTrig_Rashok takes nothing returns nothing
set gg_trg_Rashok = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Rashok, gg_unit_U000_0020, EVENT_UNIT_ATTACKED )
call TriggerAddAction( gg_trg_Rashok, function Trig_Rashok_Actions )
endfunction
Trigger:
- I converted the JASS from a trigger. Here is the trigger:
- Rashok original
- Events
- Unit - Rashok 0020 <gen> Is attacked
- Conditions
- Actions
- Wait 2.00 seconds
- Unit - Order Rashok 0020 <gen> to Orc Raider - Ensnare (Attacking unit)
- Events
- Rashok original
The problem I was having involved how the unit Rashok, wouldn't cast an ability. I have put the ability finger of death in Rashok's ability list. Also, Rashok is a Hero. And Finger of Death uses the order string fingerofdeath.
If anyone can help explain to me how to fix my problem, it would be most appreciated. And thank you in advance for reading this post.