Quick Questions -- Quick Answers, The Twentieth

Post » Sun Sep 20, 2009 5:20 am

Is it possible through scripting or otherwise to determine what the player was just damaged by? Like can a script tell the difference between a blade hit and a blunt hit? Or even an arrow hit? If so, is it possible to tell each time the player is hit without being too performance hungry?
Use getSoundPlaying and any of the WPNHit sounds.
User avatar
Richus Dude
 
Posts: 3381
Joined: Fri Jun 16, 2006 1:17 am

Post » Sun Sep 20, 2009 10:10 am

Continued from http://www.gamesas.com/bgsforums/index.php?showtopic=1073222&st=60&p=15684593&#entry15684593. I changed additem Gold001 50 to Actor.additem Gold001 50 and did the same for the token (thanks Qazaaq). That version did save as a Quest script, but it also caused a CTD as soon as I put the crosshair on an NPC. :banghead: What do I need to do to get this to work? :banghead: :banghead: :banghead:
User avatar
Kelly Osbourne Kelly
 
Posts: 3426
Joined: Sun Nov 05, 2006 6:56 pm

Post » Sun Sep 20, 2009 11:12 am

there is a cave somewhere in vanilla oblivion that needs explored during a sidequest. in this cave, i came across a water hole and when stepping in it i discovered it was actually a very deep hole going straight down quite some ways. when i got to the bottom i found a really huge giant very angry fish.

i wanted to recreate this in my mod on an even larger scale, but i just cannot find the proper way to do it. ive been tryin all week. ive got the cave built and now im working on the pit at the bottom. the room of the cave is built with chasm parts. but when i try to add another "level" of chasm to the room so it looks like this....

----
L______
L_____

and by using the same walls i used for the main level, the cieling doesnt line up right and there are gaps. i cant find any cave or chasm or pit parts in the cs that look like they had been used in the original game room. can someone please please help me find where they are or at least tell me if it doesnt exist in the cs?? thanks
User avatar
Maeva
 
Posts: 3349
Joined: Mon Mar 26, 2007 11:27 pm

Post » Sun Sep 20, 2009 5:49 am

ok sorry guys , the previous post didnt appear right once i hit post...im gonna try the visualization sample one more time....

the room im trying to build into levels so it is laid out like this....((please bare with me as in order to makle it kjeep form i am now using dots to ensure the underscore and l i was using weill remain in proper place so please ignore the dots))
................................................................................
.................................................................................
.................................................................................
............................._______.............................................
.................................................................................
.................................................................................
...................................L_________....................................
.................................................................................
.................................................................................
..................................................L______________
User avatar
Anthony Diaz
 
Posts: 3474
Joined: Thu Aug 09, 2007 11:24 pm

Post » Sat Sep 19, 2009 11:45 pm

Any way I can make my CS stop crashing every time I try to edit AI Packages?
User avatar
Chris Jones
 
Posts: 3435
Joined: Wed May 09, 2007 3:11 am

Post » Sun Sep 20, 2009 7:04 am

Use getSoundPlaying and any of the WPNHit sounds.


Are the sounds the same as when you hit an enemy? I only want the script going off when the player is hit.
User avatar
gemma
 
Posts: 3441
Joined: Tue Jul 25, 2006 7:10 am

Post » Sun Sep 20, 2009 12:10 am

Are the sounds the same as when you hit an enemy? I only want the script going off when the player is hit.
Yes. Call the function on the player and reduce the fuzzy radius to the whereabouts of 30 to detect hits on the player.
User avatar
Eve(G)
 
Posts: 3546
Joined: Tue Oct 23, 2007 11:45 am

Post » Sun Sep 20, 2009 9:45 am

ok sorry guys , the previous post didnt appear right once i hit post...im gonna try the visualization sample one more time....

the room im trying to build into levels so it is laid out like this....((please bare with me as in order to makle it kjeep form i am now using dots to ensure the underscore and l i was using weill remain in proper place so please ignore the dots))
................................................................................
................................................................................
.
................................................................................
.
............................._______............................................
.
................................................................................
.
................................................................................
.
...................................L_________...................................
.
................................................................................
.
................................................................................
.
..................................................L______________

http://www.uesp.net/wiki/Oblivion:Giant_Slaughterfish
I think this is it. Was it during Arrow of Extrication?
User avatar
Shirley BEltran
 
