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...

Need help with scripting and some questions.


squall1150
 Share

Recommended Posts

Hi im making a mod for skyrim with the creation kit i have done alot of work so far and im very pleased with how its going and have got to the point where i might just give it up.

Im trying to make like a horde mode where you can just keep fighting things and also diffrent enemys, i have looked into alot. Im testing alot of things but none of them seem to work.

So i am in need of some help with scripting as im finding it realy hard to do it and i dont even know what i can do. here's the short story.

I have a big room and 2 gates, im trying to make it so that when i use a pullchain the gate will open and the enemy i choose with rush out and attack you, on the last enemy hopfuly i can

get the game to spawn another lot of diffrent enemys after the first waves death. I know how to open the gate with a parent but the enmy i choose just stand there behind the gate

when i open it, is there a way to change the radious of the enemy so they can see the player from a longer range, and will that need scripting if so how?

I have alot of plans for this map but im getting to a point where i just cant do it. The other questions is.

I have DweSphereCenturionPort01 with a lvlDwarvenSphereAmbush linked Ref to DweSphereCenturionPort01 with a pullchain as the activatar, how do i make a script so that when i use

the pullchain the lvlDwarvenSphere comes out attack you dies and then you use the pullchain again and it makes another a so called loop you could say.

Can some one show me how this script will look? like the same way when writeing a script.

I realy hope some one can help me, im having so much trouble scripting if some one can help me with scripting id be so helpful.

Thank you very much.

Link to comment
Share on other sites

Your not giving much information on what you 'are' doing, so I will start the questions.

And you might want to take my first class so you understand how to setup your scripts and attach your script to world objects so you can manipulate them.

Have you navmeshed your cell? The AI will not know what to do without it. And may only sort of work if the player is very close to the enemy.

Are your enemies set to aggressive, or very aggressive?

I use this script on an activator button, and it places the enemy at the XMarkerHeading. Its all got to be setup using the properties for the script in the CK.

I have 8 possible locations they can spawn, and 3 different types of leveled actors that can spawn, all set in a random number generator.

Scriptname LevelersButton50Arena extends ObjectReference  

ObjectReference Property LevelersArenaM1 Auto
ObjectReference Property LevelersArenaM2 Auto
ObjectReference Property LevelersArenaM3 Auto
ObjectReference Property LevelersArenaM4 Auto
ObjectReference Property LevelersArenaM5 Auto
ObjectReference Property LevelersArenaM6 Auto
ObjectReference Property LevelersArenaM7 Auto
ObjectReference Property LevelersArenaM8 Auto

LeveledActor Property LevelersArenaActor1 Auto
LeveledActor Property LevelersArenaActor2 Auto
LeveledActor Property LevelersArenaActor3 Auto

Sound Property QSTAstrolabeButtonPressX Auto

int random

Event OnActivate(ObjectReference akActionRef)
If akActionRef == Game.GetPlayer()
QSTAstrolabeButtonPressX.Play(Self)
random = Utility.RandomInt(1, 8)
if random == 1
LevelersArenaM1.PlaceAtMe(LevelersArenaActor1)
elseif random == 2
LevelersArenaM2.PlaceAtMe(LevelersArenaActor1)
elseif random == 3
LevelersArenaM3.PlaceAtMe(LevelersArenaActor1)
elseif random == 4
LevelersArenaM4.PlaceAtMe(LevelersArenaActor1)
elseif random == 5
LevelersArenaM5.PlaceAtMe(LevelersArenaActor1)
elseif random == 6
LevelersArenaM6.PlaceAtMe(LevelersArenaActor2)
elseif random == 7
LevelersArenaM7.PlaceAtMe(LevelersArenaActor2)
else
LevelersArenaM8.PlaceAtMe(LevelersArenaActor3)
endif
EndIf
endEvent
[/code]

Link to comment
Share on other sites

I have taken the first scripting tutorial from bethesda on the wiki where it tells you how to

reanimate a dead druager with a simple script but thats all i have done.

yes i have done the navmeshing.

Are your enemies set to aggressive, or very aggressive?

I dont know if there aggressive, or very aggressive i dont even know what that does.

