Home   Help Search Login Register  

Author Topic: confused  (Read 412 times)

0 Members and 1 Guest are viewing this topic.

Offline Killzone

  • Members
  • *
  • War is the true Enemy
confused
« on: 06 Dec 2004, 17:00:29 »
Hi

I am using the new animations by flashpointgamer. I am trying to use an addeventhandler to call a script once the unit is either fired upon or hit. I have tried:

loon AddEventHandler ["fired", this exec "null.sqs"]
and
loon AddEventHandler ["hit", this exec "null.sqs"]

The script it is calling is a simple:

loon switchMove "null"

The problem I am having is the script activates right away when nothing has happened. I dont even have enemies on the map yet.
What am I doing wrong?

thanks again :)

"Everyone dies so deal with it and move on"

                                                      ME

Offline ACF

  • Members
  • *
  • Llama?? Ain't that French for tanks?
Re:confused
« Reply #1 on: 06 Dec 2004, 17:40:57 »
You will get a problem with the Fired EH as that will activate when the unit fires, not when it's fired upon.  But if you haven't got any enemies on the map it can't be that causing the immediate problem.

The script command in the EH also wants to be in {}

There are other issues with the syntax of the _this function in the script which need checking, but I'm being chucked out of the office imminently . . .

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:confused
« Reply #2 on: 06 Dec 2004, 20:54:30 »
Check the syntax in the comref.    I think there are some Comments on the online version which you might find helpful.

If the script is being called without the unit firing or being hit, then it is probably being called from somewhere else.    Check for forgotten test units and triggers.

"null" is a term used by the game engine so I wouldn't recommend using it for anything else, including a script name.   It shouldn't be a problem, but this is OFP ...

Plenty of reviewed ArmA missions for you to play