| 02-14-2004, 01:10 PM | #1 |
ok, i put a trigger and convert to custom text: before: Events Unit - A unit Dies Conditions Actions Game - Display to (All players) the text: a unit died after: function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_001" ) endfunction //=========================================================================== function InitTrig_Untitled_Trigger_001 takes nothing returns nothing set gg_trg_Untitled_Trigger_001 = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Untitled_Trigger_001, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions ) endfunction ok now i want some1 to explain to me what exactly everything means in this trigger and where is the event and action. PLZ REPLY emote_confused |
| 02-14-2004, 01:14 PM | #2 |
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_001" ) endfunction There are your actions. ---
function InitTrig_Untitled_Trigger_001 takes nothing returns nothingset gg_trg_Untitled_Trigger_001 = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Untitled_Trigger_001, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions ) endfunction That sets up the trigger. the set gg_trg.... line sets up the trigger so actions, conditions, and events can be added to it. call TriggerRegisterAnyUnitEventBJ( gg_trg_Untitled_Trigger_001, EVENT_PLAYER_UNIT_DEATH ) <--- Adds the event. call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions ) <--- Adds the action. This links that function up there with the actual trigger. |
| 02-14-2004, 01:20 PM | #3 |
:cuss: TOO COMLICATED i think i wil giv up jass i think i should well wat is so differet wid the two neway |
| 02-15-2004, 12:11 PM | #4 |
i need a good tutorial SIMPLE enough for me (some1 who has never done prgramming but is very good with GUI trigers) oh and also there is 1 question i wanna ask. lets say for this trigger: event: well there is no event i just made the trigger run wid another trigger. condition: unit is selected action: remove (UNIT) from the game ok how do i refer to the selected unit? emote_confused |
| 02-26-2004, 01:40 AM | #5 |
Where the ****ing hell does it tell you where "a unit died" is in that jass script!? It doesn't! That makes absoloutely NO SENSE AT ALL. It means you cant make jass up with a notepad, you can only edit it. Wtf? |
| 02-26-2004, 01:58 AM | #6 |
Well most jass programmers ussually use Worldedit to get events as they are generally the hardest to remember but this is your event: call TriggerRegisterAnyUnitEventBJ( gg_trg_Untitled_Trigger_001, EVENT_PLAYER_UNIT_DEATH ) A unit died. Now why does it say player? Because a AnyUnitEvent is actually a little hack utility function that blizzard made which takes your playerunitevent (in our case a unit died) and applies it to all 16 players. |
| 02-28-2004, 08:44 AM | #7 |
Learn a program language (preferable not VB) and this is childsplay. ;) |
| 02-28-2004, 01:46 PM | #8 |
Exactly why should it be easier to first learn VB and then Jass? Besides, Jass is a programming language, even if it is of the nasty kind. |
| 03-07-2004, 02:17 AM | #9 |
I dont see where it says to display "A unit died." any where in the JASS script :\ so confusing |
| 03-07-2004, 02:33 AM | #10 |
Worldedit uses a string file. You don't have to: call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_001" ) If you were to open your string file (The WTS) you'll see that 1 actually is "A unit died" You can manually change that to: call DisplayTextToForce( GetPlayersAll(), "A unit died" ) Which is how most of us do it anyway. |
| 03-08-2004, 01:46 AM | #11 |
I know visual basic, is that good enuf? |
| 03-08-2004, 04:20 PM | #12 |
I know it pretty good, I just got done taking a course on it. |
| 03-08-2004, 11:01 PM | #13 |
I understand everything you said except for reals and floats but my teacher said thats what were doing next :D |
| 03-09-2004, 10:51 AM | #14 |
for all u complete noobs to JASS (like me) just keep creating different triggers & converting them into JASS using the world editor, then compare to bits of code on the FAQ on this site & the sourceforege site & u'll pick up similarities & start understanding |
