Home   Help Search Login Register  

Author Topic: Need Player can't use Satchel  (Read 573 times)

0 Members and 1 Guest are viewing this topic.

BaKaRa

  • Guest
Need Player can't use Satchel
« on: 22 Mar 2003, 08:22:43 »
Hi !
I am doing a " bullet cam " script but it works with this command :
Player AddEventHandler ["Fired",{_This Exec "*.sqs"}]

So when i want to pose a satchel or a mine, The cam is activating ( i'm not sure if it's good english  ;D ) and i'm stuck, crouch with my hand on the satchel  :-\

I need a command to be unable to have PipeBomb, TimeBomb or mine on me.

If it's not possible, there is a way to place it without the cam is active ???
I hope you understand, sorry for my bad english  :-[
Thanks in advance

Cap

  • Guest
Re:Need Player can't use Satchel
« Reply #1 on: 22 Mar 2003, 08:30:04 »

I need a command to be unable to have PipeBomb, TimeBomb or mine on me.


I can understand all of it exept the bit i have highlighted what do you mean by this?

BaKaRa

  • Guest
Re:Need Player can't use Satchel
« Reply #2 on: 22 Mar 2003, 08:33:14 »
Player can only have guns like G36, Steyr, Pk and LAW, Strella, CarlGustav... But neither PipeBomb/TimerBomb or Mine -> In fact no weapon of class " put "

Cap

  • Guest
Re:Need Player can't use Satchel
« Reply #3 on: 22 Mar 2003, 08:45:08 »
Are you trying to say that none of the players human or Ai start with satchels? cos if u are i can tell you they do, or you can make any player have a satchel by using the "removemagazine" command to make room for a satchel and use the "addmagazine" command to add a satchel. on a regular "soldier" use

yoursoldier removemagazine "handgrenade"; yoursoldier removemagazine "handgrenade"; yoursoldier addmagazine "pipebomb"

or if u mean you cant make him put a satchel try the "playmove" command, im not sure how this works you will need to ask someone else.

hope this helps

BaKaRa

  • Guest
Re:Need Player can't use Satchel
« Reply #4 on: 22 Mar 2003, 08:55:37 »
I had badly explain my problem:  :-\
They can have satchel in ammobox and units can TAKE it, but they are unable to USE it ( it's a bit fool but i don't care lol )
For exemple, a unit running my " Bullet cam " script couldn't place a satchel when the script is running. But if my script is deactivate, satchel can be placed.
 If someone could tell me a command doing that ( probably with a jump ) will really help me. But i don't understand why the " HasWeapon " command work with most of weapons but not with these fu... satchel !!!

Cap

  • Guest
Re:Need Player can't use Satchel
« Reply #5 on: 22 Mar 2003, 09:07:52 »
Ahh i think i understand but i dont know how to solve your problem try posting the script so we can take a look

BaKaRa

  • Guest
Re:Need Player can't use Satchel
« Reply #6 on: 22 Mar 2003, 09:17:14 »
Here the heart script, he works with two other:

_________________________________________________________


_Muni = NearestObject [Vehicle(Player), _This Select 4]
? IsNull  _Muni : Exit
_Type= _Muni
_CamOffsetX =0
_CamOffsetY =0
_CamOffsetZ =0
_Cam = "Camera" CamCreate GetPos _Muni
_Cam CameraEffect ["Internal", "Back"]
#Boucle
SetAccTime 0.2
_Cam CamSetPos [(GetPos _Muni Select 0) + _CamOffsetX , (GetPos _Muni Select 1) + _CamOffsetY, (GetPos _Muni Select 2)+ _CamOffsetZ]
_Cam CamSetTarget [((GetPos _Muni Select 0) + ((Sin GetDir _Muni) * 5000)), (GetPos _Muni Select 1) + (((Cos GetDir _Muni) * 5000)), (GetPos _Muni Select 2)]
_Cam CamCommit 0
?(_Muni Distance Player > 1000):Goto "Fin"
?(Alive _Type):Goto "Boucle"
?Not(Alive _Type):Goto "Fin"
#Fin
SetAccTime 1
_Cam CameraEffect ["Terminate", "Back"]
CamDestroy _Cam
Exit

_________________________________________________________

The command i need must be before this line :
_Cam = "Camera" CamCreate GetPos _Muni

Personnaly, i don't think that could help

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re:Need Player can't use Satchel
« Reply #7 on: 22 Mar 2003, 09:49:50 »
Another way to do it is to have a check in your bulletcam script to see if the soldier
is putting down a mine or satchel charge. Have something like this in the beginning of your script:
Code: [Select]
; Who fired?
_actor = _this select 0;

; What weapon was fired?
_weapon = _this select 1;

; What muzzle on the weapon was used?
_muzzle = _this select 2;

; What mode was the weapon fired in?
_mode = _this select 3;

; What ammo was used?
_ammo = _this select 4;

; If the soldier throws a grenade or puts down a mine or satchel, just exit
? (_weapon == "Put" || _weapon == "Throw"): exit

; Here follows the rest of your bulletcam script...

Hope that helps. Regards!

BaKaRa

  • Guest
Re:Need Player can't use Satchel
« Reply #8 on: 22 Mar 2003, 12:19:46 »
It works exactly like i want  ;D  ;D  ;D
Thanks you very very much KillSwitch :afro: