Mannequin six Change script

Post » Sat Nov 17, 2012 9:39 am

I am trying to write up a script that will change the gender of a set of nine mannequins, activated currently by a pull chain in the furniture warehouse. I've only got the one mannequin set up at the moment to test with but I can't get the script to compile.

Spoiler
Scriptname rayMansixChange extends Activator
{Changes the six of the associated mannequin(s).}

ObjectReference Property mannequin1 Auto
;ObjectReference Property mannequin2 Auto
;ObjectReference Property mannequin3 Auto
;ObjectReference Property mannequin4 Auto
;ObjectReference Property mannequin5 Auto
;ObjectReference Property mannequin6 Auto
;ObjectReference Property mannequin7 Auto
;ObjectReference Property mannequin8 Auto
;ObjectReference Property mannequin9 Auto

ActorBase Mann1Base = mannequin1.GetBaseObject() as ActorBase
;ActorBase Mann2Base = mannequin2 as ActorBase
;ActorBase Mann3Base = mannequin3 as ActorBase
;ActorBase Mann4Base = mannequin4 as ActorBase
;ActorBase Mann5Base = mannequin5 as ActorBase
;ActorBase Mann6Base = mannequin6 as ActorBase
;ActorBase Mann7Base = mannequin7 as ActorBase
;ActorBase Mann8Base = mannequin8 as ActorBase
;ActorBase Mann9Base = mannequin9 as ActorBase

Event OnActivate(ObjectReference akActionRef)
If Mann1Base.Getsix() == 1
mannequin1.sixChange(0)
ElseIf Mann1Base.Getsix() == 0
mannequin1.sixChange(1)
EndIf

; If mannequin2.Getsix() == 1
; mannequin2.sixChange(0)
; ElseIf mannequin2.Getsix() == 0
; mannequin2.sixChange(1)
; EndIf

; If mannequin3.Getsix() == 1
; mannequin3.sixChange(0)
; ElseIf mannequin3.Getsix() == 0
; mannequin3.sixChange(1)
; EndIf

; If mannequin4.Getsix() == 1
; mannequin4.sixChange(0)
; ElseIf mannequin4.Getsix() == 0
; mannequin4.sixChange(1)
; EndIf

; If mannequin5.Getsix() == 1
; mannequin5.sixChange(0)
; ElseIf mannequin5.Getsix() == 0
; mannequin5.sixChange(1)
; EndIf

; If mannequin6.Getsix() == 1
; mannequin6.sixChange(0)
; ElseIf mannequin6.Getsix() == 0
; mannequin6.sixChange(1)
; EndIf

; If mannequin7.Getsix() == 1
; mannequin7.sixChange(0)
; ElseIf mannequin7.Getsix() == 0
; mannequin7.sixChange(1)
; EndIf

; If mannequin8.Getsix() == 1
; mannequin8.sixChange(0)
; ElseIf mannequin8.Getsix() == 0
; mannequin8.sixChange(1)
; EndIf

; If mannequin9.Getsix() == 1
; mannequin9.sixChange(0)
; ElseIf mannequin9.Getsix() == 0
; mannequin9.sixChange(1)
; EndIf

EndEvent

The errors when I try to compile show up as:

Spoiler
Starting 1 compile threads for 1 files...
Compiling "rayMansixChange"...
f:\program files\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\rayMansixChange.psc(14,22): no viable alternative at input 'mannequin1'
f:\program files\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\rayMansixChange.psc(14,32): required (...)+ loop did not match anything at input '.'
f:\program files\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\rayMansixChange.psc(14,10): Unknown user flag mannequin1
No output generated for rayMansixChange, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
User avatar
Margarita Diaz
 
Posts: 3511
Joined: Sun Aug 12, 2007 2:01 pm

Post » Fri Nov 16, 2012 7:04 pm

Sadly, it appears sixChange() is a CONSOLE ONLY command ... you can't use it in papyrus :(

(unless someone has a workaround ... or SKSE has a function?? Anyone know??)
User avatar
Beat freak
 
Posts: 3403
Joined: Thu Dec 14, 2006 6:04 am

Post » Sat Nov 17, 2012 4:19 am

the only way to script it is to use 2 mannequin base actors (one male one female) then switch between the 2
User avatar
Marta Wolko
 
Posts: 3383
Joined: Mon Aug 28, 2006 6:51 am

