Jump to content

[LE] My enabloe objects script enables two of the same objects


capngagi

Recommended Posts

Scriptname aaaaMarkarthRiyixSpawn extends ObjectReference

Event OnTriggerEnter(ObjectReference akActionRef)

If akActionRef == Game.GetPlayer()

aaaMarkarthRiyixProperty1.Enable()
aaaMarkarthRiyixProperty2.Enable()
aaaMarkarthRiyixProperty3.Enable()
aaaMarkarthRiyixProperty4.Enable()
aaaMarkarthRiyixProperty5.Enable()
aaaMarkarthRiyixProperty6.Enable()
aaaMarkarthRiyixProperty7.Enable()
aaaMarkarthRiyixProperty8.Enable()
aaaMarkarthRiyixProperty9.Enable()
aaaMarkarthRiyixProperty10.Enable()
aaaMarkarthRiyixProperty11.Enable()
aaaMarkarthRiyixProperty12.Enable()
aaaMarkarthRiyixProperty13.Enable()
aaaMarkarthRiyixProperty14.Enable()
aaaMarkarthRiyixProperty15.Enable()
aaaMarkarthRiyixProperty16.Enable()
aaaMarkarthRiyixProperty17.Enable()
aaaMarkarthRiyixProperty18.Enable()
aaaMarkarthRiyixProperty19.Enable()
aaaMarkarthRiyixProperty20.Enable()
aaaMarkarthRiyixProperty21.Enable()
aaaMarkarthRiyixProperty22.Enable()
aaaMarkarthRiyixProperty23.Enable()
aaaMarkarthRiyixProperty24.Enable()
aaaMarkarthRiyixProperty25.Enable()
aaaMarkarthRiyixProperty26.Enable()
aaaMarkarthRiyixProperty27.Enable()
aaaMarkarthRiyixProperty28.Enable()
aaaMarkarthRiyixProperty29.Enable()
aaaMarkarthRiyixProperty30.Enable()
aaaMarkarthRiyixProperty31.Enable()
aaaMarkarthRiyixProperty32.Enable()
aaaMarkarthRiyixProperty33.Enable()
aaaMarkarthRiyixProperty34.Enable()
aaaMarkarthRiyixProperty35.Enable()
aaaMarkarthRiyixProperty36.Enable()
aaaMarkarthRiyixProperty37.Enable()
aaaMarkarthRiyixProperty38.Enable()
aaaMarkarthRiyixProperty39.Enable()
aaaMarkarthRiyixProperty40.Enable()
aaaMarkarthRiyixProperty41.Enable()
aaaMarkarthRiyixProperty42.Enable()
aaaMarkarthRiyixProperty43.Enable()
aaaMarkarthRiyixProperty44.Enable()
aaaMarkarthWeedProperty1.Enable()
aaaMarkarthWeedProperty2.Enable()
aaaMarkarthWeedProperty3.Enable()
aaaMarkarthWeedProperty4.Enable()
aaaMarkarthWeedProperty5.Enable()
aaaMarkarthWeedProperty6.Enable()
aaaMarkarthMushroomProperty1.Enable()
aaaMarkarthMushroomProperty2.Enable()
aaaMarkarthMushroomProperty3.Enable()
aaaMarkarthMushroomProperty4.Enable()
aaaMarkarthMushroomProperty5.Enable()
aaaMarkarthMushroomProperty6.Enable()
aaaMarkarthMushroomProperty7.Enable()
aaaMarkarthMushroomProperty8.Enable()
aaaMarkarthMushroomProperty9.Enable()
aaaMarkarthMushroomProperty10.Enable()


EndIf

EndEvent



Actor Property aaaMarkarthRiyixProperty1 Auto

Actor Property aaaMarkarthRiyixProperty2 Auto

Actor Property aaaMarkarthRiyixProperty3 Auto

Actor Property aaaMarkarthRiyixProperty4 Auto

Actor Property aaaMarkarthRiyixProperty5 Auto

Actor Property aaaMarkarthRiyixProperty7 Auto

Actor Property aaaMarkarthRiyixProperty6 Auto

Actor Property aaaMarkarthRiyixProperty8 Auto

Actor Property aaaMarkarthRiyixProperty9 Auto

Actor Property aaaMarkarthRiyixProperty10 Auto

Actor Property aaaMarkarthRiyixProperty11 Auto

Actor Property aaaMarkarthRiyixProperty12 Auto

Actor Property aaaMarkarthRiyixProperty13 Auto

Actor Property aaaMarkarthRiyixProperty14 Auto

Actor Property aaaMarkarthRiyixProperty15 Auto

Actor Property aaaMarkarthRiyixProperty16 Auto

Actor Property aaaMarkarthRiyixProperty17 Auto

