• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] turn <trigger of choice> on

Status
Not open for further replies.
Level 2
Joined
Jan 15, 2005
Messages
6
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? :)
 
Level 2
Joined
Jan 15, 2005
Messages
6
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:
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
 
Level 16
Joined
Oct 30, 2004
Messages
1,277
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).
 
Level 2
Joined
Jan 15, 2005
Messages
6
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.
 
Status
Not open for further replies.
Top