Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Killable Objects


JulianSull
 Share

Recommended Posts

I'm trying to design out the bosses that I have planned and one is a giant machine that is suppose to have five main weak spots in it that the player has to destroy. Is there a way to give an activator or something health via a script or something to simulate the destruction of the five weak spots?

Link to comment
Share on other sites

If the object that is 'destructable' is out of the reach of the player, then you can use this method.

Place a 'trigger zone' in front of the killable spot. This will detect if an arrow or spell or anything enters that trigger zone. You can then assume that an attack was made. This will not detect the amount of damage done though, just the number of hits.

gallery_85_79_33662.jpg

The green box is the trigger zone.

And you would have a script like this on it:

scn HSAyleidTrigZoneScript
; Activates linked Parent object once
; Any object will activate this (arrows, havok objects)
short triggered
short hitCount
short isDestroyed
ref target
ref mySelf
float timer

begin onTrigger
if triggered == 0
set triggered to 1
set timer to 10
; you do stuff here if you want when hit
; perhaps you could play a shock or explosion effect
; or scream sound effect
; set target to getParentRef
; set mySelf to getSelf
; target.activate mySelf 1
; playgroup forward 0
endif
end

begin GameMode
; once hit I set up a timer so that much time must pass before a hit 'registers' again
if triggered == 1
if timer >= 0
set timer to timer - GetSecondsPassed
else
set triggered to 0
set hitCount to hitCount + 1
endif
endif

if isDestoyed == 0
if hitCount > 5
; destroy the section play explosion effect?
set isDestroyed to 1
endif
endif
end

begin onReset
set triggered to 0
end[/code]

Link to comment
Share on other sites

What is that begin onreset for? Also why couldn't that script work for melee as well?

EDIT: This could work. How would I script ropes to snap when they are hit once by an arrow or a spell?

EDIT: Could I have something that is an NPC or a creature with no turning ability, no ability to move and no ability to talk that has the mesh of a block of wood or something?

EDIT: Is there a way I could find out what hit the trigger zone, check if it is an arrow and if it is then check how much damage that particular arrow does and subtract that from a global? Same thing with a spell.

Edited by JulianSull
Link to comment
Share on other sites

The wiki is your friend. Begin

Basically, the cell resets after so many days, you probably want to do something special in the script.

E1: You would have to have a special rope 'animation' made to 'snap' ropes. Animations are controlled with the 'PlayGroup' function.

E2: You might be able to but it will probably 'crash' on you unless the mesh is attached to the 'skeleton' of the NPC correctly.

E3. You might be able to get some use from GetActionRef.

But, if the person is using a modded arrow, or a special spell, you will not know what it is.

Link to comment
Share on other sites

I could just have one of the companions say that she has special arrows with extra notches that pierce through ropes better and another special arrow designed to ...something. I'll work it with thanks for the help. =)

Oh and btw, how do I create animations?

Link to comment
Share on other sites

One more thing, how can I disable a ton of objects all at once instead of individually disabling them? I'm trying to create something that is called "The War Machine" which needs to move from spot to spot but not actually make any actual movements...I don't want to script every single piece of it. Is there a way I can make it once and just call the entire thing to a certain XYZ coordinate?

Link to comment
Share on other sites

Yes. You use 'parentage'.

Drop a >Static >XMarker object into the window next to the machine. Make sure its a persistant reference check box is set. It should default to this.

On your objects you want to 'disable', double-click on it in the 'Render Window' and click on the 'Enable Parent' tab.

Click the button 'Select Reference in Render Window'. The cursor will turn into a crosshair. Double-click the XMarker and it will become the parent 'enabler.

When the XMarker is enabled, all its children will be enabled. When the XMarker is disabled, all its children will be disabled.

Link to comment
Share on other sites

Last thing...Where can I find a good blender tutorial? If I'm going to make this war machine...I'm going to have to make the mesh myself. There aren't even any wheel meshes in the CS, so that bad idea is right out =/

EDIT: Wiki is my friend. =D

Edited by JulianSull
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...