custom script issue

WuHT

New Member
Reaction score
6
Just a few quick questions here :

1) what is the custom script for ordering a unit to used an ability based on "healing scroll" (the one that gives an immediate +hp bonus in an AoE to surrounding allies) I know 0 jass.

2)I have these units (that are summons), and when they are slain (not expired) i'd like an effect to happen. Is there a way to use triggers to tell apart when a unit is "slain" by a unit belonging to an enemy player as opposed to dying naturally due to expiration timer ?


Thanks in advance :eek:
 
M

Malygos

Guest
1)Why must use JASS? If u really need to use JASS, make a GUI version first, convert it to JASS than adding extra JASS text
2)
Event
Unit - *Your unit*'s life becomes Less than 1.00

U may need to use this too:
Event
Unit - A unit Spawns a summoned unit
Actions
Set summoned_unit = (Summoned unit)

Then just change *Your unit* to summoned_unit variable
Understand?:D
 

Chocobo

White-Flower
Reaction score
409
1 : You could try "healingscroll", but it didn't work. So I do not know what to use.

2 :

Code:
Super Death Summon Effect
Events
Unit - Generic unit dies

Conditions
((Triggering unit) is a summoned) Equal to True //under boolean comparaison
(Killing unit) not equal to No unit //this checks if the killing unit is not the expiration timer

Actions
Special Effect - Create <blabla..>
 

SFilip

Gone but not forgotten
Reaction score
634
> I know 0 jass.
Then how do you possibly intend to use this script?
Well anyway...I'll make it simple by using a variable of type unit called u. Set it to whatever unit you want to cast the ability before you use this custom script.
For "Item Area Healing" (the Scroll of Healing ability)
Code:
call IssueImmediateOrderById(udg_u, 852273)
For "Item Area Mana Regain" (the Scroll of Mana ability)
Code:
call IssueImmediateOrderById(udg_u, 852277)
 

WuHT

New Member
Reaction score
6
aich! well i'm just wondering if there is was a "list/database" of custom script for item-based abilities.

I asked last time , and for the item illusin-wand was given a nice answer. I was just hoping for the same.
Like for 852273 --> how did you know it was the aoe heal?

I know this sounds kinda silly..but where did AceHeart know that Custom script: call IssueTargetOrderById(bj_lastCreatedUnit, 852274, GetTriggerUnit()) was for the command for "item-illuions"


err simliar question about custom script : Does anybody know the script for ordering a unit based the orc-store-bought healing potion (one with 3 charges, heales over time, dispels if hit).
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Code:
OrderNoTarget
    Events
        Unit - A unit owned by Player 1 (Red) Is issued an order with no target
    Conditions
    Actions
        Game - Display to (All players) the text: (((Name of (Triggering unit)) +  (N): ) + (String((Issued order))))
        Custom script:   call BJDebugMsg( I2S( GetIssuedOrderId() ) )

Same for the other orders.

Most of them do have an actual order string (as seen in "text - order string").
For those that don't, like most item abilities, the custom script line will tell you the order ID.
 

WuHT

New Member
Reaction score
6
o man im' very confused.

Is that the trigger i use to FIND The order id (ie the #) ??


So here are the steps i should do :

Copy the trigger
Give my unit the ability based on the item
activiate the ability manually...
then i'd get a display of the id
copy that value down...

then re-make a trigger with the custom script with the copied value?!?!?!


Off to work!

Thx again <3 :)
 

WuHT

New Member
Reaction score
6
errr some problems now :

I pretty much cut-and-paste your trigger, and there was a problem, saying that
"Custom script: call BJDebugMsg( I2S( GetIssuedOrderId() ) ) " expected a code statement.


here is what i have
Code:
Order String
    Events
        Unit - A unit owned by Player 1 (Red) Is issued an order with no target
    Conditions
    Actions
        Game - Display to (All players) the text: (((Name of (Trigger...
        Custom script:   Custom script:   call BJDebugMsg( I2S( GetIssuedOrderId() ) )

where the text is : (((Name of (Triggering unit)) + (N): ) + (String((Issued order)))) copied and pasted into the text value box. 8 ('s and )'s
 

SFilip

Gone but not forgotten
Reaction score
634
Remove the "Custom script: " from the actual code.
 

WuHT

New Member
Reaction score
6
thank you very much SFilip

Overlooked the beginning of the script and spent time counting brackets and such. Its so obvious when u look in hindsight!
My contributions /final skeptism

For the instant aoe heal / Orc 3 charge heal-over-time / Human healing scroll over-time/ are ALL 852008.

Now im' a little suspicious but i hope im' right this time
----
1 : You could try "healingscroll", but it didn't work. So I do not know what to use.

2 :

Code:
Super Death Summon Effect
Events
Unit - Generic unit dies

Conditions
((Triggering unit) is a summoned) Equal to True //under boolean comparaison
(Killing unit) not equal to No unit //this checks if the killing unit is not the expiration timer

Actions
Special Effect - Create <blabla..>

Where exactly is "no unit" under (i'm unfamiliar with this)
it's not a unit-classification (i checked the unit choices under boolean)
 

SFilip

Gone but not forgotten
Reaction score
634
> Where exactly is "no unit" under
Unit Comparison.
 

WuHT

New Member
Reaction score
6
Thank you again

errr afew last questions

would this custom script only work for abilities that TARGET ?

call IssueTargetOrderById(bj_lastCreatedUnit, 852008, GetTriggerUnit())

the gettriggerunit..what should i change it to ?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Well, there's several of them.

"Issue order with no target":
IssueImmediateOrderById(caster,order)

"Issue order targeting a point":
IssuePointOrderById(caster,order,x,y)
or
IssuePointOrderByIdLoc(caster,order,location)

"Issue oder targeting an unit / object":
IssueTargetOrderById(caster,order,target)
 

Chocobo

White-Flower
Reaction score
409
The funniest is IssueTargetOrderById(caster,order,target), because the target is classified as a widget, so you can target items, trees, units, structures, doodads, destructables..

Since you used healing scroll, it would be :

Code:
IssueImmediateOrderById(GetTriggerUnit(),852008)

GetTriggerUnit() is for the triggering unit.
 

WuHT

New Member
Reaction score
6
thanks for the useful info!

Hrmm i actually did try to remove the last part GetTriggerUnit() but ran into script errors, but i know i have to use the word "immediate" after issue!


Time to try this out!!

anyone see anything wrong with this ?

Code:
G Entling Death Copy
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Dying unit)) Equal to Entling
        ((Killing unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True
        (Killing unit) Not equal to No unit
    Actions
        Unit - Create 1 Dummy for (Owner of (Dying unit)) at (Position of (Dying unit)) facing Default building facing degrees
        Unit - Add Item dummy tree healing  to (Last created unit)
        Custom script:   call IssueImmediateOrderById(bj_lastCreatedUnit, 852008)
        Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
where "item dummy tree healing" is basically a scroll of healing
852008 seems to be a generic "use scroll" command :( It's also for scroll of speed
BUT...scroll of protectin *(armour bonus) is 852009. I am very confused!!!!
 

WuHT

New Member
Reaction score
6
because im' a big nub.

Well i can say that activating a scroll sure feels a lot faster than the effects of starfall.

O btw i figured it out :

its' 852773 for actiaving an ability based on the item ability of healin scroll.

Thanks to all those that TAUGHT me how to figure it out myself , it's the best way of learning :) :eek:
 
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