Actor Property aaaMarkarthRiyixProperty18 Auto

Actor Property aaaMarkarthRiyixProperty19 Auto

Actor Property aaaMarkarthRiyixProperty20 Auto

Actor Property aaaMarkarthRiyixProperty21 Auto

Actor Property aaaMarkarthRiyixProperty22 Auto

Actor Property aaaMarkarthRiyixProperty23 Auto

Actor Property aaaMarkarthRiyixProperty24 Auto

Actor Property aaaMarkarthRiyixProperty25 Auto

Actor Property aaaMarkarthRiyixProperty26 Auto

Actor Property aaaMarkarthRiyixProperty27 Auto

Actor Property aaaMarkarthRiyixProperty28 Auto

Actor Property aaaMarkarthRiyixProperty29 Auto

Actor Property aaaMarkarthRiyixProperty30 Auto

Actor Property aaaMarkarthRiyixProperty31 Auto

Actor Property aaaMarkarthRiyixProperty32 Auto

Actor Property aaaMarkarthRiyixProperty33 Auto

Actor Property aaaMarkarthRiyixProperty34 Auto

Actor Property aaaMarkarthRiyixProperty35 Auto

Actor Property aaaMarkarthRiyixProperty36 Auto

Actor Property aaaMarkarthRiyixProperty38 Auto

Actor Property aaaMarkarthRiyixProperty37 Auto

Actor Property aaaMarkarthRiyixProperty39 Auto

Actor Property aaaMarkarthRiyixProperty40 Auto

Actor Property aaaMarkarthRiyixProperty41 Auto

Actor Property aaaMarkarthRiyixProperty42 Auto


Actor Property aaaMarkarthRiyixProperty43 Auto

Actor Property aaaMarkarthRiyixProperty44 Auto

ObjectReference Property aaaMarkarthWeedProperty3 Auto


ObjectReference Property aaaMarkarthWeedProperty1 Auto

ObjectReference Property aaaMarkarthWeedProperty4 Auto

ObjectReference Property aaaMarkarthWeedProperty2 Auto

ObjectReference Property aaaMarkarthMushroomProperty1 Auto

ObjectReference Property aaaMarkarthMushroomProperty2 Auto

ObjectReference Property aaaMarkarthMushroomProperty3 Auto

ObjectReference Property aaaMarkarthMushroomProperty4 Auto

ObjectReference Property aaaMarkarthMushroomProperty5 Auto

ObjectReference Property aaaMarkarthMushroomProperty6 Auto

ObjectReference Property aaaMarkarthMushroomProperty7 Auto

ObjectReference Property aaaMarkarthMushroomProperty8 Auto

ObjectReference Property aaaMarkarthMushroomProperty9 Auto

ObjectReference Property aaaMarkarthMushroomProperty10 Auto

ObjectReference Property aaaMarkarthWeedProperty5 Auto

ObjectReference Property aaaMarkarthWeedProperty6 Auto

 

I expect it to enable one of each object/actor and it does outside of understone keep.

Link to comment
Share on other sites

I will assume that all of these objects / actors are pre-placed. Have you checked to ensure that each placed instance is actually different and not using the same base record? If it is not that, did you duplicate records when making them and forgot to go back to one of them to change the appearance?

 

And I would suggest using a formlist as that would allow you to expand the number of things to enable without having to modify the script. You would create a formlist record, drag and drop the pre-placed instances from the cell view window into the formlist and then use a script similar to the following

 

 

Scriptname aaaaMarkarthRiyixSpawn extends ObjectReference
 
Formlist Property aaaaMarkarthEnableList Auto

Event OnTriggerEnter(ObjectReference akActionRef)
  If akActionRef == Game.GetPlayer()
    Int index = 0
    While index < aaaaMarkarthEnableList.GetSize()
      ObjectReference EntryObj = aaaaMarkarthEnableList.GetAt(index)
      EntryObj.Enable()
      index += 1
    EndWhile
  EndIf
EndEvent

 

 

 

If you do not want to use a formlist, you can place a single xMarker and link all the other objects / actors to the xMarker with the xMarker as their enable state parent. Set everything as initially disabled and then when you enable the xMarker everything will enable with it. For that the script would be even more simple:

 

 

Scriptname aaaaMarkarthRiyixSpawn extends ObjectReference
 
ObjectReference Property myXMarker Auto
 
Event OnTriggerEnter(ObjectReference akActionRef)

  If akActionRef == Game.GetPlayer()
    myXMarker.Enable()
  EndIf
EndEvent

 

 

 

 

But neither of those suggestions will help with your duplicate issue. You need to delve deeper and make sure throughout all stages that you are not accidentally using the same object twice or two separate objects with an identical appearance.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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