Home   Help Search Login Register  

Author Topic: The customer  (Read 1235 times)

0 Members and 1 Guest are viewing this topic.

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
The customer
« on: 20 Sep 2002, 00:40:15 »


[attachment deleted by admin]
« Last Edit: 20 Sep 2002, 00:41:26 by MI_Fred »
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

Bremmer

  • Guest
Re:The customer
« Reply #1 on: 20 Sep 2002, 16:16:20 »
Check to make sure you are passing the correct variable from the trigger by putting the line

hint format ["%1", _drv]

just after you define _dve = _this select 0 in your script.
For the addaction script you should bear in mind that although you cannot pass variables to and added action script, the unit thatthe action was added to and the unit that uses the action are passed automatically and can be found using _this select 0 and _this select 1 in your addaction.sqs.

Good luck
« Last Edit: 20 Sep 2002, 16:17:09 by Bremmer »

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:The customer
« Reply #2 on: 20 Sep 2002, 18:34:42 »
Format saved my life. ehm, yep.  ::) quite handy.

Used Hint format ["%1 is at the pits",_drv]
So I get WEST alpha black:1 is at the pits.

Now, can I use that throughout every script to identify who has triggered the ummm trigger?
as in:
? _drv == WEST alpha black:1 : goto "wp1wpns"
? _drv == EAST alpha black:1 : goto "ep1wpns"

Maybe in the addaction script?

Oh well, if the unit the action was added to can be found that way, great. But who's the 'other guy' ur talking about? ;D
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

Bremmer

  • Guest
Re:The customer
« Reply #3 on: 21 Sep 2002, 02:52:30 »
Quote
But who's the 'other guy' ur talking about?

In your example you will want to add the action to the units car - not the unit itself (if it gets out of the car it will still have the action - you can tie the action to the car by giving the car the action instead of the unit). This is passed to the addaction script as _this select 0.

The unit that acticated the action (in your case the car driver) is passed to the script as _this select 1.

Actually, thinking about it, I may have those the wrong way around  ???. You should probably check.

Cheers

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:The customer
« Reply #4 on: 21 Sep 2002, 05:08:26 »


[attachment deleted by admin]
« Last Edit: 21 Sep 2002, 06:04:12 by MI_Fred »
There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.