Quick Questions, Quick Answers Thread #6

Post » Mon Nov 19, 2012 1:48 am

http://www.gamesas.com/topic/1348211-the-quick-ck-questions-thread/ | http://www.gamesas.com/topic/1353350-quick-ck-questions-thread-2/ | http://www.gamesas.com/topic/1365336-quick-questions-quick-answers-the-3rd/ | http://www.gamesas.com/topic/1373468-quick-questions-quick-answers-thread-4/ | http://www.gamesas.com/topic/1395667-quick-questions-quick-answers-thread-5/


Have a quick question? Need a quick answer? If you have not had any luck with the http://www.creationkit.com/Main_Page, post away and hopefully someone will have the answer(s) you seek.
User avatar
Heather Dawson
 
Posts: 3348
Joined: Sun Oct 15, 2006 4:14 pm

Post » Sun Nov 18, 2012 12:43 pm

Quick question concerning ein gross Problem with GetItemHealthPercent().

A simple check on a given persistent Ref of an Armor improved to (Perfect) returns 1.0 instead of 1.4. The only way i found to get the correct value is to drop the Ref on the ground (not even in a Container) and use the Function on OnItemRemoved (akItemReference).

Trace(""+Ref) & Trace(""+akItemReference) returns the SAME value, so what's the problem ? There's nothing about this on the Wiki.
User avatar
Siobhan Wallis-McRobert
 
Posts: 3449
Joined: Fri Dec 08, 2006 4:09 pm

Post » Sun Nov 18, 2012 3:20 pm

There is something in the wiki - somewhere (I can't find it now, typically!) - about the fact that you can't run (some/any?) scripts on an item when it is in a container (which it is when in the player inventory).

I THINK there are a couple of workarounds, posted on here over the months, but they are probably much like the one you detailed
User avatar
Gen Daley
 
Posts: 3315
Joined: Sat Jul 08, 2006 3:36 pm

Post » Sun Nov 18, 2012 6:48 pm

Thanks a lot, i wasn't aware of that at all. I'll seek on the Wiki for what you say.

At least a workaround with a dummy Actor receiving, dropping then sending the Ref back to the Player is providing the correct value.
User avatar
brenden casey
 
Posts: 3400
Joined: Mon Sep 17, 2007 9:58 pm

Post » Sun Nov 18, 2012 12:29 pm

Is there a way to detect when the player is damaged by a specific damage type? Say shock, frost or fire? I'm looking to make a script specific to a race (I'm worried about the PC only currently) that should be healed/have magic restored when hit with shock damage.
User avatar
I love YOu
 
Posts: 3505
Joined: Wed Aug 09, 2006 12:05 pm

Post » Sun Nov 18, 2012 11:55 pm

There is an OnHit event.

http://www.creationkit.com/OnHit_-_ObjectReference

It has everything you need to get started :)
User avatar
Lily Something
 
Posts: 3327
Joined: Thu Jun 15, 2006 12:21 pm

Post » Sun Nov 18, 2012 4:32 pm

If the player has enchanted an object and called it, say, "Excalibur", would SKSE's GetName() let me get that name? Or would any other function?
User avatar
Claudia Cook
 
Posts: 3450
Joined: Mon Oct 30, 2006 10:22 am

Post » Sun Nov 18, 2012 9:59 am

Force subtitle doesn't seem to work for me and my mod users. You still need to have dialogue subtitles on in the game options. Am I missing something?
User avatar
Naomi Lastname
 
Posts: 3390
Joined: Mon Sep 25, 2006 9:21 am

Post » Sun Nov 18, 2012 9:35 pm

Is there a straightforward way of finding out of the player has a weapon readied (unsheathed)?
User avatar
HARDHEAD
 
Posts: 3499
Joined: Sun Aug 19, 2007 5:49 am

Post » Sun Nov 18, 2012 6:07 pm

Force subtitle doesn't seem to work for me and my mod users. You still need to have dialogue subtitles on in the game options. Am I missing something?

