Home   Help Search Login Register  

Author Topic: Animating a Fencegate.  (Read 1404 times)

0 Members and 1 Guest are viewing this topic.

Offline Landdon

  • Members
  • *
Animating a Fencegate.
« on: 03 Jan 2009, 22:14:25 »
Hello all,

I am building a mission and I was hoping for a little help.  I am not an expert and I seem to learn best by demostration, so please bear with me.  What I'm attempting to do is have the wire fence gate animate (open and close) and this action only be accomplished by named Team Leaders (Talon1 and Talon2), as I have built a "stockade."  So can the fence gate by animated?  I have been successful in animating the Bargate, as I use a trigger which detects the presence of a blufor unit.  If it cannot be animated, is there another way to open and close the compound that I could use?  Say for example, slide the gate to one direction or another and then back to it's orginal spot? And could you provide me with an example or script that I could use and learn from?  Thank you.
« Last Edit: 03 Jan 2009, 22:16:47 by Landdon »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Animating a Fencegate.
« Reply #1 on: 03 Jan 2009, 22:56:51 »
Only if player is Talon1 or Talon2 you addAction to the fence to open/close so only these two can see the action. The action sets globalvar named open_close_gate to true (for open).

SetUp a trigger to open/close the game with continuos check for a globalvar named open_close_gate. When set to true, the activation executes a script to open the game using setPos, this script executed by the trigger is executed everywhere.
Inside the script you check if the gate is local, if so, you move it with setPos.
Inside the script you check if Talon1 or Talon2 are local, if so, you remove previous action and add the action to close the gate, this action should have a script that sets open_close_gate to false.
In the deactivation field of the trigger you set the same script as for open, but with an argument set to false, to indicate you want to close it.


Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: Animating a Fencegate.
« Reply #2 on: 04 Jan 2009, 03:28:16 »
I am confused with your question. I do not know if you want a fence to dissapear/appear or have the bar gate (for traffic) move up and down only when Talon1 and 2 are present.
TS3 IP: tor.zebgames.com:9992