Jump to content

Recommended Posts

Posted

So I have been trying to research how to activate objects such as the ImpPortGateFortExt (a door-like gate that, when activated, shoots up poles to block entry/exit).

 

However, the "activate" script does not work. Here is an example of what I'm trying to accomplish:

Scriptname CV2_DracOrbTrap_BossActivator extends ObjectReference  

Activator Property ImpPortGateFortExt Auto

Event SomeEvent    ;in my case, I'm using a container and once the container is accessed, the gate is supposed to close and trap the player

ImpPortGateFortExt.Activate()

EndEvent

I'm having the same problem with the "PlayAnimation" script, which doesn't compile as well. If anyone can point me in the right direction I would appreciate it. I think I need to define a function for both but I can't find any info on it. Thanks in advance.

Posted

I guess I should add that the error I'm getting when I try to compile is:

 

"Activate is not a function or does not exist"

 

I know the answer is probably very easy and only requires a quick response. I would appreciate any input.

Posted
  On 1/26/2019 at 12:23 AM, Ghaunadaur said:

It should be ObjectReference Propery which points to the reference of the gate in the world.

 

And yes, PlayAnimation is the right function to use here.

Could you show me an example of the function? I'm having trouble finding examples on how to define it.

Posted (edited)

Here is a vanilla example:

scriptName defaultButtonSCRIPT extends ObjectReference
{quick script for a button object.}

bool property useOnce = FALSE auto
{Can be used only once? Default: FALSE}

auto STATE active
     EVENT OnActivate(ObjectReference actronaut)
          ;playAnimationandWait("down")
          PlayAnimation("down")
          gotoState("inactive")
          Activate(self as ObjectReference)
          PlayAnimation("up")
          gotoState("active")
     endEVENT
endSTATE

STATE inactive
     ; do nothing in this state
endSTATE

int Property TriggerType  Auto 

This script is ON the activator, btw. (casting here is not necessary)

Edited by Rasikko
Posted

PlayAnimation

This would close the gate when activating the container (script is on the container ref)

Scriptname CV2_DracOrbTrap_BossActivator extends ObjectReference  

ObjectReference Property ImpPortGateFortExtRef Auto


Event OnActivate(ObjectReference akActionRef)

	ImpPortGateFortExtRef.PlayAnimation("close")

EndEvent
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...