So, I had my triggers and functions all up and running, and they worked perfectly in testing. They gave me some warnings, which I think are caused by an invalid use of "Triggering Player," as that's the only common thread. For some reason, I don't think it wants me using "Triggering Player" for an event that also uses "Triggering Player" as an event criteria... But I don't know any other workaround, and it WAS working fine.
So, I closed my editor (after saving mind you), and opened it again to be greeted with this slew of warnings:
Warning: Orphaned trigger function call removed: Function Call 'Word Of String' (Function Call, 9029C7A2, Lib: 0)
Warning: Orphaned trigger function call removed: Function Call 'While' (Function Call, 1C307243, Lib: 0)
Warning: Orphaned trigger function call removed: Function Call 'Convert String To Text' (Function Call, DE36CFE5, Lib: 0)
Warning: Orphaned trigger function call removed: Function Call 'Clear Text Messages' (Function Call, 6EB24965, Lib: 0)
Warning: Orphaned trigger function call removed: Function Call 'All Players' (Function Call, 5FECC527, Lib: 0)
Warning: Orphaned trigger function call removed: Function Call 'Convert String To Text' (Function Call, 597D38CC, Lib: 0)
Warning: Orphaned trigger function call removed: Function Call 'Combine Text Multiple' (Function Call, 24D0ED0E, Lib: 0)
Warning: Orphaned trigger function call removed: Function Call 'Convert Player To Player Group' (Function Call, CF18EF92, Lib: 0)
Warning: Orphaned trigger function call removed: Function Call 'Text Message' (Function Call, ACE5EBD2, Lib: 0)
Warning: Orphaned trigger function call removed: Function Call 'Triggering Player' (Function Call, 93B73456, Lib: 0)
Warning: Orphaned trigger function call removed: Function Call 'Text Message' (Function Call, D2997BF7, Lib: 0)
Warning: Orphaned trigger function call removed: Function Call 'Triggering Player' (Function Call, 3E600237, Lib: 0)
Warning: Orphaned trigger function call removed: Function Call 'Set Variable' (Function Call, 186493C1, Lib: 1)
Warning: Orphaned trigger function call removed: Function Call 'Owner Of Unit' (Function Call, 97B957C6, Lib: 1)
Warning: Orphaned trigger function call removed: Function Call 'Owner Of Unit' (Function Call, 4898044B, Lib: 1)
Warning: Orphaned trigger function call removed: Function Call 'If Then Else' (Function Call, F1181590, Lib: 1)
Warning: Orphaned trigger function call removed: Function Call 'Owner Of Unit' (Function Call, 26C06159, Lib: 1)
Warning: Orphaned trigger function call removed: Function Call 'Owner Of Unit' (Function Call, C4408C1B, Lib: 1)
Warning: Orphaned trigger function call removed: Function Call 'Triggering Unit' (Function Call, 9D8076DF, Lib: 1)
Warning: Orphaned trigger function call removed: Function Call 'Owner Of Unit' (Function Call, B6342AAD, Lib: 1)
Warning: Invalid trigger element reference removed from Function 'Print Letter Inventory' (Function Call, 6EB24965, Lib: 0)
Warning: Invalid trigger element reference removed from Function 'Print Letter Inventory' (Function Call, 1C307243, Lib: 0)
Warning: Orphaned trigger sub-function call removed: Function Call 'Modify Variable (Integer)' (Function Call, A65A3107, Lib: 1)
Warning: Orphaned trigger sub-function call removed: Function Call 'Modify Variable (Integer)' (Function Call, CAFAC082, Lib: 1)
Warning: Invalid trigger element reference removed from Parameter Value 'Unknown' (Function Call, 4898044B, Lib: 1)
Warning: Invalid trigger element reference removed from Parameter Value 'Unknown' (Function Call, C4408C1B, Lib: 1)
Warning: Invalid trigger element reference removed from Parameter Value 'Unknown' (Function Call, 93B73456, Lib: 0)
Warning: Invalid trigger element reference removed from Parameter Value 'Unknown' (Function Call, 26C06159, Lib: 1)
Warning: Invalid trigger element reference removed from Parameter Value 'Unknown' (Function Call, 97B957C6, Lib: 1)
Warning: Invalid trigger element reference removed from Parameter Value 'Unknown' (Function Call, 3E600237, Lib: 0)
Warning: Invalid trigger element reference removed from Parameter Value 'Unknown' (Function Call, B6342AAD, Lib: 1)
I think the problem is that all of these elements referenced "Triggering Player" or some descendant thereof passed through the functions. The editor also removed "Triggering Player" as my call element in the triggers I called those functions and left that parameter blank. So now, I'm left with all that, very complicated print-out code deleted, and no reason to show for it.
I understand why the editor behaved to foolishly, but it was incredibly overzealous and I still don't know what I can use instead of this warning-inducing "Triggering Player" variable.
My code was removed by the editor automatically when I closed the editor and reopened it, then loaded my save file.
Thanks for the advice on using Any Player, I'll do that. Funny thing is that it did work and didn't generate any errors in compiling or running (just the warning diamonds) but surprised me with this upon reopening it.
I'd gotten it once before too, and nothing was changed. This time, one of my largest functions that handled all my UI display printouts had everything but 1 line of its code removed (needless to say my UI no longer appears in test plays now). I was really shocked that the editor would do this on its own without at least warning me before, and I can't see any way to get the info back
@Grogian:
Grogian, I don't see the "Any Player" option anywhere. The event I'm using is: "Player Property Changed" and it takes a player (integer), not a player group. How should I set this to work for "Any Player?"
I'm in class now, I'll check my editor later. My guess though: You can also have multiple events, the trigger can have property changed for players 1-x (x copies). And then triggering player should work in the body.
I think I figured out how to use Any Player. I looked up the preset and entered its value (c_playerAny) as a custom script, even though it was not offered as one of the presets for my Player Event
Here's my code for one of the triggers that shows a warning
Vowel Collect
Events
Player - Player c_playerAny Minerals Collected changes
Local Variables
i = 0 <Integer>
Char = 0 <Integer>
Conditions
Actions
Variable - Set Char = (Get Vowel((Random integer between 0 and 4)))
Variable - Modify Alphabet Stock[Char][(Triggering player)]: + 1 <-----Warning on THIS element
Print Letter Inventory((Triggering player)) <----Function that had all of its contents deleted
Action - Display Character Collected((Closest unit to (Start location of player (Triggering player)) in (Probe units in (Entire map) owned by player (Triggering player) matching No Unit Filter, with at most Any Amount)), Char)
@Sprigint: Go
Triggering player cannot be used in an event. Use "Any Player" instead.
But, did you delete the code or did the editor?
What caused that removal of your triggers ? Did you uplaod it , save it, close editor, etc...? And yeah events can not have triggering player.
@Sprigint:
i get that every time i load my map, and every time nothing at all has been changed, you sure anything was actually changed?
@Sprigint: Go
I'm in class now, I'll check my editor later. My guess though: You can also have multiple events, the trigger can have property changed for players 1-x (x copies). And then triggering player should work in the body.
@Grogian
I think I figured out how to use Any Player. I looked up the preset and entered its value (c_playerAny) as a custom script, even though it was not offered as one of the presets for my Player Event
Here's my code for one of the triggers that shows a warning
Vowel Collect
Events
Player - Player c_playerAny Minerals Collected changes
Local Variables
i = 0 <Integer>
Char = 0 <Integer>
Conditions
Actions
Variable - Set Char = (Get Vowel((Random integer between 0 and 4)))
Variable - Modify Alphabet Stock[Char][(Triggering player)]: + 1 <-----Warning on THIS element
Print Letter Inventory((Triggering player)) <----Function that had all of its contents deleted
Action - Display Character Collected((Closest unit to (Start location of player (Triggering player)) in (Probe units in (Entire map) owned by player (Triggering player) matching No Unit Filter, with at most Any Amount)), Char)
@Sprigint: Go
"Warning on THIS element"
Whats the warning?