Home   Help Search Login Register  

Author Topic: Obj condition  (Read 2011 times)

0 Members and 1 Guest are viewing this topic.

pazuzu

  • Guest
Obj condition
« on: 26 Dec 2004, 20:58:44 »
I'm making a mission for Afghanistan island where the 2nd objective is to capture Bin Laden alive.

I'm using (damage binladen) > .3   for the condition on 2nd obj.

The idea is to shoot him in the leg wounding & disabling him & that is counted as capturing him to end the mission.

The problem I have is a player doing a long distance shot & wounding Osama then the mission ends as a success even though Osama is still surrounded by alot of enemy units.

I was wondering if it is possible to have a condition for how close the player gets to Osama or some other way of forcing the player to get close to him to capture him(mainly by shooting him in the leg).

Is it possible to use the "knowsabout" command as a condition or something along those lines?

Thanks.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Obj condition
« Reply #1 on: 26 Dec 2004, 21:08:00 »
Possibly something like:

? ((damage binladen) > .3) && (player distance binladen) < 5) : setcaptive binladen


Or something like that.


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

pazuzu

  • Guest
Re:Obj condition
« Reply #2 on: 26 Dec 2004, 21:18:41 »
Hmm,

What does (player distance binladen) < 5) mean?

Does player have to get 5 meters from him?

& I dont get the setcaptive binladen...

Is this like the setcaptive true command?


Thanks for replying so quickly.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Obj condition
« Reply #3 on: 26 Dec 2004, 21:23:25 »
setCaptive binladen marks him as captive.

You can always put a different distance in there, it doesn't need to be 5 metres...put whatever you need.

Try it out anyway, it might need some syntax tweaks.


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

pazuzu

  • Guest
Re:Obj condition
« Reply #4 on: 26 Dec 2004, 21:32:05 »
Great, I'll test it right now...


Thanks again.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Obj condition
« Reply #5 on: 26 Dec 2004, 22:44:45 »
you can also check whether there are any other enemies nearby other than binladen

an easy way to do all of this is make a trigger:
Trigger
name: trig1
size: distance from binladen (circle)
type: anyone present
condition: this && east countside thislist == 1 && west countside thislist >= 1
on activation: binladen setcaptive true;binladen setcombatmode "blue"

then put a setpos loop on the trigger keeping it on binladen

#loop
trig1 setpos getpos binladen
~.5
goto "loop"

pazuzu

  • Guest
Re:Obj condition
« Reply #6 on: 27 Dec 2004, 19:53:14 »
Hey the (player distance binladen) < 5 command works great. Thank you.

Is it possible to make it so this includes any member of my team?


Thanks for the help.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Obj condition
« Reply #7 on: 27 Dec 2004, 20:41:14 »
Quote
Is it possible to make it so this includes any member of my team?

Yes........just use:

(nameofmemberofteam distance binladen) < 5


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

pazuzu

  • Guest
Re:Obj condition
« Reply #8 on: 27 Dec 2004, 21:15:31 »
I thought of that but not sure how to type it out....

If I put: (player1 distance binladen) < 5; (player2 distance binladen) < 5; (player3 distance binladen) < 5 .....etc.

Wouldn't that mean that all the players listed have to be within that distance?

How do I make it so it doesn't matter which player accually get to Osama first?


Thanks.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Obj condition
« Reply #9 on: 27 Dec 2004, 21:18:37 »
Try:

((player1 distance binladen) < 5) OR ((player2 distance binladen) < 5) OR ((player3 distance binladen) < 5) .....etc.


Planck
« Last Edit: 27 Dec 2004, 21:19:32 by Planck »
I know a little about a lot, and a lot about a little.

pazuzu

  • Guest
Re:Obj condition
« Reply #10 on: 29 Dec 2004, 06:18:36 »
Hmm, that doesn't work...

For some reason when I put that condition to include all members of team it cancels out the damage condition (damage binladen) > .3 so when any member of team gets close to bin it fires trigger even though bin is not injured.

Also it wont eccept ((player1 distance binladen) < 5) .....I had to remove a couple (

Typed it as (player1 distance binladen) < 5

I can just make it so leader has to be the one to capture bin.


Thanks for the help.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Obj condition
« Reply #11 on: 29 Dec 2004, 14:10:13 »
just use what i said at the begining, by keeping a trigger on binladen

pazuzu

  • Guest
Re:Obj condition
« Reply #12 on: 29 Dec 2004, 20:31:32 »
I don't really understand what your trigger does or how to set it up...

Where do I put:

#loop
trig1 setpos getpos binladen
~.5
goto "loop"    

& does this make it so the trigger follows him?


Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Obj condition
« Reply #13 on: 29 Dec 2004, 21:16:33 »
that would be a script
you would exec in some unit init (for ex. binladen)
[] exec "triggerpos.sqs"  or whatever you decide to name it, and put that in the script
yes it will keep the trigger on him
then you can group it to the group of people wo have to catch him, set it to any member, and then put in the other stuff you need for him to be set captive
you can add something like what i did earlier to make it so there can't be anyone on binladens side in the trigger as well.
basically the distance thing was simulating a trigger over him, but just making it harder to do