Home   Help Search Login Register  

Author Topic: Firing within a certain distance.  (Read 949 times)

0 Members and 4 Guests are viewing this topic.

Offline greg147

  • Contributing Member
  • **
    • Royal Air Assault Battalion
Firing within a certain distance.
« on: 22 Jan 2005, 18:25:45 »
I'm trying to make a mission that involves you firing a grenade at a building (thats not all of it, just a small part  ;D ), but I need it so if the player fires within a certain area of the building (or by trigger), an object explodes (just setdamage 1). So, if I fired a grenade from 50 metres away, nothing extra would happen, but if I fired it from 20 meres away, a trigger would activate. Is this possible?

And one more thing, whats the line for when a unit reaches a certain damage. Like, if when the player got to half dead, a trigger would activate.  ;)

Thanks for any help
« Last Edit: 22 Jan 2005, 18:27:04 by greg147 »
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB

StonedSoldier

  • Guest
Re:Firing within a certain distance.
« Reply #1 on: 22 Jan 2005, 18:54:54 »
2) dammage unitname > 0.5

Offline greg147

  • Contributing Member
  • **
    • Royal Air Assault Battalion
Re:Firing within a certain distance.
« Reply #2 on: 22 Jan 2005, 19:02:19 »
Thanks for that one  ;)

Anyone know the answer to the first one?
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Firing within a certain distance.
« Reply #3 on: 22 Jan 2005, 20:00:53 »
I have not tested it but a fired event handler might be used to run a scrip that checks how far away you are.

BronzeEagle

  • Guest
Re:Firing within a certain distance.
« Reply #4 on: 24 Jan 2005, 16:03:16 »
what i would do is set the trigger so that

condition:  building distance player > 5  (or whatever) and damage building > .5

on activation: blah blah blah

Offline greg147

  • Contributing Member
  • **
    • Royal Air Assault Battalion
Re:Firing within a certain distance.
« Reply #5 on: 24 Jan 2005, 17:53:41 »
Ah yeah, that could work. I'll try that  ;)
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB