Hey, so with an easter egg I'm trying to script, I'm trying to get it the script to wait until all doors/areas on the map are open until it begins. I'm pretty sure it's supposed to be set as a flag_wait(); but I'm not exactly sure what to put for what it should be waiting for. For example, I tried doing: Which is obviously quite wrong, but it should give you an idea as to what I mean by this. Anybody know how I could fix this? Thanks!
There isn't a notify for when all the doors have been activated, but you can count each time a door is opened and once the count is greater than or equal to the amount of doors in the world then all doors have been opened.
You can do the same thing for determining if all zones are active, but instead checking if there is a zone that is not active like this
PS: I haven't done much with zones nor have i tested this so it may not be the exact way to reference the zones but the concept is correct
Last Edit: February 05, 2018, 12:45:32 pm by buttkicker845
There isn't a notify for when all the doors have been activated, but you can count each time a door is opened and once the count is greater than or equal to the amount of doors in the world then all doors have been opened.
You can do the same thing for determining if all zones are active, but instead checking if there is a zone that is not active like this
PS: I haven't done much with zones nor have i tested this so it may not be the exact way to reference the zones but the concept is correct
This is fantastic man, thank you so much! However, now my game is crashing on load. Any chance you can take a look at what I have so far and see what I'm doing wrong?
With the script you provided before, I kept getting a syntax error due to this line:
Shouldn't there be an extra bracket after the variable so that it reads like this?
Last Edit: February 05, 2018, 09:22:04 pm by jiggy22
Yes you are correct it should have had the second bracket to close the array index.
So there are a few issues with the script that i can see off hand.
First: this should be something like this, it's possible that once the players have been connected the zones aren't initialized yet
Second: The function i gave you should be used to test if they've all been enabled
Third: In order to use a model in script it must be preChached before the players are spawned, IE: before _load::Main() is called Finally: You initialized the array properly but didn't populate using the correct function, setModel() must be called on a script_model and doesn't return anything
hope this helps clearify some of the process for spawning scipt_models into the world
Thanks again for the help, this should certainly help me in the future. However, with my script, I'm still getting a fatal error whenever I load up the map. I think it may have something to do with my trigger thread. Wanna take a look?
Is it supposed to be called as an array thread at the end of the spawnGraves thread? Like this?
As far as i can tell the that should at least compile correctly, so you should try to launch your level while enabling "developer 1" in the console to find the issue.
The script does have a logic error though, A trigger radius if i remember correctly doesn't actually give the notify for "trigger" so you will need to do something closer to this
alternatively i developed a script that allowed you to use HudElements instead of trigger for interaction with objects, it helps lower the HintString limit that WAW has. This is how you would use that system if you wanted to