Jump to content

Can Idle markers can be enabled and disabled ?


Agnot2006

Recommended Posts

Does anybody know if Idle markers can be enabled and disabled. I have tried this script which does not work. I want to be able to enable my new Idles at specific times to make area seem more natural. I also want them to be used by any visiting Companions without changing any Individuals AI, just the normal sandbox. I have seen it done with trigger boxes, but I thought if possible idle markers would be easier to place and move about.

Can anyone help?

 

CODE

scn DisableAImarkerScript

 

short Toggle

short Dofirst

 

begin gamemode

if gamehour >= 0 && Gamehour <= 18 && Dofirst=0

Set Toggle to 1

Endif

Set Dofirst to 1

 

end

 

begin gamemode

if gamehour >= 0 && Gamehour <= 18 && Toggle=1

aaAIdanceMarke.disable

Set Toggle to 0

elseif

gamehour > 18 && Toggle=0

aaAIdanceMarke.enable

Set Toggle to 1

endif

 

end

Link to comment
Share on other sites

Unless you enter the cell with that code between 12:01 am and 5:59 pm, the first part will never run as you are setting Dofirst to 1 every frame. If all you want to do is enable and disable your idle markers then try this out:

 

scn DisableAImarkerScript


begin gamemode
if gamehour >= 0 && Gamehour <= 18
	if aaAIdanceMarke.getdisabled == 0
		aaAIdanceMarke.disable
	endif
else
	if aaAIdanceMarke.getdisabled
		aaAIdanceMarke.enable
	endif
endif

end

Of course this will only work on a single Idle Marker whos Editor Reference ID is "aaAIdancemarke" and the idle marker in question must be set to be persistent in order to use its editor ref ID in a script.

Link to comment
Share on other sites

Unless you enter the cell with that code between 12:01 am and 5:59 pm, the first part will never run as you are setting Dofirst to 1 every frame. If all you want to do is enable and disable your idle markers then try this out:

 

scn DisableAImarkerScript


begin gamemode
if gamehour >= 0 && Gamehour <= 18
	if aaAIdanceMarke.getdisabled == 0
		aaAIdanceMarke.disable
	endif
else
	if aaAIdanceMarke.getdisabled
		aaAIdanceMarke.enable
	endif
endif

end

Of course this will only work on a single Idle Marker whos Editor Reference ID is "aaAIdancemarke" and the idle marker in question must be set to be persistent in order to use its editor ref ID in a script.

 

Thank you for that.

Do you know if idle markers can be enabled and disable like this, or even if the script works am I wasting my time trying to turn them off and on?

Link to comment
Share on other sites

As long as the AI is working it should work. If for some reason it doesn't work, you could always do something like:

 

aaAIdanceMarke.moveto Z -30000

 

to disable or

 

aaAIdanceMarke.moveto Z 2345

 

to enable (assuming the marker is at 2345 to begin with).

 

That’s a good alternative I hadn’t thought of, I will give it a try if the other Script doesn’t work.

 

Thank you

Link to comment
Share on other sites

Do you know if idle markers can be enabled and disable like this, or even if the script works am I wasting my time trying to turn them off and on?

 

As far as I know, yes. You should be able to disabel/enable anything with an ID in the game (not land or non-placeable water or the like). That said, I have not tested it myself.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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