diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2019-01-04 23:56:55 +0100 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2019-01-23 23:50:09 +0100 |
| commit | 8b0f73bc418e340132ba99305baa5ea1605a2d11 (patch) | |
| tree | a4470393c563f6f4afbed2bb4935b5cc7105676a /TemplePushing.c4s/Misc.c4d | |
| parent | dcae2a1b34211eea3109cb2d1fc7b60d2e811dec (diff) | |
| download | tempelschubsen-8b0f73bc418e340132ba99305baa5ea1605a2d11.tar.gz tempelschubsen-8b0f73bc418e340132ba99305baa5ea1605a2d11.zip | |
Execute pushes in a random order instead of in network execution order
Diffstat (limited to 'TemplePushing.c4s/Misc.c4d')
| -rw-r--r-- | TemplePushing.c4s/Misc.c4d/PushExecuter.c4d/DefCore.txt | 4 | ||||
| -rw-r--r-- | TemplePushing.c4s/Misc.c4d/PushExecuter.c4d/Graphics.png | bin | 0 -> 872 bytes | |||
| -rw-r--r-- | TemplePushing.c4s/Misc.c4d/PushExecuter.c4d/Script.c | 42 |
3 files changed, 46 insertions, 0 deletions
diff --git a/TemplePushing.c4s/Misc.c4d/PushExecuter.c4d/DefCore.txt b/TemplePushing.c4s/Misc.c4d/PushExecuter.c4d/DefCore.txt new file mode 100644 index 0000000..a6b01b4 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/PushExecuter.c4d/DefCore.txt @@ -0,0 +1,4 @@ +[DefCore] +Name=Push Executer +id=PUEX +Category=C4D_StaticBack
\ No newline at end of file diff --git a/TemplePushing.c4s/Misc.c4d/PushExecuter.c4d/Graphics.png b/TemplePushing.c4s/Misc.c4d/PushExecuter.c4d/Graphics.png Binary files differnew file mode 100644 index 0000000..c640ae4 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/PushExecuter.c4d/Graphics.png diff --git a/TemplePushing.c4s/Misc.c4d/PushExecuter.c4d/Script.c b/TemplePushing.c4s/Misc.c4d/PushExecuter.c4d/Script.c new file mode 100644 index 0000000..36ccc5f --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/PushExecuter.c4d/Script.c @@ -0,0 +1,42 @@ +#strict 2 + +static PushExecuter; + +local requestedPushes; + +func Initialize() +{ + if(PushExecuter) + { + RemoveObject(); + return; + } + + requestedPushes = []; + PushExecuter = this; + + AddEffect("IntExecutePushes", this, 1, 1, this); +} + +func RequestPush(object clonk) +{ + if(GetIndexOf(clonk, requestedPushes) == -1) + { + requestedPushes[GetLength(requestedPushes)] = clonk; + } +} + +func FxIntExecutePushesTimer(object target, int effectNumber) +{ + ShuffleArray(requestedPushes); + + for(var requester in requestedPushes) + { + if(requester) + { + requester->ExecutePush(); + } + } + + requestedPushes = []; +}
\ No newline at end of file |
