Home   Help Search Login Register  

Author Topic: This is strange  (Read 485 times)

0 Members and 1 Guest are viewing this topic.

gadolinite

  • Guest
This is strange
« on: 04 Nov 2004, 21:50:45 »
 ::) What I am doing here works a little, but barely.  I want to add an action to the action menu when a player gets in a chopper.  I want to remove it when the player gets out.  The process can repeat itself over again.

here is what I did:

I have a switch trigger that activates repeditly.

condition:
player in chopper

on activation:
act = player addaction ["Fly to LZ", "lzmove.sqs"]

on deactivation:
player removeaction act; act = nil ;destructor code

Offline C0LDSt33L

  • Members
  • *
  • Member of the SotM Team
Re:This is strange
« Reply #1 on: 04 Nov 2004, 22:09:13 »
Hmm perhaps you could try putting that into a script eg

#Check

?(player in chopper):goto "Move"

player removeaction act; act = nil ;destructor code

~5

goto "Check"

#Move

act = player addaction ["Fly to LZ", "lzmove.sqs"]

~5

goto "Check"

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:This is strange
« Reply #2 on: 04 Nov 2004, 22:57:14 »
does it just keep adding the action to you menu until you have about 50 of the same action?

I've had that happen before
instead of getting rid of the action on the deactivation of the trigger, try doing it in your script, it worked for me, unless it was really something else that i did without knowing....

it would help a lot if you specified how it is just barely working, we cant help you if we dont know the problem  :moon:

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:This is strange
« Reply #3 on: 05 Nov 2004, 02:21:32 »
What is the problem?
Plenty of reviewed ArmA missions for you to play

gadolinite

  • Guest
Re:This is strange
« Reply #4 on: 05 Nov 2004, 22:37:57 »
     The script is an infinate loop and continuiousluy adds the same action.

     The "This is Strange" part means when the player gets in the chopper the action does not appear but does appear when the player gets out.  It occasionaly appears when the player gets in but usually not.  Whats happening with this inverting like effect?

The chopper is a blackhawk.

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:This is strange
« Reply #5 on: 05 Nov 2004, 22:44:02 »
Try adding the action to the chopper once the player is in. When a unit board a vehicle he becomes it  :o so, maybe the action needs to be added to the vehicle.
Not all is lost.