HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger not working in multi play

02-13-2007, 12:10 AM#1
Nazra7
Hello, I have this tirgger that when you type -enter after talking to the arena person you will go into the arena. This trigger works perfectly in single player but not at all in multi. maybe you guys can identify what I did wrong? it won't work because it doesn't teleport you into the arena like its supposed to

Trigger:
Collapse Events
Player - Player 1 (Red) types a chat message containing -enter as An exact match
Player - Player 2 (Blue) types a chat message containing -enter as An exact match
Player - Player 3 (Teal) types a chat message containing -enter as An exact match
Player - Player 4 (Purple) types a chat message containing -enter as An exact match
Player - Player 5 (Yellow) types a chat message containing -enter as An exact match
Player - Player 6 (Orange) types a chat message containing -enter as An exact match
Player - Player 7 (Green) types a chat message containing -enter as An exact match
Player - Player 8 (Pink) types a chat message containing -enter as An exact match
Collapse Conditions
inarena1 Equal to False
Collapse Actions
Collapse Unit Group - Pick every unit in (Units in Rect 087 <gen> owned by (Triggering player)) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Rect 087 <gen> contains (Picked unit)) Equal to True
Collapse Then - Actions
Unit - Move (Picked unit) instantly to (Center of Rect 089 <gen>)
Trigger - Turn on Untitled Trigger 031 Copy <gen>
Trigger - Turn on Untitled Trigger 031 Copy Copy <gen>
Collapse Unit Group - Pick every unit in (Random 1 units from (Units in Rect 091 <gen> owned by Player 11 (Dark Green))) and do (Actions)
Collapse Loop - Actions
Unit - Move (Picked unit) instantly to (Center of Rect 090 <gen>)
Unit - Make (Picked unit) Vulnerable
Unit - Set (Picked unit) acquisition range to ((Current acquisition range of (Picked unit)) + 1500.00)
Player - Make Player 11 (Dark Green) treat (Triggering player) as an Enemy
Player - Make (Triggering player) treat Player 11 (Dark Green) as an Enemy
Player - For Player 11 (Dark Green), turn Alliance (non-aggression) Off toward (Triggering player)
Player - For (Triggering player), turn Alliance (non-aggression) Off toward Player 12 (Brown)
Game - Display to (Player group((Owner of (Triggering unit)))) the text: Fight!
Else - Actions
Set inarena1 = True

inarena variable defines if somone is in the arena already or not. it prevents 2 poeple going into the arena at the same time for 1 team, as this is a PVM arena where you fight monsters that are exactly like other players.

The tirggers that turn on are just trigggers to tell the map what to do if the monster or player died.

thanks in advance.
02-13-2007, 01:57 AM#2
Pyrogasm
This is what it should look like. I cleaned up all the memory leaks.
Trigger:
Collapse Events
Player - Player 1 (Red) types a chat message containing -enter as An exact match
Player - Player 2 (Blue) types a chat message containing -enter as An exact match
Player - Player 3 (Teal) types a chat message containing -enter as An exact match
Player - Player 4 (Purple) types a chat message containing -enter as An exact match
Player - Player 5 (Yellow) types a chat message containing -enter as An exact match
Player - Player 6 (Orange) types a chat message containing -enter as An exact match
Player - Player 7 (Green) types a chat message containing -enter as An exact match
Player - Player 8 (Pink) types a chat message containing -enter as An exact match
Collapse Conditions
inarena1 Equal to False
Collapse Actions
Set TempGroup = Units in Rect 087 <gen> owned by (Triggering player)
Collapse Unit Group - Pick every unit in TempGroup and do (Actions)
Collapse Loop - Actions
Collapse Then - Actions
Set TempPoint = Center of (Rect 089 <gen>)
Unit - Move (Picked unit) instantly to TempPoint
Custom script: call RemoveLocation( udg_TempPoint )
Trigger - Turn on Untitled Trigger 031 Copy <gen>
Trigger - Turn on Untitled Trigger 031 Copy Copy <gen>
set TempGroup2 = Units in Rect 091 <gen> owned by Player 11 (Dark Green)
set TempUnit = Random unit from TempGroup2
Custom script: call DestroyGroup( udg_TempGroup2 )
Set TempPoint = Center of (Rect 090 <gen>)
Unit - Move TempUnit instantly to TempPoint
Custom script: call RemoveLocation( udg_TempPoint )
Unit - Make TempUnit Vulnerable
Unit - Set TempUnit acquisition range to ((Current acquisition range of TempUnit) + 1500.00)
Player - Make Player 11 (Dark Green) treat (Triggering player) as an Enemy
Player - Make (Triggering player) treat Player 11 (Dark Green) as an Enemy
Player - For Player 11 (Dark Green), turn Alliance (non-aggression) Off toward (Triggering player)
Player - For (Triggering player), turn Alliance (non-aggression) Off toward Player 12 (Brown)
Game - Display to (Player group((Owner of (Triggering unit)))) the text: Fight!
Custom script: call DestroyGroup( udg_TempGroup )
Set inarena1 = True
I think that extra If/Then/Else conditional was screwing it up.
02-13-2007, 03:09 AM#3
Nazra7
o.O Complicated stuff =/ Oh well, it should work I guess. thanks pryo + rep for helping me so much =D