Simplifying this particular Multiple Event in a trigger..

LearningCode

New Member
Reaction score
24
So I should use DisplayTextToPlayer?

JASS:
function GiveAid takes nothing returns nothing
    call DisplayTextToPlayer( GetTriggerPlayer(),0,0, " |cffffcc00-----AHS-Maul TD-----" )
    call DisplayTextToPlayer( GetTriggerPlayer(),0,0, "-Build buildings at your area and upgrade, or combine, them to form even stronger towers" )
    call DisplayTextToPlayer( GetTriggerPlayer(),0,0, "-The towers will kill enemy creeps that are trying to enter our awesome Arcade and crash our party!" ) 
    call DisplayTextToPlayer( GetTriggerPlayer(),0,0, "-Each time a creep reaches the Arcade, you lose a live" )
    call DisplayTextToPlayer( GetTriggerPlayer(),0,0, "-Losing all lives will cause you to lose the game" )
    call DisplayTextToPlayer( GetTriggerPlayer(),0,0, "" )
    call DisplayTextToPlayer( GetTriggerPlayer(),0,0, "-Good luck!" )
endfunction

//===========================================================================
function InitTrig_Help takes nothing returns nothing
    local integer i = 0
    local trigger t = CreateTrigger()
    loop
        exitwhen (i == 8)
        call TriggerRegisterPlayerChatEvent(t, Player(i), "-help", true)
        set i = i+1
    endloop
    call TriggerAddAction(t, (function GiveAid))
endfunction


Is it better now?
 

Jesus4Lyf

Good Idea™
Reaction score
397
Looks great to me.

I think you should use GUI. :thup:
(Actually, use whatever is faster for you to code that sort of stuff in, for me that's GUI.)

And I will say now, that if you use cJass, I can't help you. That makes the (graveyarded) guide Nestharus keeps linking all over the place pretty useless, because it will teach you to use things that aren't supported here generally.
 

LearningCode

New Member
Reaction score
24
I already have the entire map I made in GUI.
But I am trying to convert as much as I can into JASS so that I can learn SOMETHING, lol.

For now, it's the core functions that I am converting =x

I don't want to confuse myself with v and c JASS yet.. >.<
 

Jesus4Lyf

Good Idea™
Reaction score
397
Get NewGen.
Convert things from GUI to JASS.
Hold 'ctrl' and click on the red functions, they should display in a little windows.
These are Blizzard.j functions, as opposed to Common.j natives.
The natives are raw functions which you cannot get simpler than, and are in purple or whatever. The functions that are in red just call natives or do similar stuff, and could be written yourself.

Basically, raw functionality in WC3 comes from natives. Generally, you want to learn what the natives do. :)
That's a good way to learn a bit.

PS. I still sometimes use GUI and convert to JASS and then ctrl click stuff to find what natives I need/how to use them. You won't get away from that. :p
 

LearningCode

New Member
Reaction score
24
I have NewGen =)
I got it after Glenphir or someone pressured me to, I think xD

I didn't see any purple ._.
Only black..

Anyways, my PC screen is purple.
The cable is spoiled, so I see Blue and Red only, No green.
 

LearningCode

New Member
Reaction score
24
What's syntax highlighting ? xD

I see red..
Blue..
Semi green? Not sure, PC does not have green.

black..

No purple.
 
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