Posts: 3450
Joined: Wed Jul 26, 2006 4:14 pm

Post » Sun Sep 20, 2009 8:15 am

http://www.uesp.net/wiki/Oblivion:Giant_Slaughterfish
I think this is it. Was it during Arrow of Extrication?


yes i do believe that is the one. im trying to reconstruct my own extremely large version of that in a seperate cell and i cant seem to find the right pieces. every time i try to make a deep hole with cave chasm pieces or cave pit pieces, they have a set height between the floor and cieling. if i try to make the hole in such a way that i start with a large room and then go down building tier levels untill i am at a sufficient depth , then the cielings of each level dont want to match up so there ends up being holes and gaps in the cieling.

where in the cs are the cave set pieces for the deep hole the fish is found in?
User avatar
Claire
 
Posts: 3329
Joined: Tue Oct 24, 2006 4:01 pm

Post » Sun Sep 20, 2009 9:42 am

World Objects -> Static -> Dungeons -> Caves -> CRmFloorCeilingHole01 ?
User avatar
Karine laverre
 
Posts: 3439
Joined: Tue Mar 20, 2007 7:50 am

Post » Sun Sep 20, 2009 3:11 am

Yes. Call the function on the player and reduce the fuzzy radius to the whereabouts of 30 to detect hits on the player.


Oh man, I have no idea how to do any of that lol...could you throw me a link that would help me get started? I've done minor editing myself but this is my first time actually starting a script on my own.

I found the getSoundPlaying in the obse library, but not entirely sure how to actually make it work in the script.

Edit: I found a site where it was used in morrowind:

if ( GetSoundPlaying "ghostgate sound" == 0 )        playloopsound3dvp "ghostgate sound" 1.0 1.0    endif


Does the same idea apply here?
User avatar
Alisha Clarke
 
Posts: 3461
Joined: Tue Jan 16, 2007 2:53 am

Post » Sun Sep 20, 2009 2:45 am

Why this script don't works ?
scn zzUk47VampForceFeed

Short Feed
Short GettingFeed

ref NPCReference

begin GameMode



if( onControlDown 22 )
let Feed := 1
Player.pickidle

let GettingFeed:= 1
let npcreference := getcrosshairref
NPCReference.additem zzuk47VFFRing 1
NPCReference.SetUnConscious 1
NPCReference.pickidle

endIf

end

User avatar
Noely Ulloa
 
Posts: 3596
Joined: Tue Jul 04, 2006 1:33 am

Post » Sun Sep 20, 2009 2:08 pm

Oh man, I have no idea how to do any of that lol...could you throw me a link that would help me get started?

The OBSE documentation is what you're looking for, you can find http://obse.silverlock.org/obse_command_doc.html#GetSoundPlaying.
User avatar
Lauren Dale
 
Posts: 3491
Joined: Tue Jul 04, 2006 8:57 am

Post » Sun Sep 20, 2009 1:24 am

Edit: Removed the script
User avatar
Eoh
 
Posts: 3378
Joined: Sun Mar 18, 2007 6:03 pm

Post » Sun Sep 20, 2009 3:36 am

World Objects -> Static -> Dungeons -> Caves -> CRmFloorCeilingHole01 ?

awesome , thankyou!!
User avatar
Melis Hristina
 
Posts: 3509
Joined: Sat Jun 17, 2006 10:36 pm

Post » Sun Sep 20, 2009 1:28 am

Is there a way to format MessageBox text? I want to start a new paragraph and possibly use Italics or some other text style.
User avatar
Iain Lamb
 
Posts: 3453
Joined: Sat May 19, 2007 4:47 am

Post » Sun Sep 20, 2009 12:45 am

Is there a way to format MessageBox text? I want to start a new paragraph and possibly use Italics or some other text style.
Using string vars with messageBoxes will allow limited formatting. Changing text style isn't possible however. More info in the OBSE command doc.
User avatar
yessenia hermosillo
 
Posts: 3545
Joined: Sat Aug 18, 2007 1:31 pm

Post » Sun Sep 20, 2009 3:29 pm

From the last thread...


Yes, it's possible, just select the cell from the 'teleport' option and click on the desired door.
User avatar
Jessica Thomson
 
Posts: 3337
Joined: Fri Jul 21, 2006 5:10 am

Post » Sun Sep 20, 2009 1:24 am

