Home   Help Search Login Register  

Author Topic: Chopper follows commands after riding in it  (Read 1728 times)

0 Members and 1 Guest are viewing this topic.

Offline Case

  • Members
  • *
Chopper follows commands after riding in it
« on: 28 Jun 2007, 00:07:17 »
I am doing final (hopefully) bug testing on my mission, and I have one that is repeatable and kind of a pain.

I have two MH-6 insert the squad anywhere on the map.  Once I (squad leader) exit the chopper and start assigning move commands to my team members, the chopper (whichever one I rode in) follows them.

I have in the script for it to return to base and land, then I remove it's fuel.  So, if it gets to base, then there is no problem.

I tried to fix this by using:

Code: [Select]
[_MH6] join grpNull
But this doesn't seem to help.  I call the grpNull command after everyone has left the chopper.

Any ideas?

If it would help, I can post the entire script.

Cheers!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Chopper follows commands after riding in it
« Reply #1 on: 28 Jun 2007, 00:21:07 »
Code: [Select]
[driver _MH6] join grpNull

Offline Case

  • Members
  • *
Re: Chopper follows commands after riding in it
« Reply #2 on: 28 Jun 2007, 18:12:29 »
Excellent, thanks Mandoble.

I just finished testing though, and it looks like that wasn't my problem.

What looks like is happening, is for some reason when I click on the map after the insertion is done, it seems to call my insertion script again.  Not sure if this is a bug with 'onmapsingleclick' or a problem with my script.

For now, I am just going to use a global variable, and set it to true if the script has been run, then check for that variable at the start of the script, not very elegant, but hopefully it should work.

Cheers!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Chopper follows commands after riding in it
« Reply #3 on: 28 Jun 2007, 18:33:31 »
and it looks like that wasn't my problem.

So, if after the insertion you DO NOT click the map again, the chopper still keeps following you?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Chopper follows commands after riding in it
« Reply #4 on: 28 Jun 2007, 18:54:26 »
Isn't it necessary to switch off onMapSingleClick after using it to avoid this?

For example:

onMapSingleClick {group2 move _position2; leader grp2 sidechat "On my way"; variable1 = true; onMapSingleClick {}}

The bold part being the switch off...I hope    :D


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

Offline Case

  • Members
  • *
Re: Chopper follows commands after riding in it
« Reply #5 on: 28 Jun 2007, 20:06:10 »
Mandoble,

Yes, that's correct. If I click in 3d view and order troops around it doesn't follow me now.

Planck,

For disabling the onMapSingleClick command, I actually have another script that calls this command (for a Harrier airstrike).  Will disabling it in the first 'insertion' script only disable it in that script, so it will still be available for the airstrike call?

Cheers!

Offline Nixer6

  • Members
  • *
Re: Chopper follows commands after riding in it
« Reply #6 on: 29 Jun 2007, 19:37:53 »
From my experience, everytime you execute the OnMapSingleClick command it stays active until you stop it with

OnMapSingleClick "";

The next time you execute the command it starts all over again and will have to be deactivated again.

Code: [Select]
///an example
OnMapSingleClick "your code";

//stop reading map clicks

OnMapSingleClick "";

//new stuff

OnMapSingleClick "new code";

//stop reading map clicks again

OnMapSingleClick "";



and I know you aren't using OnMapSingleClick {} in ArmA...or it wouldn't work at all.

FWIW
Why do I have to be a Rocket Scientist to make a good mission?

Offline Case

  • Members
  • *
Re: Chopper follows commands after riding in it
« Reply #7 on: 30 Jun 2007, 00:03:40 »
Thanks Nixer, I was hoping it behaved like that.

And, ya, I already battled the whole {} vs. "" thing.

:)

Cheers!