Activate on Hit?

Post » Sat Jan 02, 2010 11:05 am

Scripting newb here (well....semi-noob).

I'm making a mod that uses a specific hammer (lets say morthammer) to hit a bell. When you hit that bell, it teleports you to the next cell. My current code is based off the Lorkhan's Heart script and I was wondering what else I need to modify to make this work. I took out the hp check/refresh, but in retrospect I think need that back in if the bell needs to be a creature for this to work.

begin Mort_Tomb short morthammerhit;Hit by Mort Hammerif ( menumode ==1 )	returnendifif ( morthammerhit == 0 )	set morthammerhit to HitOnMe morthammerendifif ( morthammerhit == 1 )				PlaySound "bell1"			Player->PositionCell, 2816, 5696, 14720, 170, "Mort Tomb"	endifendifend


Is there an easier way to do this? Thank you so very much Beth forum script gods :o
User avatar
Eliza Potter
 
Posts: 3481
Joined: Mon Mar 05, 2007 3:20 am

Post » Sun Jan 03, 2010 12:38 am

I'm pretty clueless when it comes to scripting, but maybe http://planetelderscrolls.gamespy.com/View.php?view=Mods.Detail&id=5156 could provide you some infos.
User avatar
Dalton Greynolds
 
Posts: 3476
Joined: Thu Oct 18, 2007 5:12 pm

Post » Sat Jan 02, 2010 11:13 am

I'm pretty clueless when it comes to scripting, but maybe http://planetelderscrolls.gamespy.com/View.php?view=Mods.Detail&id=5156 could provide you some infos.


The bells themselves work as activators, that I could easily do. That mod has you play a tune and get transported base to base. I'm suggesting physically hitting the bells to get transported, but I think that requires creating the bells as creatures (for hit detection), which may be a bit overkill for its simple concept. BUT it'd be really cool to implement.
User avatar
maddison
 
Posts: 3498
Joined: Sat Mar 10, 2007 9:22 pm

Post » Sat Jan 02, 2010 2:01 pm

The bells themselves work as activators, that I could easily do. That mod has you play a tune and get transported base to base. I'm suggesting physically hitting the bells to get transported, but I think that requires creating the bells as creatures (for hit detection), which may be a bit overkill for its simple concept. BUT it'd be really cool to implement.

sounds like it'll work. thats how they did the heart that you're basing your script on. just do as bethesda did and give the silly thing enough HP and regeneration to survive even high level players trying to kill it. basically, copy the heart, and change its mesh to a bell.
User avatar
Arnold Wet
 
Posts: 3353
Joined: Fri Jul 07, 2006 10:32 am

Post » Sat Jan 02, 2010 5:59 pm

My only problem with doing that is I'd prefer to use bethesda's meshes for the bells (they're an activator), and I'm not sure how to get them to appear when I select them as a creature (the meshes are in the bsa).
User avatar
Sammygirl500
 
Posts: 3511
Joined: Wed Jun 14, 2006 4:46 pm

Post » Sat Jan 02, 2010 4:18 pm

My only problem with doing that is I'd prefer to use bethesda's meshes for the bells (they're an activator), and I'm not sure how to get them to appear when I select them as a creature (the meshes are in the bsa).

are they not on the CS disk? my own system is kind of broken so i cant check right now.


hmmm, there is a program or two floating around that'll let you unpack BSAs. i forget the preferred application, but i think it's called either BSA browser or BSA unpacker.
User avatar
Hazel Sian ogden
 
Posts: 3425
Joined: Tue Jul 04, 2006 7:10 am

Post » Sat Jan 02, 2010 10:33 am

My only problem with doing that is I'd prefer to use bethesda's meshes for the bells (they're an activator), and I'm not sure how to get them to appear when I select them as a creature (the meshes are in the bsa).


To make the bell a creature you'll need to create a new mesh and provide an animation class for that creature. To do this you'll need the files found on the construction set disc and nifScope. Start by making a copy of the 3 model files for a creature (creature.nif, xcreature.nif and creature.xf if I remember correctly). Rename these files so they follow the same pattern but with your new models name replacing the original creature name. Place these files in your subfolder of the meshes folder. Never place new models directly in the /meshes folder. Next open 2 copies of nifScope. In one load the bell model in the other load your renamed creature model. On the creature model you'll delete the nodes for the creatures model except for the 1st one. For that node you'll copy the model data of the bell model from the other nifScope over the model data of the creature. At this point I'm sure that will sound like complete gibberish. When I get access to my data files later this morning I'll fill in the details so it'll make more sense.
User avatar
James Hate
 
Posts: 3531
Joined: Sun Jun 24, 2007 5:55 am

Post » Sat Jan 02, 2010 10:38 am

To make the bell a creature you'll need to create a new mesh and provide an animation class for that creature. To do this you'll need the files found on the construction set disc and nifScope. Start by making a copy of the 3 model files for a creature (creature.nif, xcreature.nif and creature.xf if I remember correctly). Rename these files so they follow the same pattern but with your new models name replacing the original creature name. Place these files in your subfolder of the meshes folder. Never place new models directly in the /meshes folder. Next open 2 copies of nifScope. In one load the bell model in the other load your renamed creature model. On the creature model you'll delete the nodes for the creatures model except for the 1st one. For that node you'll copy the model data of the bell model from the other nifScope over the model data of the creature. At this point I'm sure that will sound like complete gibberish. When I get access to my data files later this morning I'll fill in the details so it'll make more sense.


I also want to know the process for making creature-objects. any help with this is greatly appreciated.That being said, I think you can do what the OP had in mind without a creature-object by using MWSE, capturing the object type you are looking at via script,and detecting either button presses or swinging weapon sound. If you want, Mortimer; I can give you prototype of MWSE script that does the object type, and you could run with it from there (its part of the stalled project I have for trap expansion, that RL has made me put on hold)

ST
User avatar
Ben sutton
 
Posts: 3427
Joined: Sun Jun 10, 2007 4:01 am


Return to III - Morrowind