PlayMaker Feedback > Action Requests
Clearing a generic list. [SOLVED]
MAX_POWER:
I'm using the TriggerEventOncePerObject.cs script and it's using a generic list. (List<GameObject> alreadyHit = new List<GameObject>();)
Is there a way to clear this list with another action in another state? I know it should be as easy as alreadyHit.Clear(); but I don't know how to create an action like that. Or is there a way to already do it somehow? Thanks.
djaydino:
Hi.
I have added a "Reset" bool where you can place a variable and you can set that bool to true on a different state.
Then when TriggerEventOncePerObject is called again it will check if that bool is true and reset the list + set it back to false.
Can you try if it works as you want?
MAX_POWER:
--- Quote from: djaydino on February 11, 2018, 07:38:18 AM ---Hi.
I have added a "Reset" bool where you can place a variable and you can set that bool to true on a different state.
Then when TriggerEventOncePerObject is called again it will check if that bool is true and reset the list + set it back to false.
Can you try if it works as you want?
--- End quote ---
Sounds absolutely fantastic. Yes I'm willing try to it out. Just let me know where to download the script. Thanks!
djaydino:
Hi.
Just get it again from the Ecosystem :)
MAX_POWER:
Works like a charm now. It's just fantastic to see somebody doing an update so fast. Thank you so much!
Navigation
[0] Message Index
[#] Next page
Go to full version