The flag is broken, it's a known bug in the CK.

Is there a straightforward way of finding out of the player has a weapon readied (unsheathed)?

http://www.creationkit.com/IsWeaponDrawn_-_Actor
User avatar
DAVId MArtInez
 
Posts: 3410
Joined: Fri Aug 10, 2007 1:16 am

Post » Sun Nov 18, 2012 9:27 pm

Is 4 lights the hard cap? I read somewhere that you shouldn't have more than 4, and a light I've added has turned red in the Creation Kit and will not emit. What's up with that?

Nevermind, it would seem that they are shadow-casting lights, which indeed have a maximum of four.
User avatar
Wayne W
 
Posts: 3482
Joined: Sun Jun 17, 2007 5:49 am

Post » Sun Nov 18, 2012 12:34 pm

http://www.creationkit.com/IsWeaponDrawn_-_Actor
D'oh! Thanks :thumbsup: :biggrin:!
User avatar
C.L.U.T.C.H
 
Posts: 3385
Joined: Tue Aug 14, 2007 6:23 pm

Post » Sun Nov 18, 2012 9:54 am


The flag is broken, it's a known bug in the CK.


Cheers homes!
User avatar
Emilie M
 
Posts: 3419
Joined: Fri Mar 16, 2007 9:08 am

Post » Mon Nov 19, 2012 1:28 am

I'm trying to implement a relatively simple concept: I want to make an NPC cast X spell at Y time. That's it. Heck, I'd even settle for just X spell whenever-the-hell he feels like it, as long as it works like a power (only once). However, the solution to this puzzle is one that has been eluding me for months. I've been trying combat override packages, but the NPC has been ignoring the conditions, as well as ignoring the second spell completely. How could I get this to work?
User avatar
Chris Johnston
 
Posts: 3392
Joined: Fri Jul 07, 2006 12:40 pm

Post » Sun Nov 18, 2012 11:54 am

So, from what I've gathered, I can access and alter another scripts properties by declaring the script itself as a property in some other script.

But what if the script whose properties I want to change exists on several objects?

E.g., if I have three magic effects with the same script attached to each, how would I, in a fourth magic effect, set a property for only one of those first three?
User avatar
jaideep singh
 
Posts: 3357
Joined: Sun Jul 08, 2007 8:45 pm

Post » Sun Nov 18, 2012 9:23 pm

What you do is set a property to the object with the script attached, and then cast the obect as the script.

You've done it before with quests:

(GetOwningQuest() as MyQuestsAttachedScript).my_script_method()

You can do the same with anything. If you have an object reference with a script attached:

ObjectReference Property foo Autofunction func()    (foo as Script_Which_Is_Somehow_Attached_To_Foo).method_on_that_script()endfunction

And because you're referencing the object with the property rather than the script, you get the script attached to the object.
User avatar
leni
 
Posts: 3461
Joined: Tue Jul 17, 2007 3:58 pm

Post » Sun Nov 18, 2012 10:05 am

Is it possible to define new holds with their own crime stats (i.e. via regions), or is it hard coded?

Edit: I'm nowhere near the point yet where this will actually be necessary, but it'd be nice to know if it is possible / someone has tried this and failed / succeeded, or if I'll have to do some sort of workaround. ^^
User avatar
Pete Schmitzer
 
Posts: 3387
Joined: Fri Sep 14, 2007 8:20 am

Post » Sun Nov 18, 2012 2:25 pm

Is it possible to define new holds with their own crime stats (i.e. via regions), or is it hard coded?

Edit: I'm nowhere near the point yet where this will actually be necessary, but it'd be nice to know if it is possible / someone has tried this and failed / succeeded, or if I'll have to do some sort of workaround. ^^
Holds seemed to be defined in part by what the locations within them define as their parents, so I think it could be possible. But I have no idea how to actually do it.
User avatar
Terry
 
Posts: 3368
Joined: Mon Jul 09, 2007 1:21 am

