Help with jass script

  • Thread starter Thread starter Repo-Man
  • Start date Start date
R

Repo-Man

Guest
Ok so im making a spell that involves using an item based ability, and because theyve not got orderstrings ive got the order ID and was reading how to cast the spell, im not good at JASS at all and the only way to cast it is using jass... so I was woundering if i could get help, i got the jass function now i need to make the last created unit cast it on the attacking unit.
native IssueImmediateOrderById is the code, 852274 is the string of the ability (unit targeted mirror image).

BTW: this is what i got

Code:
Sword of Deception
    Events
        Unit - A unit Is attacked
    Conditions
    Actions
        Set Chance = (Random integer number between 1 and 100)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                        Chance Less than or Equal to (5 x (Level of Sword of Deception  for (Attacking unit)))
                        ((Attacking unit) has buff Sword of Deception ) Equal to True
            Then - Actions
                Unit - Create 1 Dumbo for Player 1 (Red) at (Position of Blademaster 0000 <gen>) facing Default building facing degrees
                Custom script:   native IssueImmediateOrderById( GetLastCreatedUnit(), GetAttacker(), "852274" )
                Wait 0.50 seconds
                Unit - Remove (Last created unit) from the game
            Else - Actions

Chance on hit mirror image ability.
 
try:
Code:
call IssueTargetOrderBJ(unit,order)

And... How did you get the orderid???
 
> How did you get the orderid?

Here's a guess:
call BJDebugMsg( I2S( GetIssuedOrderId() ) )


"IssueImmediateOrderById" only has two parameters, the unit and the order.
Try one of the Issue Target Orders.
 
AceHart said:
> How did you get the orderid?

Here's a guess:
call BJDebugMsg( I2S( GetIssuedOrderId() ) )


"IssueImmediateOrderById" only has two parameters, the unit and the order.
Try one of the Issue Target Orders.
You were right with the call BJDebugMsg( I2S( GetIssuedOrderId() ) ) ok...

1. will this work native IssueTargetOrderById?
2. If so can you write the script for it so it would be casting the ability on the attacked unit by the last created unit?
 
Code:
call IssueTargetOrderBJ(GetLastCreatedUnit(), "order", GetAttackedUnitBJ())
 
ok ty, but why was the native there in the first place (just for learning purposes)

It still dont work, HELP PLZ!!
Now i got:
Code:
Sword of Deception
    Events
        Unit - A unit Is attacked
    Conditions
    Actions
        Set Chance = (Random integer number between 1 and 100)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                        Chance Less than or equal to (5 x (Level of Sword of Deception  for (Attacking unit)))
                        ((Attacking unit) has buff Sword of Deception ) Equal to True
            Then - Actions
                Game - Display to (All players) the text: SWORD OF DECEPTION
                Unit - Create 1 Dumbo for Player 1 (Red) at (Position of Blademaster 0000 <gen>) facing Default building facing degrees
                Custom script:   call IssueTargetOrderById(bj_lastCreatedUnit, 852274, GetTriggerUnit())
                Wait 0.50 seconds
                Unit - Remove (Last created unit) from the game
            Else - Actions
 
I don't know, but the natives are the internal functions of the game, and they should not be used in triggers(with some exceptions)
 
Persen said:
I don't know, but the natives are the internal functions of the game, and they should not be used in triggers(with some exceptions)

Ok, i did get the script form one of Vex's posts on the old wc3campaigns.com forums
 
AceHart said:
> a spell that involves using an item based ability

What ability was that, btw?
Mirror Image, im doin a chance on hit mirror image, read the first post at the bottom.

EDIT: I will reply l8r on because im going out now.
 
> Mirror Image, im doin a chance on hit mirror image, read the first post at the bottom.

What will your new ability do when ready?
You cast Mirror Image, then ... ?
 
AceHart said:
> Mirror Image, im doin a chance on hit mirror image, read the first post at the bottom.

