Home   Help Search Login Register  

Author Topic: Trigger problem  (Read 602 times)

0 Members and 2 Guests are viewing this topic.

Offline Killzone

  • Members
  • *
  • War is the true Enemy
Trigger problem
« on: 24 Nov 2003, 21:51:36 »
Hello,

I created a trigger that has on the condition line: Tank1 distance fuel < 30
and on the activation I have

Tank 1 setfuel 1; Fuel domove getpos Helipad

The purpose of this is so that I can simulate a fuel truck coming to resupply a tank. The problem I am having is it works fine on one map (it is flawless) but when I try to create it on another map it says: Invalid number in expression

Does anyone know what it is. I tryed copying and pasting the trigger and all the units involved from the good one that does work to another map, It did not work. So I tryed to create it from scratch and it will not work. I dont understand how it can work with no problems on one map but refuse to work on another.

I dont kow if this matters but the Fuel truck is not connected to my unit. I use a trigger to send the it out

Thanks in advance for any help on this one ;D >:(
"Everyone dies so deal with it and move on"

                                                      ME

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Trigger problem
« Reply #1 on: 24 Nov 2003, 22:33:21 »
Check that all the units are named correctly.    There is a typo in your post

tank 1 setfuel

whereas it should be tank1 - check that that's not the problem.

Can you post the error message exactly?   In particular, where does the # occur - it will give the location of the invalid bit, which will help us figure out what's going wrong.

Remember Sherlock Holmes:  when you have eliminated the impossible then whatever is left, no matter how improbable, must be the truth.  
Plenty of reviewed ArmA missions for you to play

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Trigger problem
« Reply #2 on: 25 Nov 2003, 17:30:07 »
Code: [Select]
fuel vehicle
Operand types:
    vehicle: Object
Type of returned value:
    Number
Description:
    Check how much fuel is left in the gas tank, in range 0 to 1.

Example:
    fuel vehicle player


I wouldn't use the reserved variable FUEL in another
way than it's supposed to be.

OK, if you don't use the reserved var FUEL anywhere else in
your mission, it might make no problems, as you can always
overwrite settings or rules, but there are a few aspects,
speaking against that:

let's say you're using an addon, which is running it's own
embedded scripts, where any events getting started because
of changes to it's FUEL status.

This addon would initialize the scripts, before your fuel truck
gets named.

Now the game refers to the variable FUEL as it's supposed to
be used - as FUEL

Now you come and name your fuel truck: fuel

Now the game still remembers that fuel represents the fuel
status of any vehicle, and the name of your fuel truck would
become ignored.

Same would happen the other way around:

fuel truck is named: fuel
any condition in any trigger/script asks for: fuel vehicle
and the game doesn't know what to do with that condition,
as it would look for the game like: vehicle vehicle

hope this makes sense to you

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Killzone

  • Members
  • *
  • War is the true Enemy
Re:Trigger problem
« Reply #3 on: 26 Nov 2003, 05:45:29 »
I can't believe as long as I have been playing this game I did not see that I simply had a unit with the wrong name. It's always the little things. Thanks again everyone for your help
"Everyone dies so deal with it and move on"

                                                      ME