Jump to content

varla/welkynd stone holder scripting


DSoS

Recommended Posts

If you use my "light" short variable from my very first script, an Object script on your door would be :

 

Begin OnActivate Player

 

if ( light < 2 )

return

else

Activate

endif

 

End

 

Otherless, replace light condition by yours. StoneRef.IsDisabled will also work.

 

When must your message appear ?

Link to comment
Share on other sites

If you use my "light" short variable from my very first script, an Object script on your door would be :

 

Begin OnActivate Player

 

if ( light < 2 )

return

else

Activate

endif

 

End

 

Otherless, replace light condition by yours. StoneRef.IsDisabled will also work.

 

When must your message appear ?

 

 

message should appear as soon as the player tries to active the gates/doors, if the light object hasn't been completed yet.

Link to comment
Share on other sites

Ah, so put your message just before return in the script, and it will be fine.

 

I figured it would be there or so :) (I'm learning slowly :) )

 

ok, having some technical difficulties with the light code

 

Its giving me a error or two, so I'm not sure what I should do about them though....

 

1) When I go to save the script, I get the following message:

Script 'MalamathLetThereBeLightScript', Line 9:
Syntax Error. Invalid reference 'StoneRef' (only object references and reference variable are allowed in this context).

 

Line 9 is this:

 

StoneRef.Enable

 

Am I supposed to replace that with something or what?

 

If I'm suppose to replace any of the code with Ref Id's or so, could you let me know that too please :)

---------

 

Here's what I'm using in the game for the Light objects:

 

ARGreatWelkydStone01

Created NEW with the name of: MalamathLightStone01 and for Ref Editor ID: MalamathLightStoneReal

 

For the Stone Holder I'm using:

ARGreatWelkydStoneBase01

Created NEW with the name of: MalamathARLightStoneBase01 and for Ref Editor ID: MalamathARLightStoneBase

 

I haven't placed any of the Light Activators out yet, so those I wouldn't know what to do with right now.

Link to comment
Share on other sites

Error is normal.

 

I used StoneRef in the script, because i was not knowing which name you will use. And it has not importance.

 

It just means that is it the Ref of the Stone, so in your case precisely StoneRef == MalamathLightStoneReal. You just need to replace it in the script !

 

Same for your HolderRef, and same for LightsRef.

Link to comment
Share on other sites

Error is normal.

 

I used StoneRef in the script, because i was not knowing which name you will use. And it has not importance.

 

It just means that is it the Ref of the Stone, so in your case precisely StoneRef == MalamathLightStoneReal. You just need to replace it in the script !

 

Same for your HolderRef, and same for LightsRef.

 

Thank you, I'll try it out. If I can't get it working, I'll see if there is another way for you to do it.

Link to comment
Share on other sites

Error is normal.

 

I used StoneRef in the script, because i was not knowing which name you will use. And it has not importance.

 

It just means that is it the Ref of the Stone, so in your case precisely StoneRef == MalamathLightStoneReal. You just need to replace it in the script !

 

Same for your HolderRef, and same for LightsRef.

 

Thank you, I'll try it out. If I can't get it working, I'll see if there is another way for you to do it.

 

Good, I got it to work.

 

Though I have one more question about it.

 

Since this script will be turning on many many lights in the first area, which is very very large, bigger than any other ruin that I've seen. How do I have more than just one or two lights turn on?

 

I'm going to have to add quite a few, possible over 50+ (if not close to or over 100) of the same lights, or possible several different variations of lights (would still be 50-100+ lights)

 

