I’m having a bit of trouble trying to create a scripted event in forge. I want to have Spartans walk into a small area and when they do, a single bolt of lightning strikes. However, I don’t want the lightning strike to happen again during the round. What I need help with is creating the lightning strike so it doesn’t come back until the next round. Any and all help would be appreciated!
In case it’s helpful, I followed this pressure plate tutorial (to sense where the Spartan is):
https://m.youtube.com/watch?v=oOF54RHXboU
Oh I can help with that. Do the Spartans walk to where the lightning strike will be right when the match starts or might they walk around for a few minutes before proceeding to the location of said lightning strike? Well if they do move to where the lightning strike will be right when the match starts figure out approximately how long it takes to reach the location of the lightning strike. Then go into the object options and go down to the scripting. For the first script set the lightning strike to despawn on the round start. If it were to say take 10 seconds to reach the location of the lightning strike set up another script in which you will use the timer option and for initial delay you will input 10 seconds and then underneath it set next value to zero. And then you’re going to want to set the action for the timer to make it spawn. Finally you want to set up a third script which will also work using the timer option. This time you will set the initial delay to 12 seconds, I’m basing this part of my 10-second example earlier, and then for the value underneath it you will once again set it to zero and the action for this timer will be despawn. This way it will only be on the map long enough to make a single lightning strike. It will not be on the map when the match starts but 10 seconds into the match it will spawn in for just a couple seconds before it despawns giving it enough time for a single strike. Or if it takes 5 Seconds to reach the location the 10 would be 5 and the 12 would be 7 If you need more help or want to set up more scripts message BobaVhett66 on xbox, I’ll be on forge tomorrow anyways.
> 2533274974193458;2:
> Oh I can help with that. Do the Spartans walk to where the lightning strike will be right when the match starts or might they walk around for a few minutes before proceeding to the location of said lightning strike? Well if they do move to where the lightning strike will be right when the match starts figure out approximately how long it takes to reach the location of the lightning strike. Then go into the object options and go down to the scripting. For the first script set the lightning strike to despawn on the round start. If it were to say take 10 seconds to reach the location of the lightning strike set up another script in which you will use the timer option and for initial delay you will input 10 seconds and then underneath it set next value to zero. And then you’re going to want to set the action for the timer to make it spawn. Finally you want to set up a third script which will also work using the timer option. This time you will set the initial delay to 12 seconds, I’m basing this part of my 10-second example earlier, and then for the value underneath it you will once again set it to zero and the action for this timer will be despawn. This way it will only be on the map long enough to make a single lightning strike. It will not be on the map when the match starts but 10 seconds into the match it will spawn in for just a couple seconds before it despawns giving it enough time for a single strike. Or if it takes 5 Seconds to reach the location the 10 would be 5 and the 12 would be 7 If you need more help or want to set up more scripts message BobaVhett66 on xbox, I’ll be on forge tomorrow anyways.
Thanks for the suggestion, but it’s not exactly what I want. I wanted it to spawn and despawn once it received a message from charlie channel. I haven’t gotten that to work, but I just tried changing the lightning to an explosion and moving it to the very edge of the map once it explodes, and it seems to work the way I want. Thanks for the help, though! I’m halfway decent at coding on the PC, but I’ve never really gotten the time to know how to script in Halo.
> 2535470844817406;4:
> Youtube.
YouTube didn’t have any videos as far as I could tell. I figured a way out, though.
Did you try switching the message to a power channel set like {Power Set: Charlie: On}? Then you could spawn the lightning fx when when that happens (On Power Set: Charlie: On) {Spawn}. Since the lightning keeps striking you’ll want to set it to Despawn after a second or two or rig up an object timer to activate a Despawn script. And add a (On Round Start) {Power Set: Charlie: Off} script somewhere to let it happen again each round.
I can provide more info if you need it. I think forgehub has YouTube videos on creating object timers.
> 2533274985652665;6:
> Did you try switching the message to a power channel set like {Power Set: Charlie: On}? Then you could spawn the lightning fx when when that happens (On Power Set: Charlie: On) {Spawn}. Since the lightning keeps striking you’ll want to set it to Despawn after a second or two or rig up an object timer to activate a Despawn script. And add a (On Round Start) {Power Set: Charlie: Off} script somewhere to let it happen again each round.
>
> I can provide more info if you need it. I think forgehub has YouTube videos on creating object timers.
I tried something similar, but it still spawns afterwards. I’ve just given up on the idea. I’ve tried all sorts of combinations but I can’t get anything.
Have it so
Round start:despawn
Message recieved: spawn
Timer initial delay 0 repeat~2 secs : despawn
I’ve not tried it but it could work.
> 2533274978302173;8:
> Have it so
>
> Round start:despawn
> Message recieved: spawn
> Timer initial delay 0 repeat~2 secs : despawn
>
> I’ve not tried it but it could work.
That would almost work, except that the lightning would be despawned between 0-2 seconds, so sometimes it would Despawn too quickly. Using a Repeat Timer seeing that is just under the time between lightning strikes would work more of the time.
If you want it to work the way the doors in the pressure plate video do try this:
-
Have the pressure plate cause {Power Set: charlie: Off}
-
Use a Timmy whale (or anything) as an object timer like they do in that video, but set its Respawn property to 2 seconds. Also put it far away from where any players will be on your map so it respawns correctly.
-
Timmy: (On Power: charlie: Off) {Despawn}
-
Timmy: (On Spawn) {Message Send: charlie}
-
Lightning FX: (On Round Start) {Despawn}
-
Lightning FX: Multi: Minimum=3 (On Power: charlie: Off) (On Power: charlie: Off) (On Message: charlie) {Despawn}
-
[Yeah, we need to put (On Power: charlie: Off) in there twice because messages count +1 towards Minimum in Multi conditions if the same power channel is currently On.]
-
Lightning FX: (On Round Start) {Power Set: charlie: On} This script can actually be added to any object.
-
Lightning FX: (On Power: charlie: Off) {Spawn}
This is what happens:
-
The charlie power channel is turned On at the start of every round.
-
The pressure plate turns charlie power Off and causes the lightning to spawn and the Timmy to despawn.
-
2 seconds later Timmy respawns and sends a message over charlie which causes the lightning to despawn.
-
Since charlie power stays Off until the start of the next round, players walking on the pressure plate again don’t cause the lightning to respawn because (On Power: channel: Off) only triggers when the power switches from On to Off.I think that’s got it, but let me know if it doesn’t work right. It’s tricky to account for what can happen between rounds.
> 2533274985652665;9:
> > 2533274978302173;8:
> > Have it so
> >
> > Round start:despawn
> > Message recieved: spawn
> > Timer initial delay 0 repeat~2 secs : despawn
> >
> > I’ve not tried it but it could work.
>
>
> That would almost work, except that the lightning would be despawned between 0-2 seconds, so sometimes it would Despawn too quickly. Using a Repeat Timer seeing that is just under the time between lightning strikes would work more of the time.
>
> If you want it to work the way the doors in the pressure plate video do try this:
>
> - Have the pressure plate cause {Power Set: charlie: Off}
> - Use a Timmy whale (or anything) as an object timer like they do in that video, but set its Respawn property to 2 seconds. Also put it far away from where any players will be on your map so it respawns correctly.
> - Timmy: (On Power: charlie: Off) {Despawn}
> - Timmy: (On Spawn) {Message Send: charlie}
> - Lightning FX: (On Round Start) {Despawn}
> - Lightning FX: Multi: Minimum=3 (On Power: charlie: Off) (On Power: charlie: Off) (On Message: charlie) {Despawn}
> - [Yeah, we need to put (On Power: charlie: Off) in there twice because messages count +1 towards Minimum in Multi conditions if the same power channel is currently On.]
> - Lightning FX: (On Round Start) {Power Set: charlie: On} This script can actually be added to any object.
> - Lightning FX: (On Power: charlie: Off) {Spawn}
> This is what happens:
>
> - The charlie power channel is turned On at the start of every round.
> - The pressure plate turns charlie power Off and causes the lightning to spawn and the Timmy to despawn.
> - 2 seconds later Timmy respawns and sends a message over charlie which causes the lightning to despawn.
> - Since charlie power stays Off until the start of the next round, players walking on the pressure plate again don’t cause the lightning to respawn because (On Power: channel: Off) only triggers when the power switches from On to Off.
> I think that’s got it, but let me know if it doesn’t work right. It’s tricky to account for what can happen between rounds.
This seems to be working so far. Thank you! I hadn’t thought of using both power channels and message channels.