• 🏆 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!

[JASS] Gate open "More info in Thread"

Status
Not open for further replies.
Level 4
Joined
Feb 10, 2009
Messages
89
I want a Gate open trigger done in JASS so.

[-] Unit walks in Reigon named "Open01"
[-] Open gate/door

Thats all in JASS. I did try but it failed
about 9 times so i was sick of trying.
Please help ill give credit's.
 
Level 5
Joined
Dec 18, 2007
Messages
205
This should make it:

JASS:
function Trig_Gate_Actions takes nothing returns nothing
    call ModifyGateBJ( bj_GATEOPERATION_OPEN,gg_dest_DTg7_0793) // i used the BJ, remember this. it's faster by replacing it, but i think it's ok to use it here.
    // Remember to change the destructable to your gate
endfunction

//===========================================================================
function InitTrig_Gate takes nothing returns nothing
    local trigger gate = CreateTrigger()
    call TriggerRegisterEnterRectSimple(gate, gg_rct_Bauernhof ) // change the rect name!
    call TriggerAddAction(gate, function Trig_Gate_Actions)
    set gate=null
endfunction

This is the easiest way of triggering a gate. If you want to close it again with conditions etc. please tell me and i can try to help you. i hope it's correct, didn't test it.

greatings
 
Status
Not open for further replies.
Top