Why Wont this trigger work.

hell_knight

Playing WoW
Reaction score
126
Alright so I accidently protected one of my maps and do not have a recent backup version.

So GG me. I'm not gonna start over. Its almost done just a few triggers to add.
So I extracted the war3map.j file using an MPQ from the map. and I am editing it thru JASSCraft and re-importing it.

Right now when I add something it doesnt work. Might be the fact that I don't KNOW JASS!.

I convert it Copy n paste doesn't work.
I put globals in globals and what not.
Code:
darkrai
    Events
        Player - Player 1 (Red) skips a cinematic sequence
        Player - Player 2 (Blue) skips a cinematic sequence
        Player - Player 3 (Teal) skips a cinematic sequence
        Player - Player 4 (Purple) skips a cinematic sequence
        Player - Player 5 (Yellow) skips a cinematic sequence
        Player - Player 6 (Orange) skips a cinematic sequence
        Player - Player 7 (Green) skips a cinematic sequence
        Player - Player 8 (Pink) skips a cinematic sequence
        Player - Player 9 (Gray) skips a cinematic sequence
        Player - Player 10 (Light Blue) skips a cinematic sequence
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Substring((Name of (Triggering player)), 1, 8)) Equal to Scyllynt
                (Substring((Name of (Triggering player)), 1, 11)) Equal to Version[2.0]
    Actions
        Unit - Create 1   for Neutral Hostile at ((Center of (Playable map area)) offset by 3000.00 towards 270.00 degrees) facing Default building facing degrees
        Game - Display to (All players) the text: testing

JASS:
function Trig_darkrai_Func003C takes nothing returns boolean
    if ( ( SubStringBJ(GetPlayerName(GetTriggerPlayer()), 1, 8) == "Scyllynt" ) ) then
        return true
    endif
    if ( ( SubStringBJ(GetPlayerName(GetTriggerPlayer()), 1, 11) == "Version[2.0]" ) ) then
        return true
    endif
    return false
endfunction

function Trig_darkrai_Conditions takes nothing returns boolean
    if ( not Trig_darkrai_Func003C() ) then
        return false
    endif
    return true
endfunction

function Trig_darkrai_Actions takes nothing returns nothing
    call CreateNUnitsAtLoc( 1, 'H01A', Player(PLAYER_NEUTRAL_AGGRESSIVE), PolarProjectionBJ(GetRectCenter(GetPlayableMapRect()), 3000.00, 270.00), bj_UNIT_FACING )
    call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_871" )
endfunction

//===========================================================================
function InitTrig_darkrai takes nothing returns nothing
    set gg_trg_darkrai = CreateTrigger(  )
    call TriggerRegisterPlayerEventEndCinematic( gg_trg_darkrai, Player(0) )
    call TriggerRegisterPlayerEventEndCinematic( gg_trg_darkrai, Player(1) )


JASS:
GUI and GUI > Custom Text.

My map has its script optimized. So appreciate if someone optimized this.
Not Vjass tho. 

Also I need to know where to stick it.
Like where to put the globals. What function to stick in it.
Like function main.

This is what I have so far..
<div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">JASS:</div><div class="bbCodeBlock-content"><pre class="bbCodeCode"><code class="jass"><span class="keyword">globals</span>
<a href="http://wiki.thehelper.net/wc3/jass/common.j/trigger" class="type">trigger</a> <span>asdf</span><span class="symbol">=</span><span class="value">null</span>
<span class="keyword">endglobals</span>

