| 12-10-2004, 08:45 PM | #1 |
i thought of this when i was trying to learn jass this is what you could do, make a double of a trigger (copy and paste) then click your trigger, then click edit. then convert it to custom text. that will turn your trigger to jass. then you know what you did in jass. ex. Code:
Events: Time Elapsed 5 seconds Conditions: Actions: Display to all players hi Create 1 footman in center of playable map facing default degrees Code:
function Trig_JASS_Copy_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_002" )
call CreateNUnitsAtLoc( 1, 'hfoo', Player(0), GetRectCenter(GetPlayableMapRect()), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_JASS_Copy takes nothing returns nothing
set gg_trg_JASS_Copy = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_JASS_Copy, 5 )
call TriggerAddAction( gg_trg_JASS_Copy, function Trig_JASS_Copy_Actions )
endfunction |
| 12-16-2004, 08:24 PM | #2 |
woah... that sorrta helps although it doesn't go advanced it's a begining thing! |
| 12-16-2004, 08:45 PM | #3 |
Guest | Yes this works, but it doesn't teach you how to use local variables, which is one of, if not the most important thing, about using JASS. It also (not sure in this case) doesn't usually give you the most efficient way to do the trigger. |
| 12-16-2004, 08:48 PM | #4 |
It works, however it makes JASS seem more complicated than it really is. The reason for using JASS imo is to either A) Use triggers in ROC that the GUI does not have B) Create your own functions to use in triggers. Yes, it also allows you to optimize functions and clean leaks. |
| 12-16-2004, 10:09 PM | #5 |
Guest | And for creating and destroying triggers on the fly. I find that very useful. The easiest way to do this is usually with local variables anyway. And with an unmodified world editor, the functions arent even there in GUI. |
| 12-28-2004, 05:24 AM | #6 |
Guest | can anyone give me a link on something that can translate JASS cause i have omnislash from DotA and i cant translate it. too cmplicated. |
| 12-28-2004, 02:13 PM | #7 |
Guest | You mean translate Jass into world editor triggers? No, there is no such thing. |
| 12-28-2004, 09:36 PM | #8 |
Guest | well can someone do it for me? the omnislash trigger is soooooooooooooo confusing. keeps saying stuff like "if ( not ( GetSpellAbilityId() == 'A066' ) ) then" now there is no such if/ trigger so its toooooooooo confusing. |
| 12-28-2004, 10:32 PM | #9 |
yea there is select your trigger and go to view and then go to convert to custom text |
| 12-29-2004, 12:40 AM | #10 |
i tried that a long time ago, but overall JASS is soo confusing, you just have to know all of the names of actions, and stuff |
| 12-29-2004, 12:57 AM | #11 | |
Guest | Quote:
you idiot. i meant JASS text to make it into triggers. like if i have a script, i wanna make it into event/conditions/triggers. |
| 12-29-2004, 08:14 PM | #12 |
No insults please. And in the cases where people use JASS a translation to GUI triggers is often not even possible. |
| 12-29-2004, 10:48 PM | #13 |
Guest | well what if the JASS script was made out of GUI triggers? can it be convorted back by a person that knows the triggerS? |
| 01-06-2005, 02:44 PM | #14 |
The if statement you said: Code:
"if ( not ( GetSpellAbilityId() == 'A066' ) ) then" Is so simple, in as english as I can make it sound: GetSpellAbilityId() == 'A066' checks to see if they are true or false, the "not" gate switchs this value. If will do the then action ONLY if the thing in paranthesees returns true, therfore if the spell id is A066 it will not run, otherwise it will. In c++ you could write this as: if(!GetAbilityID()='A066') C#: if(GetAbilityID()!='A066') etc. |
| 01-06-2005, 06:29 PM | #15 | |
Guest | Quote:
What is/means omnislash?? Why are you looking at something from DotA? Try tell what the trigger does in-game...(or post the JASS here......) We will probably could find out what it does and then create it in GUI-trigggers(If possible)..... Jorak. P.S: how does "reputation" work?? (Plz give me some, it sucks with a grey bar...:D) |
