HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Player sends a message containing... trigger

11-17-2006, 08:56 PM#1
Coonskin_13
I'm making a map with many triggers started by text, that work for all players... Is there a way I can make it so any player can use them with one trigger, so I don't have to make 12 identical triggers, one for each player.
11-17-2006, 08:59 PM#2
blu_da_noob
Add the 12 different events to the same trigger.
11-17-2006, 09:20 PM#3
Av3n
What blu said

-Av3n
11-18-2006, 01:31 AM#4
Coonskin_13
I think I need to elaborate. I several triggers where if a player sends a certain message, a certain event happens. I want the event to work for all players. The problem is, The player sends message trigger is a newb, and there is no "all players" or no variables you can put into it, you have to use player 1 sends a message, player 2 sends a message... etc, along with a handful of functions. I want to know if theres any way I will be able to make the certain event to work for all the players in one trigger.
11-18-2006, 01:35 AM#5
Jazradel
Use multiple events. So long as the events have the same variables(e.g. Beings Casting and Unit Dies will both have Triggering Unit, Chat Message and Player Leaves will both have triggering player)
11-18-2006, 02:15 AM#6
Zandose
You can do it in JASS. I don't know if this will cause any problems. Like the trigger becoming a local trigger.

I also think the WEU (World Editor Unlimited) has GUI triggers to do this.

GetLocalPlayer()

Collapse JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_003" )
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_Untitled_Trigger_001, GetLocalPlayer(), "test", true )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
11-21-2006, 08:02 AM#7
Fr0zenLord
Post your trigger please

But try this
Trigger:
For each Integer A from 1 to 12 do MULTIPLE functions
Collapse loop
- Add 500 gold to Player[integer A] current gold

Use Convert Player to Integer or w/e it says its something like that

Add 500 gold, is where you actions are, just put what u want to happen
11-21-2006, 09:13 AM#8
Wyvernoid
Multiple events, then
Trigger:
Game - Victory (Triggering Player)
OrGetTriggerPlayer() Will both work perfectly.