Is a sound referred to as something different in the CS then its actual filename? I cannot get my script to recognize I am being hit by using the sound's file name.
User avatar
Melung Chan
 
Posts: 3340
Joined: Sun Jun 24, 2007 4:15 am

Post » Sun Sep 20, 2009 5:54 am

You'll need to use sound records to point to your sound files. Inside the CS, almost everything is record based - If you'd like to access an asset, you'll need to create an appropriate record first. For sound records, look for the Sound section in the Object window. More info on records - http://cs.elderscrolls.com/constwiki/index.php/Modding_Terminology.
User avatar
Hussnein Amin
 
Posts: 3557
Joined: Sun Aug 05, 2007 2:15 am

Post » Sun Sep 20, 2009 1:24 am

Thanks I appreciate it, though I have another problem.

I scripted in a message box to pop up if the sound was played to let me know the script was working, but it only appeared 3 out of the 50 times i was hit with a blade. I read that in morrowind the getSoundPlaying command was fairly unreliable, is that true here as well?
User avatar
Leticia Hernandez
 
Posts: 3426
Joined: Tue Oct 23, 2007 9:46 am

Post » Sun Sep 20, 2009 1:57 am

Well, to my knowledge, that depends upon the game engine. The engine itself has a bug which prevents some [sounds] from playing when too many sounds have been queued. In any case, I suggest that you add a radius argument to your function calls and see if it helps.
User avatar
Katy Hogben
 
Posts: 3457
Joined: Mon Oct 30, 2006 12:20 am

Post » Sun Sep 20, 2009 1:16 pm

I hear the actual sound every time though. I went ahead and added the radius check, tho not sure if I actually did it right as I couldn't find the fuzzyRadiusCheck used anywhere, but this time I got 5 out of 50 times, so I don't think anything really changed.

Sorry for all the questions, I'm doing my own research over here, but hard to find posted scripts that are somewhat along the lines of what I am trying to do. Infact, the only ones I can find are from Morrowind

Here is my script, the fuzzyCheckRadius command I pretty much just guessed how it was put in, hopefully don't make a fool of myself :P

scn PCHitTestbegin GameModeshort soundplayedfloat fuzzyCheckRadiusif ( getSoundPlaying "WPNHitBladeFlesh" == 1 )	if ( fuzzyCheckRadius <= 30 )	set soundplayed to 1if ( getSoundPlaying "WPNHitBladeFleshX" == 1 )	if ( fuzzyCheckRadius <= 30 )	set soundplayed to 1;if ( getSoundPlaying "wpnhitbladeflesh03" == 1 );	set soundplayed to 1;if ( getSoundPlaying "wpn_hit_bladeflesh_04" == 1 );	set soundplayed to 1	endif	endifendifendif;endif;endif	if ( soundPlayed == 1 )		MessageBox "Working", "Ok"		set soundplayed to 0	endifend

User avatar
Liv Brown
 
Posts: 3358
Joined: Wed Jan 31, 2007 11:44 pm

Post » Sat Sep 19, 2009 11:24 pm

Try this.
scn PCHitTestshort soundplayedbegin GameMode     if ( player.getSoundPlaying "WPNHitBladeFlesh" 35 || player.getSoundPlaying "WPNHitBladeFleshX" 35 )         set soundplayed to 1     endif               if ( soundPlayed == 1 )         MessageBox "Working", "Ok"         set soundplayed to 0     endif     end
You cannot declare variables inside script blocks. Variables in ObScript are anologous to global variables in programming languages - They have global scope in the script they are declared in.
User avatar
Shae Munro
 
Posts: 3443
Joined: Fri Feb 23, 2007 11:32 am

Post » Sat Sep 19, 2009 11:28 pm

I used your script and got 7 pop ups out of 50 blade hits. I am using the testing halls inside one of the houses at Hawkhaven (think thats the name) with just one NPC hitting me, so can there really be that many sounds to bog the engine down? It doesn't sound like any are getting cut off.

My goal is to have a script be able to detect when the player is hit, tell the type of weapon, and have a chance to apply a wound depending on what the player was hit by. But if the script is having this much trouble even detecting the sound I may not be able to.
User avatar
Chrissie Pillinger
 
Posts: 3464
Joined: Fri Jun 16, 2006 3:26 am

PreviousNext

Return to IV - Oblivion

cron