<span class="keyword">function</span> <span>asdfO</span> <span class="keyword">takes</span> <a href="http://wiki.thehelper.net/wc3/jass/common.j/location" class="type">location</a> <span>R</span><span class="symbol">,</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/real" class="type">real</a> <span>I</span><span class="symbol">,</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/real" class="type">real</a> <span>A</span> <span class="keyword">returns</span> <a href="http://wiki.thehelper.net/wc3/jass/common.j/location" class="type">location</a>
<span class="keyword">return</span> <a href="http://wiki.thehelper.net/wc3/jass/common.j/Location" class="native">Location</a><span class="symbol">(</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/GetLocationX" class="native">GetLocationX</a><span class="symbol">(</span><span>R</span><span class="symbol">)</span><span class="symbol">+</span><span>I</span><span class="symbol">*</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/Cos" class="native">Cos</a><span class="symbol">(</span><span>A</span><span class="symbol">*</span><a href="http://wiki.thehelper.net/wc3/bj_DEGTORAD" class="variable">bj_DEGTORAD</a><span class="symbol">)</span><span class="symbol">,</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/GetLocationY" class="native">GetLocationY</a><span class="symbol">(</span><span>R</span><span class="symbol">)</span><span class="symbol">+</span><span>I</span><span class="symbol">*</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/Sin" class="native">Sin</a><span class="symbol">(</span><span>A</span><span class="symbol">*</span><a href="http://wiki.thehelper.net/wc3/bj_DEGTORAD" class="variable">bj_DEGTORAD</a><span class="symbol">)</span><span class="symbol">)</span>
<span class="keyword">endfunction</span>
<span class="keyword">function</span> <span>asdfK</span> <span class="keyword">takes</span> <a href="http://wiki.thehelper.net/wc3/jass/common.j/nothing" class="type">nothing</a> <span class="keyword">returns</span> <a href="http://wiki.thehelper.net/wc3/jass/common.j/boolean" class="type">boolean</a>
<span class="keyword">return</span><span class="symbol">(</span><a href="http://wiki.thehelper.net/wc3/jass/Blizzard.j/SubStringBJ" class="function">SubStringBJ</a><span class="symbol">(</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/GetPlayerName" class="native">GetPlayerName</a><span class="symbol">(</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/GetTriggerPlayer" class="native">GetTriggerPlayer</a><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">)</span><span class="symbol">,</span><span class="number">1</span><span class="symbol">,</span><span class="number">8</span><span class="symbol">)</span><span class="symbol">=</span><span class="symbol">=</span>&<span>quot</span>;<span>Scyllynt</span>&<span>quot</span>;<span class="symbol">)</span><span class="keyword">or</span><span class="symbol">(</span><a href="http://wiki.thehelper.net/wc3/jass/Blizzard.j/SubStringBJ" class="function">SubStringBJ</a><span class="symbol">(</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/GetPlayerName" class="native">GetPlayerName</a><span class="symbol">(</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/GetTriggerPlayer" class="native">GetTriggerPlayer</a><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">)</span><span class="symbol">,</span><span class="number">1</span><span class="symbol">,</span><span class="number">11</span><span class="symbol">)</span><span class="symbol">=</span><span class="symbol">=</span>&<span>quot</span>;<span>Version</span><span class="symbol">[</span><span class="number">2.0</span><span class="symbol">]</span>&<span>quot</span>;<span class="symbol">)</span>
<span class="keyword">endfunction</span>
<span class="keyword">function</span> <span>asdfl</span> <span class="keyword">takes</span> <a href="http://wiki.thehelper.net/wc3/jass/common.j/nothing" class="type">nothing</a> <span class="keyword">returns</span> <a href="http://wiki.thehelper.net/wc3/jass/common.j/boolean" class="type">boolean</a>
<span class="keyword">return</span><span class="symbol">(</span><span>asdfK</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">)</span>
<span class="keyword">endfunction</span>
<span class="keyword">function</span> <span>asdfL</span> <span class="keyword">takes</span> <a href="http://wiki.thehelper.net/wc3/jass/common.j/nothing" class="type">nothing</a> <span class="keyword">returns</span> <a href="http://wiki.thehelper.net/wc3/jass/common.j/nothing" class="type">nothing</a>
<span class="keyword">call</span> <a href="http://wiki.thehelper.net/wc3/jass/Blizzard.j/CreateNUnitsAtLoc" class="function">CreateNUnitsAtLoc</a><span class="symbol">(</span><span class="number">1</span><span class="symbol">,</span>&#<span class="number">0</span><span class="number">39</span>;<span>H01A</span>&#<span class="number">0</span><span class="number">39</span>;<span class="symbol">,</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/Player" class="native">Player</a><span class="symbol">(</span><span class="number">12</span><span class="symbol">)</span><span class="symbol">,</span><span>asdfO</span><span class="symbol">(</span><a href="http://wiki.thehelper.net/wc3/jass/Blizzard.j/GetRectCenter" class="function">GetRectCenter</a><span class="symbol">(</span><a href="http://wiki.thehelper.net/wc3/bj_mapInitialPlayableArea" class="variable">bj_mapInitialPlayableArea</a><span class="symbol">)</span><span class="symbol">,</span><span class="number">3000.</span><span class="symbol">,</span><span class="number">270.</span><span class="symbol">)</span><span class="symbol">,</span><a href="http://wiki.thehelper.net/wc3/bj_UNIT_FACING" class="variable">bj_UNIT_FACING</a><span class="symbol">)</span>
<span class="keyword">call</span> <a href="http://wiki.thehelper.net/wc3/jass/Blizzard.j/DisplayTextToForce" class="function">DisplayTextToForce</a><span class="symbol">(</span><a href="http://wiki.thehelper.net/wc3/bj_FORCE_ALL_PLAYERS" class="variable">bj_FORCE_ALL_PLAYERS</a><span class="symbol">,</span>&<span>quot</span>;<span>TRIGSTR_871</span>&<span>quot</span>;<span class="symbol">)</span>
<span class="keyword">endfunction</span>

<span class="keyword">call</span> <a href="http://wiki.thehelper.net/wc3/jass/Blizzard.j/TriggerRegisterPlayerEventEndCinematic" class="function">TriggerRegisterPlayerEventEndCinematic</a><span class="symbol">(</span><span>asdf</span><span class="symbol">,</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/Player" class="native">Player</a><span class="symbol">(</span><span class="number">0</span><span class="symbol">)</span><span class="symbol">)</span>
<span class="keyword">call</span> <a href="http://wiki.thehelper.net/wc3/jass/Blizzard.j/TriggerRegisterPlayerEventEndCinematic" class="function">TriggerRegisterPlayerEventEndCinematic</a><span class="symbol">(</span><span>asdf</span><span class="symbol">,</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/Player" class="native">Player</a><span class="symbol">(</span><span class="number">1</span><span class="symbol">)</span><span class="symbol">)</span>
<span class="keyword">call</span> <a href="http://wiki.thehelper.net/wc3/jass/Blizzard.j/TriggerRegisterPlayerEventEndCinematic" class="function">TriggerRegisterPlayerEventEndCinematic</a><span class="symbol">(</span><span>asdf</span><span class="symbol">,</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/Player" class="native">Player</a><span class="symbol">(</span><span class="number">2</span><span class="symbol">)</span><span class="symbol">)</span>
<span class="keyword">call</span> <a href="http://wiki.thehelper.net/wc3/jass/Blizzard.j/TriggerRegisterPlayerEventEndCinematic" class="function">TriggerRegisterPlayerEventEndCinematic</a><span class="symbol">(</span><span>asdf</span><span class="symbol">,</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/Player" class="native">Player</a><span class="symbol">(</span><span class="number">3</span><span class="symbol">)</span><span class="symbol">)</span>
<span class="keyword">call</span> <a href="http://wiki.thehelper.net/wc3/jass/Blizzard.j/TriggerRegisterPlayerEventEndCinematic" class="function">TriggerRegisterPlayerEventEndCinematic</a><span class="symbol">(</span><span>asdf</span><span class="symbol">,</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/Player" class="native">Player</a><span class="symbol">(</span><span class="number">4</span><span class="symbol">)</span><span class="symbol">)</span>
<span class="keyword">call</span> <a href="http://wiki.thehelper.net/wc3/jass/Blizzard.j/TriggerRegisterPlayerEventEndCinematic" class="function">TriggerRegisterPlayerEventEndCinematic</a><span class="symbol">(</span><span>asdf</span><span class="symbol">,</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/Player" class="native">Player</a><span class="symbol">(</span><span class="number">5</span><span class="symbol">)</span><span class="symbol">)</span>
<span class="keyword">call</span> <a href="http://wiki.thehelper.net/wc3/jass/Blizzard.j/TriggerRegisterPlayerEventEndCinematic" class="function">TriggerRegisterPlayerEventEndCinematic</a><span class="symbol">(</span><span>asdf</span><span class="symbol">,</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/Player" class="native">Player</a><span class="symbol">(</span><span class="number">6</span><span class="symbol">)</span><span class="symbol">)</span>
<span class="keyword">call</span> <a href="http://wiki.thehelper.net/wc3/jass/Blizzard.j/TriggerRegisterPlayerEventEndCinematic" class="function">TriggerRegisterPlayerEventEndCinematic</a><span class="symbol">(</span><span>asdf</span><span class="symbol">,</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/Player" class="native">Player</a><span class="symbol">(</span><span class="number">7</span><span class="symbol">)</span><span class="symbol">)</span>
<span class="keyword">call</span> <a href="http://wiki.thehelper.net/wc3/jass/Blizzard.j/TriggerRegisterPlayerEventEndCinematic" class="function">TriggerRegisterPlayerEventEndCinematic</a><span class="symbol">(</span><span>asdf</span><span class="symbol">,</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/Player" class="native">Player</a><span class="symbol">(</span><span class="number">8</span><span class="symbol">)</span><span class="symbol">)</span>
<span class="keyword">call</span> <a href="http://wiki.thehelper.net/wc3/jass/Blizzard.j/TriggerRegisterPlayerEventEndCinematic" class="function">TriggerRegisterPlayerEventEndCinematic</a><span class="symbol">(</span><span>asdf</span><span class="symbol">,</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/Player" class="native">Player</a><span class="symbol">(</span><span class="number">9</span><span class="symbol">)</span><span class="symbol">)</span>
<span class="keyword">call</span> <a href="http://wiki.thehelper.net/wc3/jass/common.j/TriggerAddCondition" class="native">TriggerAddCondition</a><span class="symbol">(</span><span>asdf</span><span class="symbol">,</span><a href="http://wiki.thehelper.net/wc3/jass/common.j/Condition" class="native">Condition</a><span class="symbol">(</span><span class="keyword">function</span> <span>asdfl</span><span class="symbol">)</span><span class="symbol">)</span>
<span class="keyword">call</span> <a href="http://wiki.thehelper.net/wc3/jass/common.j/TriggerAddAction" class="native">TriggerAddAction</a><span class="symbol">(</span><span>asdf</span><span class="symbol">,</span><span class="keyword">function</span> <span>asdfL</span><span class="symbol">)</span></code></pre></div></div>

My apologies but the optimizer got rid of all the indenting and such.
Basicly what I want is it to spawn unit 3000 range south from the center of the map. Idc about leaks at the moment.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • 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

      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