Quick Questions, Quick Answers - Thread #36

Post » Fri Apr 18, 2014 2:06 pm

Previous Threads:

Spoiler
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/ | http://www.gamesas.com/topic/1406245-quick-questions-quick-answers-thread-6/ | http://www.gamesas.com/topic/1411305-quick-questions-quick-answers-thread-7/ | http://www.gamesas.com/topic/1414436-quick-questions-quick-answers-thread-8/ | http://www.gamesas.com/topic/1418982-quick-questions-quick-answers-thread-9/ | http://www.gamesas.com/topic/1424574-questions-quick-answers-thread-10/ | http://www.gamesas.com/topic/1427837-quick-questions-quick-answers-thread-11/ | http://www.gamesas.com/topic/1432221-quick-questions-quick-answers-thread-12/ | http://www.gamesas.com/topic/1434686-quick-questions-quick-answers-thread-13/ | http://www.gamesas.com/topic/1437011-quick-questions-quick-answers-thread-14/ | http://www.gamesas.com/topic/1439381-quick-questions-quick-answers-thread-15/ | http://www.gamesas.com/topic/1442236-quick-questions-quick-answers-thread-16/ | http://www.gamesas.com/topic/1444947-quick-questions-quick-answers-thread-17/ | http://www.gamesas.com/topic/1449652-quick-questions-quick-answers-thread-18/ | http://www.gamesas.com/topic/1458015-quick-questions-quick-answers-thread-19/ | http://www.gamesas.com/topic/1462459-quick-questions-quick-answers-thread-20/ | http://www.gamesas.com/topic/1464441-quick-questions-quick-answers-thread-21/ | http://www.gamesas.com/topic/1466681-quick-questions-quick-answers-thread-22/ | http://www.gamesas.com/topic/1468752-quick-questions-quick-answers-thread-23/ | http://www.gamesas.com/topic/1470372-quick-questions-quick-answers-thread-24/ | http://www.gamesas.com/topic/1471891-quick-questions-quick-answers-thread-25/ | http://www.gamesas.com/topic/1473830-quick-questions-quick-answers-thread-26/ | http://www.gamesas.com/topic/1476163-quick-questions-quick-answers-thread-27/ | http://www.gamesas.com/topic/1477693-quick-questions-quick-answers-thread-28 | http://www.gamesas.com/topic/1479205-quick-questions-quick-answers-thread-29/ | http://www.gamesas.com/topic/1480911-quick-questions-quick-answers-thread-30/ | http://www.gamesas.com/topic/1483264-quick-questions-quick-answers-thread-31/ | http://www.gamesas.com/topic/1485279-quick-questions-quick-answers-thread-32/ | http://www.gamesas.com/topic/1486930-quick-questions-quick-answers-thread-33/ | http://www.gamesas.com/topic/1491074-quick-questions-quick-answers-thread-34/ | http://www.gamesas.com/topic/1497701-quick-questions-quick-answers-thread-35/



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
Ashley Tamen
 
Posts: 3477
Joined: Sun Apr 08, 2007 6:17 am

Post » Fri Apr 18, 2014 1:10 pm

This is probably the best approach available without going through the trouble of a SkyProc patch. I think most thoughtful mod authors would have added the bow keyword to their bows, but there may undoubtedly be exceptions that you can't do anything about.

User avatar
Sharra Llenos
 
Posts: 3399
Joined: Wed Jan 17, 2007 1:09 pm

Post » Fri Apr 18, 2014 9:53 am

really? the best idea for that who i am trying to do?
do you know how to write it at papyrus script?

User avatar
Chloe Mayo
 
Posts: 3404
Joined: Wed Jun 21, 2006 11:59 pm

Post » Fri Apr 18, 2014 4:51 am

That depends what you're trying to do.

User avatar
No Name
 
Posts: 3456
Joined: Mon Dec 03, 2007 2:30 am

Post » Fri Apr 18, 2014 10:37 am

Say I want to drop an item and item with an attached script that will return back to the player's inventory. How do I do that since there is not container reference? Do I have the item delete itself then use add item? Will this cause save game bloat?

User avatar
Sweets Sweets
 
Posts: 3339
Joined: Tue Jun 13, 2006 3:26 am

