Home   Help Search Login Register  

Author Topic: Help with mp editing  (Read 1661 times)

0 Members and 1 Guest are viewing this topic.

Offline haroon1992

  • Members
  • *
  • My life is hopeless...
Help with mp editing
« on: 23 Jul 2009, 15:05:16 »
I have a small question if its not to much trouble,

I am making a death match mission with ambient life in it, cows chickens etc, all works fine at the moment, but i would like the players to be punished with -1 point if they kill an animal, have you any idea how I would do it?

I have seen the addrating command, but am unsure how to us it. I am a noob when it comes to this.

Thanks
Very busy with life, business, and other stuff. Away from OFP for months. Not sure if I could get back onto it. :(

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Help with mp editing
« Reply #1 on: 26 Jul 2009, 10:33:58 »
Place a trigger anywhere on the map. Leave it as 'None' and 'Present'. Put in the condition field:

Code: [Select]
not (alive chicken)
Where chicken can be the name of any of your animals.

In the On activation field put this:

Code: [Select]
aP addrating -1
Where aP is the name of your player

You can also use a getdammage command where if your soldier shoots an animal, HQ will tell you to stop it...

In the condition field put this:

Code: [Select]
getdammage chicken > 0
and in the On activation field put:

Code: [Select]
[West,"hq"] sidechat "Stop shooting the animals"
Hope this helps  :)

Gruntage
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline haroon1992

  • Members
  • *
  • My life is hopeless...
Re: Help with mp editing
« Reply #2 on: 26 Jul 2009, 10:59:46 »
No i mean how do i define who shot the animals so that i can reduce marks from the one who shot the animals(as there are players in the MP)
Very busy with life, business, and other stuff. Away from OFP for months. Not sure if I could get back onto it. :(

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Help with mp editing
« Reply #3 on: 26 Jul 2009, 11:50:38 »
In that case, use the hint format command:

Code: [Select]
_u = _this select 0

_rat = (rating _u) +1
         
hint format ["%1 stop killing the animals!", name _u]

_u addrating -_rat

this would be the script used in the following eventhandler:

Code: [Select]
_animal = _this select 0

_animal addeventhandler ["Killed", {_this exec "animalkilled.sqs"}]

I think thats right  :scratch:

You can also use sidechat format instead of hint:

Code: [Select]
_u = _this select 0

[West,"hq"] sidechat format ["%1 stop killing the animals!" name _u]

Hope this helps

Gruntage

"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: Help with mp editing
« Reply #4 on: 28 Jul 2009, 01:52:47 »
I believe this should go into the ArmA 2 section.
TS3 IP: tor.zebgames.com:9992