Post » Fri Nov 16, 2012 8:01 pm

female mannequin base actor?

Is this an actor NPC type being used as a mannequin, or is there a mannequin object I missed somewhere :)
User avatar
Symone Velez
 
Posts: 3434
Joined: Thu Sep 07, 2006 12:39 am

Post » Sat Nov 17, 2012 11:06 am

When I was experimenting with mannequins for the shops in my mods, I tried my own female ones by making a new actor with the mannequin race, but when I set it to female, the head was a normal nord female head, rather then the wooden mannequin one

I'm not sure the default mannequin race was set up for the possibility of female mannequins. I may have been doing something wrong though

- Hypno
User avatar
Honey Suckle
 
Posts: 3425
Joined: Wed Sep 27, 2006 4:22 pm

Post » Fri Nov 16, 2012 8:51 pm

I think there is at least one mod that has female mannequins . Not the frozen actor style.. They might have interesting clues on how to do this.
User avatar
Benji
 
Posts: 3447
Joined: Tue May 15, 2007 11:58 pm

Post » Sat Nov 17, 2012 10:24 am

it would be the same as creating a new race, if you want to include the female mannequin with a wooden head (i.e. creating head parts and texture sets and assigning permissions with formlists). check out some of the race tutorials on how to do this

if you dont want to edit the vanilla manakin race (i.e. just make the female-changable mannequin for your own mod only) you can just duplicate the manakinrace and add the relevent parts for the female. then create new baseactors for male and female using your new race
User avatar
Nancy RIP
 
Posts: 3519
Joined: Mon Jan 29, 2007 5:42 am

Post » Fri Nov 16, 2012 8:18 pm

I agree with Amethyst... and don't forget to control-F4 that actor, otherwise the head meshes may not appear in-game correctly. (that's what it sounds like is happening, especially if you DID manually assign the correct head mesh)
User avatar
Kanaoka
 
Posts: 3416
Joined: Fri Jun 16, 2006 2:24 pm

Post » Fri Nov 16, 2012 11:34 pm

one last thing, if you plan on using custom six-changeable mannequins in large quantities (12 or more), it is better to use a dynamic ref alias system, rather than just dropping actors into the render window. the reason for this is if you have 12 mannequins with sixchange option, as far as the game engine is concerned you actually have 24. and if all 12 are in the cell at once, in reality all 24 are in the cell. also note no matter what you do mannequin actors are permanently persistent by design, so that means your 12 mannequins are actually 24 persistent actor refs (too many IMO)

a ref alias will allow you to temporarily fill persistence for only the actors in the alias, and you can safely delete the unused ones. to fill the alias just use the placeatme and forcerefto the alias, then delete the reference when you want to switch genders. this way, 12 mannequins means 12 mannequins, always.
User avatar
R.I.p MOmmy
 
Posts: 3463
Joined: Wed Sep 06, 2006 8:40 pm

Post » Fri Nov 16, 2012 9:24 pm

I agree with Amethyst... and don't forget to control-F4 that actor, otherwise the head meshes may not appear in-game correctly. (that's what it sounds like is happening, especially if you DID manually assign the correct head mesh)

Now that you've mentioned it again I remember somebody giving that advice before. I had the same thought then as I do now: what does ctrl+F4 actually do?

- Hypno
User avatar
Elena Alina
 
Posts: 3415
Joined: Sun Apr 01, 2007 7:24 am

Post » Sat Nov 17, 2012 3:59 am

Cntl-F4 is the hotkey for auto-gen of an actor's head meshes and custom texturing. Don't bother looking in the pulldowns or anywhere else for it, because it isn't anywhere else - you gotta hit cntl-F4. You also have to maintain the paths that those assets are placed in when you package your mod; if moved, one has to manually alter the NIFs to reflect the new path... which the auto-gen sets to the name of the plugin containing the actor. So name your mod correctly BEFORE doing this; or you'll have to redo it, alter the NIFs, or use 'wrong' pathnames. eg- myModTestVer4.esp may not be very desirable as opposed to myMod.esp (no big deal, but is a mark of sloppiness/unprofessionalism in my opinion heheh).

[EDIT: select the actor in the objectWindow (without opening that actor), then hit cntl-F4... you can also batch-auto-gen by selecting multiple actors]
User avatar
ruCkii
 
Posts: 3360
Joined: Mon Mar 26, 2007 9:08 pm


Return to V - Skyrim