Post » Fri Apr 18, 2014 6:50 am

(New Question) What happens if RemoveItem Function is used to remove items from one container (or actor) to another container (or actor) and the items moved exceeds the weight limit set on the container? Will it stop at the limit? Will items be lost to the void? Or will it fill it anyway (and potentially overburden Lydia)?

User avatar
Jade MacSpade
 
Posts: 3432
Joined: Thu Jul 20, 2006 9:53 pm

Post » Thu Apr 17, 2014 9:42 pm

trilloth,

Almost certainly it will overburden the person-- you can try it easy enough if you do something like use the console to give someone a million iron daggers; you'll see they all get added, and the target's encumbrance is crossed.

User avatar
Trista Jim
 
Posts: 3308
Joined: Sat Aug 25, 2007 10:39 pm

Post » Fri Apr 18, 2014 2:43 am

i want to tell to the machine if the weapon that attack has keyword (WeapTypeBow) to do the rest of my script
so, how to do that?

User avatar
Rachel Briere
 
Posts: 3438
Joined: Thu Dec 28, 2006 9:09 am

Post » Fri Apr 18, 2014 1:30 am

There is an event called onHit which will tell you everything you need.

User avatar
Strawberry
 
Posts: 3446
Joined: Thu Jul 05, 2007 11:08 am

Post » Fri Apr 18, 2014 2:38 am

I asked in the last thread and didn't get an answer what exactly does reset do for quests?

User avatar
Mr. Ray
 
Posts: 3459
Joined: Sun Jul 29, 2007 8:08 am

Post » Fri Apr 18, 2014 10:59 am

Resets the quest stage back to 0. All scenes and dialogue are reset. Aliases are emptied until the quest is started again.

And I missed your last question.

User avatar
JESSE
 
Posts: 3404
Joined: Mon Jul 16, 2007 4:55 am

Post » Fri Apr 18, 2014 1:47 am

Well in that case your script should be compatible with any bow, even mod added bows, thanks to GetEquippedItemType() function. Try this script. You will need to attach it to a PlayerAlias. http://www.creationkit.com/Dynamically_Attaching_Scripts#Set_Up_a_Reference_Alias (Ignore the cloak stuff that comes after that). Then attach your script to that alias.

Event OnHit(ObjectReference Attacker, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)    if((attacker as actor).getequippeditemtype(0) == 7) ;if this is true, the enemy is wielding a bow        ; the player was just hit by a bow shot, add your script here.    endif EndEvent
User avatar
Robyn Howlett
 
Posts: 3332
Joined: Wed Aug 23, 2006 9:01 pm

Post » Fri Apr 18, 2014 2:41 am

To extend Brandy's explanation. You need to use the OnHit event in a script attached to the item that gets hit. (Unless you are trying to do something a bit more universal, then you will need to create a perk. I'm not sure about the details for that part).

Here is an example script for a single object that tests to see if it was hit by a bow:

Spoiler
ScriptName Thing_That_Gets_Hit_Example Extends ObjectReferenceKeyword Property WeaponTypeBow Auto ; must be sure to attach propertyEvent OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \  bool abBashAttack, bool abHitBlocked)    if (akSource as Weapon) ; check to see if it's a weapon first        if akSource.HasKeyword(WeaponTypeBow)            Debug.Trace("THING got hit by a bow!") ; for testing, make sure you have logging turned on.            ; do stuff here        endif    endif   EndEvent

Edit: LOL Ninja'd by egocarib. Though my example is slightly different. I think I would go with testing the the source weapon instead of checking the attacker's equipped item, in case the attack switches weapons suddenly. Who knows if that can happen fast enough?

User avatar
koumba
 
Posts: 3394
Joined: Thu Mar 22, 2007 8:39 pm

Post » Fri Apr 18, 2014 1:35 am

Is the quest also stopped?

User avatar
Jason Rice
 
Posts: 3445
Joined: Thu Aug 16, 2007 3:42 pm

Post » Fri Apr 18, 2014 1:40 am

Yes.

User avatar
Love iz not
 
Posts: 3377
Joined: Sat Aug 25, 2007 8:55 pm


Return to V - Skyrim