Difference between revisions of "Talk:Creating a Mannequin"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Dwarduk
m
imported>Mrkef
Line 7: Line 7:


Thanks for this; I was literally just about to make this page (but it wouldn't have been near as good)  &mdash; [[User:Dwarduk|''<span style="font-family: 'Calibri', Sans-Serif;">dwarduk</span>'']] ([[User_talk:Dwarduk|T]]/[[Special:Contributions/Dwarduk|C]]) 11:08, 12 February 2012 (EST)
Thanks for this; I was literally just about to make this page (but it wouldn't have been near as good)  &mdash; [[User:Dwarduk|''<span style="font-family: 'Calibri', Sans-Serif;">dwarduk</span>'']] ([[User_talk:Dwarduk|T]]/[[Special:Contributions/Dwarduk|C]]) 11:08, 12 February 2012 (EST)
I am trying to fix living mannequins, frozen in strange positions. After a few hours of testing I have found the following.
:: - The rootcause is in the mannequin script - in onCellLoad() part
:: - There are some functions which are completly out of my understanding, so I hope someone here can help.
Original script source code (some not active parts removed):
EVENT OnCellLoad()
:: ;Trace("DARYL - " + self + " Waiting a bit because it's the only way to get code to run in OnCellLoad it seems")
:: wait(0.25)  ; This is clear. From my tests it seems it can be removed
:: ;Trace("DARYL - " + self + " Calling EquipCurrentArmor() Function")
:: EquipCurrentArmor()        ; clear
:: ;Trace("DARYL - " + self + " Blocking actors activation")
:: self.BlockActivation()        ; disable direct actor activation, keep only mannequin activator trigger
:: ;Trace("DARYL - " + self + " Moving to my linked ref")
:: self.EnableAI(TRUE)        ; most disturbing function, why AI needs to be active for the shift?:
:: MoveTo(GetLinkedRef())  ; clear - move mannequin to XMarkerHeading. Is it realy neccessary if I put mannequin on place in CK???
:: ;Trace("DARYL - " + self + " Disabling my AI so I'll freeze in place")
:: self.EnableAI(FALSE)      ; again, why AI is active, it works for me without these two enable/disable functions
EndEVENT
--[[User:Mrkef|Mrkef]] 04:19, 10 March 2012 (EST)

Revision as of 04:19, 10 March 2012

Sorry for the grammar, english is not my mother tongue. But i'm sure someone will correct this article for me. Thanks --Kkalex 12:42, 10 February 2012 (EST)

I went ahead and corrected some grammar mistakes and improved the organization of the article. Very well written tutorial, though!
--ElijahHouck 13:12, 10 February 2012 (EST)
Thank you --Kkalex 23:08, 10 February 2012 (EST)

Thanks for this; I was literally just about to make this page (but it wouldn't have been near as good) — dwarduk (T/C) 11:08, 12 February 2012 (EST)


I am trying to fix living mannequins, frozen in strange positions. After a few hours of testing I have found the following.

- The rootcause is in the mannequin script - in onCellLoad() part
- There are some functions which are completly out of my understanding, so I hope someone here can help.

Original script source code (some not active parts removed):

EVENT OnCellLoad()

;Trace("DARYL - " + self + " Waiting a bit because it's the only way to get code to run in OnCellLoad it seems")
wait(0.25)  ; This is clear. From my tests it seems it can be removed
;Trace("DARYL - " + self + " Calling EquipCurrentArmor() Function")
EquipCurrentArmor()  ; clear
;Trace("DARYL - " + self + " Blocking actors activation")
self.BlockActivation()  ; disable direct actor activation, keep only mannequin activator trigger
;Trace("DARYL - " + self + " Moving to my linked ref")
self.EnableAI(TRUE)  ; most disturbing function, why AI needs to be active for the shift?:
MoveTo(GetLinkedRef())  ; clear - move mannequin to XMarkerHeading. Is it realy neccessary if I put mannequin on place in CK???
;Trace("DARYL - " + self + " Disabling my AI so I'll freeze in place")
self.EnableAI(FALSE)  ; again, why AI is active, it works for me without these two enable/disable functions

EndEVENT

--Mrkef 04:19, 10 March 2012 (EST)