So I am trying to set a reinforcement tool on a map however I ran into some issues that I don't understand. I am just trying to toggle a spawn on a small prefab, explosion and weapons. I have tried having it on Power On, set some to Bravo and Alpha in case it over loaded Alpha. Now I tried Message send and still nothing. What doesn't spawn is the Explosives and Weapons. Contact me here or on Xbone: Fred E 104 SII Invisible Switch// On Interaction Action1// Play Sound (works) Action 2// Message Send: Alpha Action 3// Despawn Weapon Drop Pods Script 1When Match Start Do Action 1// Despawn Script 2When Message Received: Alpha Do Action 1// Wait 10.00 Action 2// Spawn Human Explosive Script 1When Match Start Do Action 1// Despawn Force On Script 2When Message Received: Alpha Do Action 1// Wait 10.00 Action 2// Spawn Force: On Action 3// Wait 13.70 Action 4// Despawn Weapons Script 1When Match Start Do Action 1// Despawn Script 2When Message Received: Alpha Do Action 1// Wait 10.00 Action 2// Spawn Force: On
two things off the top of my head: 1, rather than despawning things with a script on eac hthing that needs despawning on round start, set a brain to despawn objects with the label User Zulu on start. Then simply set anything you want to be unavailable on round start to have a label of zulu. 2, It appears you are despawning the switch, which may cause it to malfunction. Instead, if you do not want the switch usable after the message is sent, use the option to make the switch non-interactive rather than despawning it. okay 3 things: 3, explosion's final task (action) should be to despawn itself again. So yo probably want a 3rd acion as another wait, and then the 4th and final action as despawn.
I'll give it a try but I haven't heard of the scripting style you referred to in the first 2 points. Why prefabs I could examine to see what you mean?
Despawning items at Round Start: (Note, this can also be done using Match-Start and On Timer with no repeat) I'm not sure if there is a good pre-fab to study specifically. However, the following should get you started... Any object can be given a label. Labels are typically used for assigning certain items to only CTF, only Slayer, mini-game etc. But one nifty use of them is that there are 26 user labels that you can use for whatever you like (Alpha - Zulu). Because you'd normally start at the top of that list (alpha) and use them for groupings of objects that make sense for your map, for the purpose of grouping "Items to be despawned on start", to always just default to using the "User Zulu" label so that it is at the end of your list, and what's really cool is that all you have to do in the properties for the item is go to label, and click left one time and it goes to zulu. Anything (and there could be many things) you'd like to not exist initially in your map, can be given this label. Then, you just need to set one script brain (because its an object you can script that has no other properties, otherwise you can do this with any object able to be scripted, actually) to: Script Brain: On Round Start Despawn <click objects sub-menu, change "This" to Add Label, "User-Zulu". There may be a limit to the number of objects you can despawn on start in this manner, but it will be hard to hit. Rather than placing a "despawn" script on every object, wasting 1 script per object, you can give them all the same "zulu" label and have them spawn in as necessary. (but remember, for most things, you'll want them to despawn again after doing what they were supposed to do. i. e. explosions.) Items to despawn: May require other scripts, but for spawning, require NONE! In properties, click "Label", Add Label, User-Zulu (or another user label if you prefer. As you'll see, zulu is the most convenient) De-activating Switches: Sure, you can despawn a switch, but then you run into the issue we all run into while forging, which is that to grab that switch and mess w/ it again, you need to respawn all objects, grab it, and then make your changes. Also, despawning the switch may prevent it from performing some functions, so it is generally cleaner not to despawn switches, but rather, make them unable to be interacted with under certain conditions. So, say I want to deactivate a switch, as you appear to, after it has sent a message: Switch Object: On Interacted: Send Message Alpha (or whatever you want it to do) Add Action... Set Switch Interactive (not exactly sure on wording) - check the box or non. You can also tell it who can use it I believe, by defining certain players etc. Of course, when you are ready for it to be active again, you need something to tell that switch to go back into active status again. So, say you have a timer that says this switch can only be activated after 2min of gametime after it was deactivated, you need to deactivate, wait 2min, then activate. Good luck, hopefully this helps a little
Awesome I hope I can get all that into the game without getting to lost haha, scripting is fun if you know what you are are doing and sadly I still have a ton to learn with the update still loving to throw me under the bus trying to find new ways to make my maps function the way I want.
Well here is the update... 4 hours of messing around yesterday and 2 this morning and all that was done is able to get the explosions to spawn but they will not despawn after they spawn in.
if spawning on the message receive is the first action on the explosion script, then make the 2nd and 3rd actions be "wait" and "despawn". Make sure the wait is long enough to allow the explosion animation and sound to complete, but not so long that it loops to explode a second time.