Post » Sun Nov 18, 2012 11:11 am

Any ideas on how to prevent a NPC from being staggered? I want to make someone immune to Impact/Unrelenting Force/etc. and thought a perk might've been what I needed, but nothing in the dropdown seems adequate.


EDIT: I found a solution by creating a perk based off Tower of Strength.
User avatar
Kit Marsden
 
Posts: 3467
Joined: Thu Jul 19, 2007 2:19 pm

Post » Mon Nov 19, 2012 12:20 am

Simple question, hopefully simple answer: How do I make a dog bark using a script? I'm trying to use Say / SayTo, but I can't figure out what topic to use.
User avatar
Charlie Ramsden
 
Posts: 3434
Joined: Fri Jun 15, 2007 7:53 pm

Post » Sun Nov 18, 2012 7:11 pm

whatever happened to "removealltypeditems", and/or how can i substitute for this?
User avatar
Nicole M
 
Posts: 3501
Joined: Thu Jun 15, 2006 6:31 am

Post » Sun Nov 18, 2012 3:49 pm

Simple question, hopefully simple answer: How do I make a dog bark using a script? I'm trying to use Say / SayTo, but I can't figure out what topic to use.

Give the dog a topic saying "bark" or "woof" or "whine", then choose the select sound option on the Info window and find the cDog* entries and use them as the vocals

Apologies if the details are a little fuzzy - I'm away from my CK tonight. I had this working the other weekend though
User avatar
Jake Easom
 
Posts: 3424
Joined: Sun Jul 29, 2007 4:33 am

Post » Mon Nov 19, 2012 12:51 am

Give the dog a topic saying "bark" or "woof" or "whine", then choose the select sound option on the Info window and find the cDog* entries and use them as the vocals

Apologies if the details are a little fuzzy - I'm away from my CK tonight. I had this working the other weekend though
While that would work great for one dog... that's not what I'm doing. I have an ActiveMagicEffect that runs on all dogs. When the player is detected by that dog and is sneaking, the dog should bark and create a detection event.
User avatar
Brian Newman
 
Posts: 3466
Joined: Tue Oct 16, 2007 3:36 pm

Post » Sun Nov 18, 2012 9:58 am

What you do is set a property to the object with the script attached, and then cast the obect as the script.

You've done it before with quests:

(GetOwningQuest() as MyQuestsAttachedScript).my_script_method()

You can do the same with anything. If you have an object reference with a script attached:

ObjectReference Property foo Autofunction func()	(foo as Script_Which_Is_Somehow_Attached_To_Foo).method_on_that_script()endfunction

And because you're referencing the object with the property rather than the script, you get the script attached to the object.

Hmmm... I'm not sure I understand. What I've got is this:

(battlemagerecall1 As battlemagerecallscript).storedSpell() = akSpell

on an ActiveMagicEffect script. battlemagerecall1 is a MagicEffect property, and battlemagerecallscript is the script that's attached to that magic effect. storedSpell is a property of battlemagerecallscript.

When I try to compile, I still get the following error:

Required (...)+ loop did not match anything at input '='
User avatar
Melung Chan
 
Posts: 3340
Joined: Sun Jun 24, 2007 4:15 am

Post » Sun Nov 18, 2012 10:08 pm

I have an issue that's probably pretty simple and i'm just overlooking it. I copied a draugr ambush setup from the warehouseAmbushes, and it was wokring great. However, after the tutorial on rooms and portals, this has ceased to work. I've tried a few things (like repositioning, and bringing in a whole new one) but nothing seems to work. Any help would be greatly appreciated!

Edit: I just realized that I didn't even say what the issue was lol. When I walk into the room with the ambush, the coffin and/or lid are just gone. I can see the draugr lying there and the animation take place when I step over the trigger, but I can't get the coiffin and lid to show up.
User avatar
Ricky Meehan
 
Posts: 3364
Joined: Wed Jun 27, 2007 5:42 pm

Next

Return to V - Skyrim