1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Trigger] turn <trigger of choice> on

Discussion in 'Triggers & Scripts' started by Rapeart, Jan 6, 2007.

  1. Rapeart

    Rapeart

    Joined:
    Jan 15, 2005
    Messages:
    6
    Resources:
    0
    Resources:
    0
    Hi all,

    I'm having trouble putting a particular trigger on, i can only choose 'this trigger', and i don't think it will work with variables because the trigger must be off before its used so an action in that trigger like set 'trigger1' is this trigger won't work?
    So how can i put a trigger on? :)
     
  2. Orc_Tamer

    Orc_Tamer

    Joined:
    Jan 5, 2007
    Messages:
    41
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    Can you explain a little more.. I'm having problems understanding you. Can you post the trigger your trying to make?

    -Orc_Tamer
     
  3. Rapeart

    Rapeart

    Joined:
    Jan 15, 2005
    Messages:
    6
    Resources:
    0
    Resources:
    0
    yes sure i explained it a bit weird :)

    This is the trigger that should active the others 2, in the last lines

    • function Trig_player1enter_Conditions takes nothing returns boolean
      • if ( not ( GetOwningPlayer(GetEnteringUnit()) == Player(0) ) ) then
        • return false
      • endif
      • return true
    • endfunction
    • function Trig_player1enter_Actions takes nothing returns nothing
      • call SetUnitPositionLoc( GetEnteringUnit(), GetRectCenter(gg_rct_Rect_005) )
    • endfunction
    • //===========================================================================
    • function InitTrig_player1enter takes nothing returns nothing
      • set gg_trg_player1enter = CreateTrigger( )
      • call DisableTrigger( gg_trg_player1enter )
      • call TriggerRegisterEnterRectSimple( gg_trg_player1enter, gg_rct_Rect_004 )
      • call TriggerAddCondition( gg_trg_player1enter, Condition( function Trig_player1enter_Conditions ) )
      • call TriggerAddAction( gg_trg_player1enter, function Trig_player1enter_Actions )
    • endfunction





    i just named 2 variables the same as the quests in the hope it would work but it didn't, this is one of the 2:

    function Trig_player1enter_Conditions takes nothing returns boolean
    if ( not ( GetOwningPlayer(GetEnteringUnit()) == Player(0) ) ) then
    return false
    endif
    return true
    endfunction

    function Trig_player1enter_Actions takes nothing returns nothing
    call SetUnitPositionLoc( GetEnteringUnit(), GetRectCenter(gg_rct_Rect_005) )
    endfunction

    //===========================================================================
    function InitTrig_player1enter takes nothing returns nothing
    set gg_trg_player1enter = CreateTrigger( )
    call DisableTrigger( gg_trg_player1enter )
    call TriggerRegisterEnterRectSimple( gg_trg_player1enter, gg_rct_Rect_004 )
    call TriggerAddCondition( gg_trg_player1enter, Condition( function Trig_player1enter_Conditions ) )
    call TriggerAddAction( gg_trg_player1enter, function Trig_player1enter_Actions )
    endfunction

    sorry if i should have posted those triggers on a different way, don't know how
     
    Last edited: Jan 6, 2007
  4. Mechanical Man

    Mechanical Man

    Joined:
    Jan 18, 2005
    Messages:
    5,385
    Resources:
    39
    Models:
    30
    Icons:
    3
    Packs:
    1
    Maps:
    4
    Tutorials:
    1
    Resources:
    39
    If you want help in JASS go to appropriate section. If not, post triggers either with screenshot or like this way:

    Events:
    Generic Unit Event - Unit enters (Rect004)

    Conditions:
    Player - Owner of (Entering Unit) equal to (Player 1)

    Actions:
    Unit - Move Unit(Instantly) to (Rect005)

    This should be your first trigger.

    Regarding your question there should be the list of all your triggers in variables scroll
     
  5. Mini-Me

    Mini-Me

    Joined:
    Oct 30, 2004
    Messages:
    1,800
    Resources:
    10
    Maps:
    10
    Resources:
    10
    Im guessing here you dont know anything about jass you just converted the triggers to text just to show us? Well you can copy the GUI triggers as text without converting them to text (jass). Just right click the name of the trigger over your events and choose "copy as text".

    And as for the turning on/off a trigger. I dont see why that would cause any problems, you can turn on/off a trigger with the action found under the category 'triggers' - turn on/off 'trigger'. You can turn on/off any trigger in your map, its not limited to just turning of (this trigger).
     
  6. Rapeart

    Rapeart

    Joined:
    Jan 15, 2005
    Messages:
    6
    Resources:
    0
    Resources:
    0
    ah thanks, now i see the list, stupid of me :( and yes i jsut copied the entire trigger and pasted here in the message, which converted it to JASS.