| 12-20-2006, 03:19 AM | #1 |
Ok this is um wierd. Im tryin to get the ownership of a unit to change to brown when the owner of the unit types -quit. it dosent seem to work when i add the condition to it. Heres what i have Player 1 (red) types a chat message containing -quit as an exact match Matching player) equal to (owner of circle of power 0044 ) Unit- Change ownership of Circle Of Power 0044 To Player 12 (brown) and change color (red is the owner of the circle of power btw |
| 12-20-2006, 03:23 AM | #2 |
well just out of curousity why do you got Player 1 as the event then Matching player as the condition? If you got just player one on that event then only player one can type -quit maybe thats your problem not sure lol. |
| 12-20-2006, 03:24 AM | #3 |
well no lol i didnt wanna type all the other players on this threat my bad but in my Editer it has all the players in it |
| 12-20-2006, 03:53 AM | #4 |
Change (Matching Player) to (Triggering Player), then it should work. |
| 12-20-2006, 10:09 AM | #5 |
What I'm wondering is why (Matching Player) did not work, since when converted to JASS it looks fine. GetFilterPlayer() is in the proper position in the condition, and is created since the condition is a <boolexpr>. The JASS would look like this: JASS:function Trig_Name_Conditions takes nothing returns boolean local player filter = GetFilterPlayer() local boolean ret = false if (filter == GetOwningPlayer(<unit>)) then set ret = true endif set filter = null return ret endfunction Consider this code: JASS:... call ForceEnumPlayers( <force>, Condition(<code>) ) ... JASS:... call TriggerAddCondition( <trigger>, Condition(<code>) ) ... |
| 12-20-2006, 10:49 AM | #6 |
GetEnum*/GetFilter* are callbacks for enum loops, GetTrigger etc are callbacks for triggers. Two different contexts. |
| 12-20-2006, 10:59 AM | #7 |
Ah yes, I actually figured that out when I was like 7/8 done the post so I decided not to waste my hard efforts as somebody else could learn from them. But yea you are right. |