(I hope that makes since, I'm pretty tired. been modding since 4pm yesterday :/ )

 

 

 

-----------------------------

 

EDIT:

 

Ok, so I added 2 lights, set them to Int. Disabled, set the scripts, etc etc. saved. Loaded the game....

 

No lights (which is what I want)

Go and try to pick up the Light Stone to place in the Stone Holder...But I can't pick the item up to place it at the Holder...Though it does turn the lights on.

 

How would I pick up the Light Stone, and when I active the Stone Holder, the Stone is Placed at the point where I want Light Stone to show at? (Look at attached Image)

 

I placed ; (to comment out) in front of the XxXRef.disabled (I decided that I don't want them to disappear, it looks good in game)

Link to comment
Share on other sites

I don't remember if you can pick up Activators. Maybe create the stone as an Item.

 

Sorry but i made a big mistake : i forgot to tell you that you must use GetScriptVariable or define the "light" short variable in a Quest script and not only Object scripts.

 

In each Object script you can set your Objectscript.light to this QuestID.light variable, or directly use the QuestID variable for the conditions.

Link to comment
Share on other sites

I don't remember if you can pick up Activators. Maybe create the stone as an Item.

 

Sorry but i made a big mistake : i forgot to tell you that you must use GetScriptVariable or define the "light" short variable in a Quest script and not only Object scripts.

 

In each Object script you can set your Objectscript.light to this QuestID.light variable, or directly use the QuestID variable for the conditions.

 

Your correct about not being able to pick up Activators.

 

LOL, Did you know that I completely forgot about setting up quests and all :wallbash:

 

I'm glad that you reminded me :thumbsup:

 

Ok, So I did a little revisions to the script, and it works pretty good.

 

For testing, I have the LightStone placed on the floor where I have the LightStoneHolder and the Lights at.

 

I click the lightstone, it takes a few seconds, it disappears, and it appears on the holder and the lights come on :thanks:

 

Works like a charm, so far (I still need to add the 100 other light sources, and should be good to go.

 

I did notice one thing, very minor and shouldn't interfere with anything as I've tested it a few times. When I click on the placed lightstone or the FakeLightstone. The original lightstone that was on the ground appears then disappears few seconds after. If I try activating the two placed stones again the original lightstone doesn't appear anymore. Its minor so for now I'm not worried about it.

 

This is the revised code that I'm now using. Could you check it to make sure that I didn't mess it up any, that might have adverse affects at a later time, please? :)

 

scriptname MalamathLetThereBeLightScript

short light
float timer

Begin OnActivate Player

if ( light == 0 )
LightStoneReal.Enable
set timer to 3
set light to 1
endif

End

Begin GameMode

if ( light == 1 )
	if ( timer > 0 )
	set timer to timer - GetSecondsPassed
		else
			LightStoneReal.Disable
			LightStonePlaced.Enable
			LightsOn001.Enable
			LightsOn002.Enable
		 ;MalamathARLightStoneBase.Disable (I'm leaving this here for now, just in case I decide that I want to use it at a later time, but most likely not)
			set light to 2
	endif
endif

End

 

As for the quest line and your info in your last post, I'm going to have to learn how to do quests first, or try to anyway.

(Note to Self: Remember to place a message in quest script, that states: "It seems that this stone was the lighting stone. Lights have just turned on, and it seems that I can now safely venture deeper into the ruins to cleanse the place. I must prepare myself for the unknown to come.")

 

I'll keep you updated on this, and I'll ask for help if I need it.

 

Actually, I will be back to modify this script a bit more, for spawning Un-Dead Ayleid Guards to protect the stone.

 

Thanks again for all the help you've given me :thanks: :thumbsup:

 

Kudo's for you

Link to comment
Share on other sites

I did notice one thing, very minor and shouldn't interfere with anything as I've tested it a few times. When I click on the placed lightstone or the FakeLightstone. The original lightstone that was on the ground appears then disappears few seconds after. If I try activating the two placed stones again the original lightstone doesn't appear anymore. Its minor so for now I'm not worried about it.

 

I figured out what I did, LMAO, I was using the same stone for each item, and each item had the Light Script on them. LOL

 

So, I'm off to fix those and see what it does afterward. :)

 

EDIT:

 

So after fixing the errors above, I went and created a new light stone item, which I should be able to pickup.

 

But I ran into a problem. The script only allows items to be used ONLY if they are Persistent Ref's so I don't know if I can use a item to be picked up.

 

Ah whatever, I'll make another stone holder, and place the scripted LightStone on it, and have it disappear when the player activates the stone, and then I can add in a script for the Stone Guardians to appear and attack the player.

 

Man I knew that this would be difficult but man I'm going crazy on this, lol.

 

You may quote me on this (ANYONE)

 

As a new modder, I applaud all game makers and the modders for their hard work. As I now know what it takes to make things just right for their games or mods to work correctly. Thank you for all the hard work you have done to create and release Oblivion and all other games and the mods that goes with these games. I will no longer fuss at the little mistakes that I see in most, if not all, games.

 

Thank you very much for all the hard work you as the game creators and the game modders have dealt with and completed!

 

~DSoS (John)

Jan 12, 2010

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...