Jump to content

Arena Cell Reset Script Problems


theSandanimal

Recommended Posts

I'm working on a reset script for an arena interior. Right now its just one enemy and a large open room with a dwarven button that is the reset activator.

 

Here is the script---

 

Actor Property PlayerREF Auto
Cell Property ArenaCell Auto
Sound Property QSTAstrolabeButtonPressX Auto

Event OnCellAttach()
PlayAnimation("Open")
EndEvent


Event OnActivate(ObjectReference akActionRef)
If akActionRef == PlayerREF
PlayAnimationAndWait("Trigger01", "done")
If QSTAstrolabeButtonPressX
QSTAstrolabeButtonPressX.Play(Self)
EndIf
ArenaCell.Reset() ;cell reset part
EndIf
EndEvent

 

I'm not sure what's wrong the script compiles and saves but fails in game. I know there are Arena mods out there but haven't been able to find any script examples of how it works. Looking for this to be a fairly simple arena, basically just hit the button and fight a random enemy while some people watch. If anyone can tell me where I went wrong with this that would be great!

Link to comment
Share on other sites

Hi,

When you say it fails, you mean the cell doesn't reset when you hit the button while standing in the cell?

Going from reading at http://www.creationkit.com/Cell_Reset and my limited understanding the cell won't reset until the player leaves and re-enters the cell even after calling the cell reset.

 

I gather after pressing the button you could move the player to another cell and back again.

press button, move player to different cell, call reset on arena cell, move the player back to arena cell.

Sorry if you already knew that and it wasn't the problem you were having.

 

 

Link to comment
Share on other sites

Well I was aware of that and at one point I tested it by placing the reset button outside of the arena cell which didn't work either. I think that should have been a good way to test it but I did not think about adding a forced teleport to another cell and back again.

 

Edit: Just tried doing that and it did not work :/ was thinking of putting in a game wait time function to it as well, but I think if i make a button that just forces the character to wait a month (or however long it is for a reset) it would reset everything in the world besides the actual quest storylines

Edited by theSandanimal
Link to comment
Share on other sites

Found a way around this, however my cell does not reset. It just spawns an actor at an xmarker heading and starts combat

 

Cell Property ArenaCell Auto
Sound Property QSTAstrolabeButtonPressX Auto
ActorBase Property ArenaChampion Auto
ObjectReference Property ArenaChampionSpawnPoint Auto


Event OnCellAttach()
PlayAnimation("Open")
EndEvent


Event OnActivate(ObjectReference akActionRef)
PlayAnimationAndWait("Trigger01", "done")
If QSTAstrolabeButtonPressX
QSTAstrolabeButtonPressX.Play(Self)
EndIf
ArenaChampionSpawnPoint.PlaceActorAtMe(ArenaChampion, 3).StartCombat(Game.GetPlayer())
EndEvent

Link to comment
Share on other sites

  • Recently Browsing   0 members

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