Jump to content

Enabling/Disabling Actor


Recommended Posts

I should know how to do this but it is escaping me. What I want is for a dead elk to fall out of the sky when player enters triggerbox. I've set up triggerbox, have an elk (start dead) above the triggerbox and I'm using a simple ObjectReference Property to select the elk actor and enable it when... well here's the script.

 

Actor Property PlayerREF Auto
ObjectReference Property EnObj01 Auto

 

EVENT onTriggerEnter(ObjectReference akActionRef)
if akActionRef == PlayerRef
EnObj01.enable()

Endif

Endevent

Link to comment
Share on other sites

If your scene is in an exterior cell and the actor is at a high that exceeds the cell's borders - limits of which the game engine starts rendering actors, then your actor will never appear in your scene. This also applies for the Havoc that your actor needs for it to fall from the sky

Do not compare this to dragons, they work completely different from animals.

Edited by maxarturo
Link to comment
Share on other sites

I've placed the elk at various levels even ground level. Maybe it's the script. What I posted above is a part of the script. I made the script with multiple enable/disable object references so I could use it in many scenarios. Instead of having a script that enables/disables 1 object then another for 2 objects and so on this script, worked in the past, should work in al cases.

 

Actor Property PlayerREF Auto
ObjectReference Property EnObj01 Auto
ObjectReference Property EnObj02 Auto
ObjectReference Property EnObj03 Auto
ObjectReference Property EnObj04 Auto
ObjectReference Property EnObj05 Auto
ObjectReference Property DisObj01 Auto
ObjectReference Property DisObj02 Auto
ObjectReference Property DisObj03 Auto
ObjectReference Property DisObj04 Auto
ObjectReference Property DisObj05 Auto

EVENT onTriggerEnter(ObjectReference akActionRef)
if akActionRef == PlayerRef
EnObj01.enable()
EnObj02.enable()
EnObj03.enable()
EnObj04.enable()
EnObj05.enable()

; objects to disable

DisObj01.disable()
DisObj02.disable()
DisObj03.disable()
DisObj04.disable()
DisObj05.disable()

endif
ENDEVENT

 

Link to comment
Share on other sites

Did you fill the "PlayerREF" ? if you did, then i can't think of something else right now, exept that your set up is wrong (you maight have missed - messed something).

Link to comment
Share on other sites

The Elk should have in its reference properties only "Initialy Disable" and "Start Dead", if is not working then try : 1) Delete your current Elk and place an other one in its place. 2) Try different hight levels.

Link to comment
Share on other sites

Ok, what's happening is that checking InitiallyDisabled and StartDead disables havok on the actor, I have run havok on the actor in CK and it falls. When actor is enabled in game havok doesn't run on it. Shooting it with a bow starts havok.

There's a script I'm sure I used a long time ago that forces havok to run. It was a OnCellLoad script but I need a script that runs OnTriggerEnter, enables actor and runs havok on it. Can you help please?

 

BTW - Does your mod XamMax….. work on SE? It looks good.

Link to comment
Share on other sites

If that's actually what's going on, then this needs outside of the box thinking because there is absolutely nothing in "creationkit.com" about how to script a force run Havok, and after seeing the "defaultDisableHavokOnLoad" which is the only vanilla script that uses Havok, to make this work will need some testing since i haven't scripted anything with Havok or i was aware about this issue.


Now, you can do this with three ways :

1) Placed a COLLISION BOX under the dead elk which is in a enable state (the elk) and 'OnTriggerEnter" DISABLE the COLLISION BOX.

2) Place an alive "Initialy Disable" elk and 0.2 sec after it gets enable kill it.

3) Place your "Initialy Disable" & "Start Dead" elk and place near it an xMarker which will cast a spell (projectile) after the elk gets in a enable state.


............................................................................................................



XamMaximus secret is my first mod after some years of modding absences, is a simple mod that uses only Skyrim assets, it has no custom textures - meshes - scripts and is an introduction to the mod i'm working right now.

I don't own a copy of SSE so i don't know if it will run on it.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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