Home   Help Search Login Register  

Author Topic: Event Handlers and MP: Killshooter script  (Read 6307 times)

0 Members and 1 Guest are viewing this topic.

hurlothrumbo

  • Guest
Re:Event Handlers and MP: Killshooter script
« Reply #15 on: 18 Apr 2003, 17:12:50 »
error in top line for Init with dingers orig. post- missing }

hurlothrumbo

  • Guest
Re:Event Handlers and MP: Killshooter script
« Reply #16 on: 19 Apr 2003, 15:06:31 »
This works!

OK after lots of tweaking
in init field
Quote
this addEventHandler ["hit",{_this exec "teamwound.sqs"}]

in teamwound.sqs

Quote
killer = _this select 1
hurt = _this select 0

killera = driver killer

Publicvariable "killera"

? side killera != side hurt :goto "enemy"

? IsNull killer:goto "enemy"

killera setdammage 0.99; removeallweapons killera; Killera globalchat "I nearly killed a teammate!  I'm such an

idiot I should throw my weapon away!"


exit

#enemy
~5

exit

Works perfectly in msn editor.  I'm not sure if it will in MP, I'm going to test later.
If someone on your side shoots you, they get their weapon taked off them and their damage set to .99 (crawling)
It even works if they are inside a vehicle.
« Last Edit: 19 Apr 2003, 16:19:21 by hurlothrumbo »

hurlothrumbo

  • Guest
Re:Event Handlers and MP: Killshooter script
« Reply #17 on: 19 Apr 2003, 16:53:35 »
But now what I want is the action to drop weapons (introduced in resistance) so I can make the player drop his weapon, because it could be that they are the only LAW or AT soldier and the team needs it.  Anyone know what it is?  It's not in the unofficial command reference with the other actions, unless there has bee na new version out.








************EDIT
Actually there is a problem with the above script, if you are driving a car or vehicle, the weapon is removed from whooever you drive over and their damage is set to 9.9...... which is REALLY weird, although it could stop people getting killed by vehicles so much with some changes!  (because even though they are hurt with this, they don't die!)

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Event Handlers and MP: Killshooter script
« Reply #18 on: 23 May 2003, 17:59:24 »
punishing them with "disableuserinput" after respawning them would be a good twist
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline toadlife

  • OFPEC Old Skool
  • Former Staff
  • ****
  • Official OFP Editing Center Toad
    • toadlife.net
Re:Event Handlers and MP: Killshooter script
« Reply #19 on: 23 May 2003, 22:08:05 »
But now what I want is the action to drop weapons (introduced in resistance) so I can make the player drop his weapon, because it could be that they are the only LAW or AT soldier and the team needs it.  Anyone know what it is?  It's not in the unofficial command reference with the other actions, unless there has bee na new version out.

See this thread for all fo your "action" needs. :)

http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=9376

"Whenever you want information on the 'net, don't ask a question; just post a wrong answer." -- Cancer Omega.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Event Handlers and MP: Killshooter script
« Reply #20 on: 23 May 2003, 22:40:59 »
I have been thinking about this a bit and was wondering if the following was possible and if so how to do it


Objective
1)  To check if a player in his safezone had been killed by an enemy
2)  To check if player in safezone had killed an enemy player

My idea is to have 1 main trigger which encompasses the whole playing area
Which uses the addeventhandler "hit " or "killed"

and two smaller triggers which are the same size and in the same location as the east and west ("_x setdammage 1" forEach thislist; ) respawn protection triggers

These two smaller triggers would switch a variable "Insafezone" to true for any player that is within the triggers perimeter


Then the addeventhandler script exec by the init.sqs
that is continuously looping would check to see if

a) The "hit" target was ?(insafezone)
or
b) The shooter was ?(insafezone)

If either the shooter or target was ?(insafezone), then the shooter would be punished by being
{player setPos (getMarkerPos "respawn_east")} or if west the respawn_west
and then
player=shooter disableuserinput = true
~ punishment
player=shooter disableuserinput = false

I aint that familiar with eventhandlers, but i think i got a failry good understanding of them

However, what i do need to know, is how to make the smaller triggers switch "insafezone" to true for any player in its list


If i can get it working, i think it will be far more efficient that any of the Anti spawn shooting systems used so far


Any help will be appreciated Thx
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Re: Event Handlers and MP: Killshooter script
« Reply #21 on: 24 May 2009, 01:08:58 »
Hi Dinger: How would I take one of these scripts you mentioned above and make it to ( say ) take points away from someone killing an unarmed enemy officer or soldier? As a rules of engagment script?
« Last Edit: 24 May 2009, 11:43:11 by SpectrumWarrior »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Event Handlers and MP: Killshooter script
« Reply #22 on: 24 May 2009, 01:40:09 »
After 6 years I doubt you will get a response from Dinger, but you never know I suppose.    :cool2:


Planck
I know a little about a lot, and a lot about a little.

Re: Event Handlers and MP: Killshooter script
« Reply #23 on: 24 May 2009, 02:49:50 »
Well really if anyone can help me on this I would be greatful