• 🏆 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] How to combine these two, please :O)

Status
Not open for further replies.
Level 1
Joined
May 15, 2007
Messages
88
(Please check the below post before this one, incase that one is easier to do ;) )
I want:


JASS:
function Trig_ContactBunny_Actions takes nothing returns nothing
    call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Owww" + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + " Came in touch with a Mini Über Bunny(tm) Poor guy ;)" ) ) )
endfunction

//===========================================================================
function InitTrig_ContactBunny takes nothing returns nothing
    set gg_trg_ContactBunny = CreateTrigger(  )
    call TriggerAddAction( gg_trg_ContactBunny, function Trig_ContactBunny_Actions )
endfunction



To be combined with:

JASS:
//This JASS code was written using LordOglog's JASS Death Region Creator BETA
//Please credit me in some way although I can't exactly check every map and sue you it's just nice to give credit.

//To make this work properly make a trigger named ContactBunny and then click Edit - Convert to Custom Text and then Copy and Paste this code into the trigger.
//Thanks for using my software and be sure to check [url]www.lordoglogmaps.piczo.com[/url] for updates!

//===========================================================================

function Trig_ContactBunny_Conditions takes nothing returns boolean
local unit u = GetTriggerUnit()
local player p = GetOwningPlayer(u)
local boolean b1 = true
set b1 = b1 and p != Player(10)
set b1 = b1 and p != Player(11)
set b1 = b1 and p != Player(PLAYER_NEUTRAL_AGGRESSIVE)
set b1 = b1 and p != Player(bj_PLAYER_NEUTRAL_VICTIM)
set b1 = b1 and p != Player(bj_PLAYER_NEUTRAL_EXTRA)
set b1 = b1 and p != Player(PLAYER_NEUTRAL_PASSIVE)
set u = null
set p = null
return b1
endfunction

function Trig_ContactBunny_Actions takes nothing returns nothing
local unit t = GetTriggerUnit()
local effect f
call PauseUnit( t, true )
call KillUnit( t )
set f = null
set t = null
endfunction

//===========================================================================
function Events_ContactBunny takes nothing returns nothing
local region r = CreateRegion()
call RegionAddRect(r, gg_rct_Region_830)
call RegionAddRect(r, gg_rct_Region_831)
call RegionAddRect(r, gg_rct_Region_832)
call RegionAddRect(r, gg_rct_Region_833)
call RegionAddRect(r, gg_rct_Region_834)
call RegionAddRect(r, gg_rct_Region_835)
call RegionAddRect(r, gg_rct_Region_836)
call RegionAddRect(r, gg_rct_Region_837)
call RegionAddRect(r, gg_rct_Region_838)
call RegionAddRect(r, gg_rct_Region_839)
call RegionAddRect(r, gg_rct_Region_840)
call RegionAddRect(r, gg_rct_Region_841)
call TriggerRegisterEnterRegion(gg_trg_ContactBunny, r, null)
set r = null
endfunction

function InitTrig_ContactBunny takes nothing returns nothing
set gg_trg_ContactBunny = CreateTrigger(  )

call TriggerAddCondition( gg_trg_ContactBunny, Condition( function Trig_ContactBunny_Conditions ) )
call TriggerAddAction( gg_trg_ContactBunny, function Trig_ContactBunny_Actions )

call ExecuteFunc("Events_ContactBunny")

endfunction






I know the one *May* be GUI, but I would be VERY happy if anyone could translate it :thumbs_up:
 
Last edited by a moderator:
Level 1
Joined
May 15, 2007
Messages
88
*OR* Simply just a small command line at the end, who tells a script called BunnyTextString to run(Then leave out the GUI thingy)
(CASE!)


So that means that at the end of this, I need a script which tells the trigger: "BunnyTextString" to run

JASS:
//This JASS code was written using LordOglog's JASS Death Region Creator BETA
//Please credit me in some way although I can't exactly check every map and sue you it's just nice to give credit.

//To make this work properly make a trigger named ContactBunny and then click Edit - Convert to Custom Text and then Copy and Paste this code into the trigger.
//Thanks for using my software and be sure to check [url]www.lordoglogmaps.piczo.com[/url] for updates!

//===========================================================================

function Trig_ContactBunny_Conditions takes nothing returns boolean
local unit u = GetTriggerUnit()
local player p = GetOwningPlayer(u)
local boolean b1 = true
set b1 = b1 and p != Player(10)
set b1 = b1 and p != Player(11)
set b1 = b1 and p != Player(PLAYER_NEUTRAL_AGGRESSIVE)
set b1 = b1 and p != Player(bj_PLAYER_NEUTRAL_VICTIM)
set b1 = b1 and p != Player(bj_PLAYER_NEUTRAL_EXTRA)
set b1 = b1 and p != Player(PLAYER_NEUTRAL_PASSIVE)
set u = null
set p = null
return b1
endfunction

function Trig_ContactBunny_Actions takes nothing returns nothing
local unit t = GetTriggerUnit()
local effect f
call PauseUnit( t, true )
call KillUnit( t )
set f = null
set t = null
endfunction

//===========================================================================
function Events_ContactBunny takes nothing returns nothing
local region r = CreateRegion()
call RegionAddRect(r, gg_rct_Region_830)
call RegionAddRect(r, gg_rct_Region_831)
call RegionAddRect(r, gg_rct_Region_832)
call RegionAddRect(r, gg_rct_Region_833)
call RegionAddRect(r, gg_rct_Region_834)
call RegionAddRect(r, gg_rct_Region_835)
call RegionAddRect(r, gg_rct_Region_836)
call RegionAddRect(r, gg_rct_Region_837)
call RegionAddRect(r, gg_rct_Region_838)
call RegionAddRect(r, gg_rct_Region_839)
call RegionAddRect(r, gg_rct_Region_840)
call RegionAddRect(r, gg_rct_Region_841)
call TriggerRegisterEnterRegion(gg_trg_ContactBunny, r, null)
set r = null
endfunction

function InitTrig_ContactBunny takes nothing returns nothing
set gg_trg_ContactBunny = CreateTrigger(  )

call TriggerAddCondition( gg_trg_ContactBunny, Condition( function Trig_ContactBunny_Conditions ) )
call TriggerAddAction( gg_trg_ContactBunny, function Trig_ContactBunny_Actions )

call ExecuteFunc("Events_ContactBunny")

endfunction
 
Last edited by a moderator:
Status
Not open for further replies.
Top