Page 1 of 1

Question about control consoles

Posted: Sun Jul 31, 2011 3:58 pm
by baumerindustries
Hi, please note I'm german.
Maybe you have played the Battle-Arena 2.0 and there are control consoles, which alow you to make some things appear like at the pool. My question:
I want to make this for a space map, so you shoot at a console and then there apears a barrier, which closes the hangar. If you shoot again at it the barrier is away. I know it doesn't look good but I want it like this.
Hope you understand what I mean

Re: Question about control consoles

Posted: Mon Aug 01, 2011 4:28 pm
by Bob
open the map in ZE, place the given door inside the ship (somewhere where it can't be seen), make a animation for it (how to is in the documentation), then place your console somewhere and add to your LUA:

Code: Select all

             OnObjectKill(
    function(object, killer)
    if GetEntityName(object) == "OBJECTNAME" then
    PlayAnimation("ANIMGROUPNAME")
    end
    end
    )
replace the OBJECTNAME with the name of your console and ANIMGROUPNAME with the name of the door's animgroupname.
I just don't know how to make this the other way around again...

Re: Question about control consoles

Posted: Mon Aug 01, 2011 4:58 pm
by DarthD.U.C.K.
use "OnObjectRepair" for the other way arund, the syntax is the same
by the way, here is a topic discussing exactly what you asked for: Trigger animation on destruction of object? (FAQ)
it cant be just found by searching, its linked in the everythingyouneedthread aswell.

Re: Question about control consoles

Posted: Mon Aug 01, 2011 5:07 pm
by baumerindustries
is there anywhere a tutorial about animationgroups? thx for the rest

Re: Question about control consoles

Posted: Mon Aug 01, 2011 7:07 pm
by AQT

Re: Question about control consoles

Posted: Tue Aug 02, 2011 2:53 am
by baumerindustries
sorry all, but there are so many topics...
ok thank you for your help

Re: Question about control consoles

Posted: Tue Aug 02, 2011 4:23 am
by DarthD.U.C.K.
baumerindustries wrote:sorry all, but there are so many topics...
that is the reason for the everythingyouneedthread - it is a list of the most important problems and explanations so that you dont have to search manually for them.

Re: Question about control consoles

Posted: Tue Aug 02, 2011 12:03 pm
by baumerindustries
Do Animations work when they only take 0.01 sec?

Re: Question about control consoles

Posted: Tue Aug 02, 2011 12:31 pm
by Bob
you could take the pop transistion instead of the linear transition, but this should work, too.
why are you not making a normal doorclose anim?

Re: Question about control consoles

Posted: Tue Aug 02, 2011 2:06 pm
by baumerindustries
i dont know normal door Animations. so this is.p the only thing i thought of as the Idea came to me. could you explain your way or give me a link?

Re: Question about control consoles

Posted: Tue Aug 02, 2011 2:17 pm
by Bob
what did you animate yet and wich ship and wich door are you using?

Re: Question about control consoles

Posted: Tue Aug 02, 2011 2:28 pm
by baumerindustries
this is MY first Animation and i use the cis ship and the spa_prop_cisdoor

Re: Question about control consoles

Posted: Tue Aug 02, 2011 2:35 pm
by DarthD.U.C.K.
bob meant with "normal door animation" that the doorparts move to the side like automatic doors opposed to something moving just 0.01 seconds.

Re: Question about control consoles

Posted: Tue Aug 02, 2011 2:47 pm
by baumerindustries
i want it like this:
you shoot at the Console.
the hangar doors appears
you repair it , the door disappears.
I hide it in the capital ship while Its unused.

Re: Question about control consoles

Posted: Tue Aug 02, 2011 2:56 pm
by DarthD.U.C.K.
if you want the door simply to disappear you can "kill" it when the console is destroyed, instead of "Playanimation" you would use "KillObject("doorname)"
in order to be able to kill the door, you have to give it "destructablebuilding" as class label in the odf and a maxhealth.

Re: Question about control consoles

Posted: Tue Aug 02, 2011 3:11 pm
by baumerindustries
oh thx that makes it a lot easier. ok thank you you two!