DSoS Posted January 9, 2010 Share Posted January 9, 2010 I don't know the first thing about scripting, so a little help please....I do have a link to the CS wiki somewhere on scripting, just gotta find it. I'm curious on if I can do this with OB/CS Have a Welkynd OR Varla stone holder. (either one)Have the player be able to activate the holder, and have a "special" welkynd/varla stone added to the holder.Then when the stone is in place, the area (Ayleid home) is lit up (as if you turned a light-switch on in your house.)After the stone is placed in the holder, both items disappear from the game world, but the "lights" stay on for then on. The Ayleid home will be completely 100% dark when the player arrives, they then get a quest to try to find a way to "light up" the ruin. After they find the Special stone, they have to return to the holder, place the stone, and the "lights" turn on, the the stone and holder disappear. Would this be possible? if so how? what would the script be (if anyone would take the time to script it for me) ThanksJohnDSoS Link to comment Share on other sites More sharing options...
proutos Posted January 9, 2010 Share Posted January 9, 2010 I think it's possible. First you'll need to create a Ref of your stone, Refs of Lights in your Cell, and check for all Initialy Disabled. Then put an Object script on your holder made as an Activator, with an Begin OnActivate block with StoneRef.Enable, Light01Ref.Enable and so on. If you want the lights to appear a few seconds after the stone, you can use a float variable as a timer. Link to comment Share on other sites More sharing options...
DSoS Posted January 9, 2010 Author Share Posted January 9, 2010 I think it's possible. First you'll need to create a Ref of your stone, Refs of Lights in your Cell, and check for all Initialy Disabled. Then put an Object script on your holder made as an Activator, with an Begin OnActivate block with StoneRef.Enable, Light01Ref.Enable and so on. If you want the lights to appear a few seconds after the stone, you can use a float variable as a timer. I understand what your telling me about the Ref and the Begin OnActivate (Amazing I understand it) (Make that some what, I understand the basics behind them) But I'll have to figure out how to code the script for it Link to comment Share on other sites More sharing options...
proutos Posted January 9, 2010 Share Posted January 9, 2010 Alright, well the Object script should be something like : short lightfloat timer Begin OnActivate Player if ( light == 0 ) StoneRef.Enable set timer to 3 set light to 1endif End Begin GameMode if ( light == 1 ) if ( timer > 0 ) set timer to timer - GetSecondsPassed else Light01Ref.Enable Light02Ref.Enable StoneRef.Disable HolderRef.Disable set light to 2 endifendif End If you want the lights to appear with the stone, just remove the timer condition or put the number to 0 Link to comment Share on other sites More sharing options...
DSoS Posted January 9, 2010 Author Share Posted January 9, 2010 Alright, well the Object script should be something like : short lightfloat timer Begin OnActivate Player if ( light == 0 ) StoneRef.Enable set timer to 3 set light to 1endif End Begin GameMode if ( light == 1 ) if ( timer > 0 ) set timer to timer - GetSecondsPassed else Light01Ref.Enable Light02Ref.Enable StoneRef.Disable HolderRef.Disable set light to 2 endifendif End If you want the lights to appear with the stone, just remove the timer condition or put the number to 0 Oh wow, thank you very much for using your time to help me. I really appreciate it. I'm going to play around with it, and see if I can learn about the light scripts. Thank you again Kudo's to you :) Link to comment Share on other sites More sharing options...
proutos Posted January 10, 2010 Share Posted January 10, 2010 Glad to help you, thanks for the kudos. Link to comment Share on other sites More sharing options...
DSoS Posted January 11, 2010 Author Share Posted January 11, 2010 Another script, but I have the majority of it, just not sure how to implement a timer. * I need the message triggered only once.* After player enters the Trig Zone, I need a message to pop-up (Message in Code already) Note, I'm using a modified renamed script from OB, its the TrigZonePlayer01 (or something close to that) (But I don't think that matters since I've created my own script for what I need it to do) scn MalamathTrigZoneNoteTestSCRIPT ; Activates linked Parent object once ; Gives Message 2 Seconds after Trig short triggered ref target ref mySelf begin onTrigger player if triggered == 0 set triggered to 1 set target to getParentRef set mySelf to getSelf target.activate mySelf 1 messagebox "I heard a rumbling from where I just came from. Maybe I should check it out" endif end begin onReset set triggered to 0 end ------------- Slightly off-topic of this post, but important for me to know.... Is there a limit of how many "Persistent References" that can be used per cell? EX. I have a very very large ayleid ruin (my mod) and I currently have the following, and will have many many more of each in this current cell, all "Persistent References": * 11 Secret Walls (I currently don't have any "dust activators setup currently, so there will be that many more added)* 7 switches* 6 Evil Stones (zOMG 0.o)* 8 TrigZones (Including my custom scripted one above)I may have more or less of each, though that's all that I saw in the cell view object list. ------------ Thanks in advance again :) Link to comment Share on other sites More sharing options...
proutos Posted January 12, 2010 Share Posted January 12, 2010 I don't think there's a limit to refs. In your second script, you can maybe use this : Begin OnTrigger Player if triggered == 0 set timer to 2 set triggered to 1elseif triggered == 1 if timer > 0 set timer to timer - GetSecondsPassed else set target to getParentRef set mySelf to getSelf target.activate mySelf 1 messagebox "I heard a rumbling from where I just came from. Maybe I should check it out" set triggered to 2 endifendif End I don't know if timer will go right in OnTrigger mode, maybe you should make it decrease in GameMode instead. Note also that if you set your variable "triggered" to 0 with the OnReset block, all your script will be reinitialized and ready to work again. Link to comment Share on other sites More sharing options...
DSoS Posted January 12, 2010 Author Share Posted January 12, 2010 I don't think there's a limit to refs. In your second script, you can maybe use this : Begin OnTrigger Player if triggered == 0 set timer to 2 set triggered to 1elseif triggered == 1 if timer > 0 set timer to timer - GetSecondsPassed else set target to getParentRef set mySelf to getSelf target.activate mySelf 1 messagebox "I heard a rumbling from where I just came from. Maybe I should check it out" set triggered to 2 endifendif End I don't know if timer will go right in OnTrigger mode, maybe you should make it decrease in GameMode instead. Note also that if you set your variable "triggered" to 0 with the OnReset block, all your script will be reinitialized and ready to work again. awww, crap I'm sorry, I forgot that I posted this. I actually don't need it anymore. I went a different route with that trigger. However I will use it with a different trigger that I need another message to show. :) Thanks again. Oh BTW, you are Definitely getting a NPC named after you (if that's fine with you)....because I need another script (I'll give details in the next post) I have tried to learn the scripting though I'm not the best with learning stuff like this. It took me 8-months to learn basic html :( Link to comment Share on other sites More sharing options...
DSoS Posted January 12, 2010 Author Share Posted January 12, 2010 Ok for that other script that I need. This will be placed on a door. What I need it to do is.... Not to allow the player to pass until the area has been lit up (script from my first post above)then to have a message (that I'm not sure what it is right now, but if you could do this script, just place a bunch of gibberish in the message area)Once the player has finished that quest for lighting up the area, then the player can pass this door. Kudos again if you can get this one done :) Link to comment Share on other sites More sharing options...
Recommended Posts