What will your new ability do when ready?
You cast Mirror Image, then ... ?

:banghead: its a chance on hit mirror image thts it
 
for you to help me fix my trigger, the random bit works fine (tested) but the rest doesnt...
Code:
Sword of Deception
    Events
        Unit - A unit Is attacked
    Conditions
    Actions
        Set Chance = (Random integer number between 1 and 100)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                And - All (Conditions) are true
                    Conditions
                        Chance Less than or equal to (5 x (Level of Sword of Deception  for (Attacking unit)))
                        ((Attacking unit) has buff Sword of Deception ) Equal to True
            Then - Actions
                [COLOR=Red]Game - Display to (All players) the text: SWORD OF DECEPTION[/COLOR]
                Unit - Create 1 Dumbo for (Owner of (Attacking unit)) at (Position of (Attacking unit) <gen>) facing Default building facing degrees
                Custom script:   call IssueTargetOrderById (bj_lastCreatedUnit, 852274, GetTriggerUnit() )
                Wait 0.50 seconds
                Unit - Remove (Last created unit) from the game
            Else - Actions

This is the test i did the text comes up but the mirror doesn't
 
Just tested it and it worked fine for me, not you exact trigger but the custom text.

So:

Has the dummy the ability?
Kill the dummy with a experation timer after 3 sec insteed of a wait of 0.5

Here is the trigger I used:

Code:
    Events
        Player - Player 1 (Red) skips a cinematic sequence
    Conditions
    Actions
        Set unit = (Random unit from (Units in (Playable map area)))
        Unit - Create 1 Footman for Player 1 (Red) at (Position of unit) facing Default building facing (270.0) degrees
        Custom script: call IssueTargetOrderById(bj_lastCreatedUnit, 852274, udg_unit)
 
phyrex1an said:
Just tested it and it worked fine for me, not you exact trigger but the custom text.

So:

Has the dummy the ability?
Kill the dummy with a experation timer after 3 sec insteed of a wait of 0.5

Here is the trigger I used:

Code:
    Events
        Player - Player 1 (Red) skips a cinematic sequence
    Conditions
    Actions
        Set unit = (Random unit from (Units in (Playable map area)))
        Unit - Create 1 Footman for Player 1 (Red) at (Position of unit) facing Default building facing (270.0) degrees
        Custom script: call IssueTargetOrderById(bj_lastCreatedUnit, 852274, udg_unit)

Ok.... so it must be the dummy? he has the ability the ability has no mana cost what else could be wrong!!
EDIT: Ok I did sum testing, it can cast on the hero, it makes the dummy so it obviously is the ability or the getting rid of is too fast ill try ure timer thing
EDIT2: Ok tht doesnt work either.... here's the map try and figure it out (the dummies are there to test if it works on the BM)
 

Attachments

**************************
***BUMP***Ok, still need help***
**************************
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper
  • Stephen Stephen:
    Oh no - please don't lose the Nuon content
    +1
  • The Helper The Helper:
    Someone email AtariAge and see if they want me to transfer the forum data over to it
  • Ghan Ghan:
    Could probably keep NUON stuff around here if we wanted.
  • Ghan Ghan:
    Hmm what to do about the World Editor site though?
  • Stephen Stephen:
    I'd rather personally just own a backup of the Nuon data than see it go to AtariAge honestly. If it gets enshittified as per usual, or if some of the "regular" Jaguar folks get there, it's not gonna be fun
  • The Helper The Helper:
    There will be a github of the forum data so the NUON Forum Data I guess would be available there
  • The Helper The Helper:
    World Editor is technically Ryoko stuff not mine you guys can keep that I am not in that even
  • jonas jonas:
    :( end of an era :(
  • The Helper The Helper:
    Dont think of it as an end jonas - think of it as a beginning, because really my friend that is what it is.
  • A Andyoyo:
    Thank you for the hard work over the years. It did not go unnoticed.

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top