Home   Help Search Login Register  

Author Topic: Blanks switch  (Read 1757 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
Blanks switch
« on: 25 Nov 2004, 05:10:18 »
This script simulates blanks by deleting the bullets via an EH when a unit fires. This fancy code is not mine, but a pall 've asked me to write a script where he is able to switch blanks on and off per group multiple times.
He is using it in a mission where a group got attacked during a chopper extraction and the problem was that the men had no chance because the chopper was destroyed before the men could embark. He could set him captive, but with the blanks there is still some action, but without friendly casualties.
So , the idea behind it is a bit cheating, but sometimes it could be hard to control the situation...I use it sometimes in action cutscenes...

With the script you can select which or when  a group uses blanks or not via it's own bolean.

Execute the script like this :

[name of the group, index] exec "blanks.sqs"

eg : [grp1,1] exec "blanks.sqs"

The index number is needed so only one script can be be used for several groups. The boleanname got changed in the script by adding the index number to it, so every group has it's own unique bolean to switch blanks on and off.

The bolean is Blanks_on

Some examples...

When index is 1, bolean to switch blanks on for that group:

Blanks_on1 = true

When index is 3, bolean to switch blanks off for that group :

Blanks_on3 = false

Try the testmision, no addons needed


Thanks to Zig for some help with some call format stuff.














« Last Edit: 25 Nov 2004, 06:18:34 by Blanco »
Search or search or search before you ask.

Offline C0LDSt33L

  • Members
  • *
  • Member of the SotM Team
Re:Blanks switch
« Reply #1 on: 10 Dec 2004, 15:14:48 »
I gave it a test.

It should work well in your mission. I can't think of any improvements to it.

bored_onion

  • Guest
Re:Blanks switch
« Reply #2 on: 10 Dec 2004, 21:29:35 »
i agree with what coldsteel says. it seems to be fine with no real problems. certainly a nice little script for cutscenes and general mucking around. however, i couldnt get it to work with a machine gun - is there a reason for this?

Bluelikeu

  • Guest
Re:Blanks switch
« Reply #3 on: 13 Dec 2004, 09:29:00 »
A reson for this is that the script is not catching the bullet quick enough. Machine guns fire in rapid succession. Some bullets are bout the get through.

Thanks,
Bluelikeu