This script seems very complicated, can you explain it to me. I do now what you

mean by the properties but i dont know what one to select. How will this script work?

I mean do i use it all or? Do you even mind if i use this script?

Thanks i will wait for your reply.

Link to comment
Share on other sites

Have you 'finalized' your navmesh? You must do that before it will work correctly.

The enemies I use are vanilla creatures, and they all attack the player on sight. Aggresiveness affects that.

The script is a base script. You can do what you want with it. ;)

Its actually a very simple script. You might want to take my Oblivion class on 'If/Elseif/Else/Endif' to learn about how those work.

If you take my class #1 tutorial, it explains about adding properties to your script, from within the CK. What that does is attach objects in the CK to your external Papyrus script.

Its an OnActivate type of script to it only works on an object that the player can activate. It runs once per activation.

Link to comment
Share on other sites

Hi sorry its taken me so long to report back. I have been trying to get your script to work but i am not having any luck i will keep trying tho.

Im trying to make the following enemy make this path i have explain the last posts. drauger,mammoths,giants,adn some other monsters.

When i cant do what i want i try and make up another idea how to do the sort of thing, and i have come up with an idea!

How do i make a script or if there allready is one, make an emeny activate something when it gets killed? such as using a pullchain,lever ect.

Example. I wont to use the drauger tombs and when i activate them and then i kill them how will i make there death an activater, so when it does it activates another one.

I have tried some of my on script but i think im doign it complety wrong. Hope you can help again.

Thanks

Link to comment
Share on other sites

You have OnDeath code you can add to the creatures.

http://www.creationkit.com/OnDeath_-_Actor

And you use Activate in that, to make them activate an object.

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

But, you will not see them physically pull the chain because they are dead, and that is an animation effect. Which I don't know if works on creatures or not.

Link to comment
Share on other sites

I have tried writing the scipt but im having trouble.

I dont know what to type what in where? this is what i have tried.

Scriptname activateondeath extends ObjectReference

Event OnActivate (ObjectReference akActionRef)

If akKiller == Game.GetPlayer()) OnDeath (Actor akKiller)

EndEvent

Did not work i would think you clealy know why.

Just to check i wonted this script to work so that when i kill the person this script

is on i would like the other draugers to wake up more than 1 drauger.

Link to comment
Share on other sites

The 'Event' your using of 'OnActivate' only works when the player 'activates' the Draugr.

That will not detect its death.

Just like in the onDeath link I gave you, you need to code the 'onDeath' as the event.

Event OnDeath(Actor akKiller)
if (akKiller == Game.GetPlayer())
Debug.Trace("We were killed by the player!")
; put script here to 'wake up' your other draugr.
endIf
endEvent[/code]

I have not looked into how the game 'wakes up' other draugr, so you would have to see how that is done and mimic that.

Link to comment
Share on other sites

I sort of understand the Event and Endevent. Its the ondeath working WITH the activate.

I made 2 sarcophagus, placed them next to each other were call them A and B, (A is on the left B is on the right)

next i used the druagers linked ref with the item that works with the sarcophagus.Parent it with the triggerbox. tested it with no script

they worked fine. They both opened up and attack me.(hard to explain)

Placed the script i made on drauger A, changed the parent of B to A. started it up and they both opened up at the same time. dident wont that.

tried some other things. other times one would open up and when i killed drauger A with the script it dident wake up drauger B.

this is a script i tried. When i saved all the scripts, i made to test thay did save fine as well no errors.

Event onDeath(Actor akKilled)

; ;Debug.Trace("onDeath() Event Received")

EndEvent

Auto STATE Waiting <-------this part i got from a pullchain as the activater.

EVENT onActivate (objectReference triggerRef)

self.BlockActivation(true)

playAnimationandWait("Pull","Reset")

self.BlockActivation(false)

endEVENT

endState

you also said.

"I have not looked into how the game 'wakes up' other draugr, so you would have to see how that is done and mimic that."

i dont understand what you mean by wakes up? how wouldi even see how thats done?

Sorry for being so doppy on the script like i said i find it very hard to do.

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...