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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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