Home   Help Search Login Register  

Author Topic: Who's who  (Read 764 times)

0 Members and 1 Guest are viewing this topic.

Ace Productions

  • Guest
Who's who
« on: 04 May 2004, 07:41:29 »
Hi again,

When using the "getin" EH it returns the unit that entered the vehicle. I've tried in my script to put the condition if this unit is the player then to do something:

?(_unitname==player)

OR

_myunit=player
?(_unitname==_myunit)

but nothing!

Can someone please help me?
 


Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Who's who
« Reply #1 on: 04 May 2004, 08:31:09 »
How do you 'launch' the EH and the sript?

...["getin",{_this exec "srcipt.sqs"}]

then

_unitname = _this select 0

?_unitname == player: sumtin happens...

 ???
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Ace Productions

  • Guest
Re:Who's who
« Reply #2 on: 04 May 2004, 08:35:11 »
Thanks HateR_Kint but as I wrote in my post I've tried that already without any luck.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Who's who
« Reply #3 on: 04 May 2004, 08:48:28 »
It was more of a question...

But, if you substitute the _this select 0 with _this select 2 it should work...

0 is the vehicle on which the getin EH is 'attached' and 1 is the position (gunner/driver/commander/cargo...)...
Just checked the EH tute at Ed Depot...  ;)
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Ace Productions

  • Guest
Re:Who's who
« Reply #4 on: 04 May 2004, 09:04:06 »
My friend HateR_Kint I've already done all that but it seems it doesn't like the ?(_unitname==player) line.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Who's who
« Reply #5 on: 04 May 2004, 10:07:01 »
Well, it worked for me just fine...
I had an jeep with the getin EH and it ran this code:

Code: [Select]
_unitname = _this select 2

hint format ["%1",_unitname]
~1

?_unitname == player: hint "wupdiduu"

And it worked fine...
No error msgs or anything...

There's bound to be some errors in your syntaxes...  ???
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Ace Productions

  • Guest
Re:Who's who
« Reply #6 on: 04 May 2004, 14:33:11 »
I'll try it again tonight and let you know tommorow. Thanks a lot anyway for your many replies today.

Ace Productions

  • Guest
Re:Who's who
« Reply #7 on: 08 May 2004, 18:16:09 »
HateR_Kint u were perfectly right.

Thanks again.