Home   Help Search Login Register  

Author Topic: Surrendering  (Read 1114 times)

0 Members and 1 Guest are viewing this topic.

Cpl. Vagabond

  • Guest
Surrendering
« on: 16 Mar 2003, 01:18:02 »
Can someone here please build me a script which once activated would enable 'removeallweapons' and 'setcaptive true' and make it so if you wonder more than 10 metres away or pick up a weapon your 'setcaptive true' turns to 'setcaptive false'

Basically this would enable you to surrender in a mission with AI and my be it could be done so that a message appears on the enemies screens (MP) saying that you surrender.

wi77ard

  • Guest
Re:Surrendering
« Reply #1 on: 16 Mar 2003, 01:59:24 »
try this

;surrender script
player removeallweapons this;
player setcaptive true;

@player hasweapon "";

player setcaptive false
exit

;end of script


i haven't tested it coz busy right now, but lemme know if works

wi77ard

Cpl. Vagabond

  • Guest
Re:Surrendering
« Reply #2 on: 16 Mar 2003, 12:20:20 »
it didn't work and when i modifyed it to

;surrender script
removeallweapons this;
this setcaptive true;

@player hasweapon "Bizon";

player setcaptive false
exit

;end of script

I didn't have an error message but it didn't work i still had my weapons and i still got shot.

does anyone think they can fix this for me please.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Surrendering
« Reply #3 on: 16 Mar 2003, 14:48:14 »
DonÂ't know this haveweapons shit, but I have a script for ya.

_GL = _this select 0
_DaGuy = _this select 1

_DaGuy setcaptive true
Removeallweapons _DaGuy
_GL setpos getpos _DaGuy

#loop

(_DaGuy distance _GL) < 10 : goto "shootdabastard"

goto "loop"

#shootdabastard

_DaGuy setcaptive false



Probably wont work but do you get da picture? :D ;)
« Last Edit: 16 Mar 2003, 14:54:11 by The real Armstrong »

Cpl. Vagabond

  • Guest
Re:Surrendering
« Reply #4 on: 16 Mar 2003, 15:52:39 »
i've got it working with

removeAllWeapons player;
player setCaptive true;
removeAction "Surrender";

@player hasweapon "Bizon, Glock, BAS_M14AIMPOINT, BAS_M249, BAS_M249spw";

player setcaptive false
exit

;end of script

but this only works for the guy named 'player' and if you want it for multiple blokes then it would be a pain in the a**

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Surrendering
« Reply #5 on: 16 Mar 2003, 15:59:08 »
OK, so I make a "all in one".


_player = _this select 0
_GL = _this select 1

removeAllWeapons _player
_player setCaptive true
_GL setpos getpos _player
removeAction "Surrender"

#loop
? _player hasweapon "Bizon, Glock, BAS_M14AIMPOINT, BAS_M249, BAS_M249spw" : goto "shoot"
? (_player distance _GL) < 10 : goto "shoot"
~0.1
goto "loop"

#shoot
_player setcaptive false
exit


How about that? :D

Cpl. Vagabond

  • Guest
Re:Surrendering
« Reply #6 on: 16 Mar 2003, 16:42:37 »
Nope it didn't work...i still got shot. but it might be better if:-

1: surrender
2: lose your weapons & set captive true
3: you get 10 seconds to get within 6 metres of an enemy
4: once your within 10 metres 1 enemy infantry out of the group with follow you
5: if your armed or move more than 10 metres away then setcaptive false

if it's not possible for armed i wouldn't mind specifying the weapons

p.s do u know where i can get any good  tutorials for learning how-to write sqs files?

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Surrendering
« Reply #7 on: 16 Mar 2003, 16:59:32 »
Here you go!

Johan Gustavssons tute is the best.
« Last Edit: 16 Mar 2003, 17:01:37 by The real Armstrong »