Duck Game

Duck Game

View Stats:
Bung 22 Nov, 2016 @ 4:05pm
Time-Stopping Gun
I am trying to make a gun that stops "time" for all players but the user, so all players and projectiles would be frozen for a certain amount of time. What syntax would i use to get the freezing effect of stopped time?
< >
Showing 1-3 of 3 comments
lulu 23 Nov, 2016 @ 5:15pm 
I think the best way to get that effect, is to use the TrappedDuck and captureDuck status.

With the Net Guns, when a net hits a duck, the duck becomes immobilized. One way to achieve the effect would be to spawn a net on the location of every duck upon firing, but that still has the issue of having the net animation and look. This probably isn't what you're looking for. What would probably be closer to what you want is to create a new ammo type stemming from the net, using its source code as a basis. From there, instead of using the captureDuck/trappedDuck status, use the immobilizedDuck/Ragdoll status. Then, set a timer. Once the timer expires, you can convert those ragdoll'd ducks back into their normal state.

For objects, set a radius effect of a large number to cover the map. Then, just set the velocity, gravity, and etc. of those objects/bullets/grenades to 0. Now, to get it back to where it was originally would be a harder question (to get it moving back at the same velocity it was moving at before).

To be honest, this is kind of a hard thing you're trying to do. But definitely don't give up! Though I don't know much about coding, I hope I was able to help!

Good luck!
Bung 23 Nov, 2016 @ 7:20pm 
Thank you!
Azrael 2 Mar, 2018 @ 8:20am 
foreach (duck d in level.getCurrent.typeof(Duck) {
d.hspeed = 0;
d.vspeed = 0;
}
< >
Showing 1-3 of 3 comments
Per page: 1530 50