StonersCharm Posted June 7, 2010 Share Posted June 7, 2010 Im wanting to move from stage 87 to stage 90 using script. This is what i have: If (Player.GetInCell (interior cell) == 1) If (DoOnce5 == 0) SetStage ADA01 90 Set DoOnce5 to 1 EndIfEndIf It compiles but doesnt work in the game. Any help appreciated. Link to comment Share on other sites More sharing options...
ub3rman123 Posted June 7, 2010 Share Posted June 7, 2010 Do you have multiple begin GameMode blocks in the same script? Link to comment Share on other sites More sharing options...
theuseless Posted June 7, 2010 Share Posted June 7, 2010 Hmmm. I usually like to run a piece into my script such as setstage tUL665TharnsteinMain 10 player.AddItem "skull01" 30 This allows me to know at each step of the way where my problem is. If you have multiple places that look dodgy, I add a multiplyer. For example, the first problem area will add 3, the second problem area will add 30, the third will add 300, the fourth will add 3000, etc. So if your script works all but the second part, you will end up with 3303 skulls (3333 minus the second part, or 30). You can use any numbers you wish, I just found this method to work when writing complex codes. As to your question, I am fairly sure that your problem is that you are using variable counter. I could be wrong. I would try to use a trigzone box in this case. If it is an area that you can't access until the quest is about to update, you could just run: Scriptname tUL665tharnstDrawbridgeTriggerZoneOperatorScript short triggered begin onTrigger player if triggered == 0 SetStage ADA01 90 Set triggered to 1 disable TrigzoneNameHere endif End Begin onReset if triggered == 1 disable TrigzoneNameHere endif End You might want to try experimenting with this a bit. I find that when I can't get something that should work to work, If I approach it from a different angle it will work. You can also try to call stage steps, such as If (GetStage ADA01 == 89) && (Player.GetInCell (interior cell) == 1) SetStage ADA01 90 EndIf Also, yes, too many begin GameMode blocks is bad. Try to make begin OnActivate and run the scripts on a switch or trigzone or something. Hope this helps,theuseless Link to comment Share on other sites More sharing options...
StonersCharm Posted June 7, 2010 Author Share Posted June 7, 2010 No I only have one begin gamemode so far. Does it help to break things up into multiple begin gamemodes? Or is it best to keep relevent script in one? TheUseless, That was actually very helpful. Thank you very much. Link to comment Share on other sites More sharing options...
theuseless Posted June 11, 2010 Share Posted June 11, 2010 Well, the fewer beginGameMode the better. The game will constantly try to run these scripts (about once every 3 seconds). I stay away from them like the plague. 99.9 percent of the time, you can get away with using a different trigger. I read something brilliant here that a dude posted, saying that he uses activators either burried under the cell or in a wall etc. Then he runs it as beginOnLoad. That way the script begins when the cell is loaded, providing that the variable conditions are met (such as If (GetStage ADA01 == 89). So in this way he is setting his trigger to activate only when you are at the particular quest stage. Otherwise the activator is invisable (out of viewing range) so it can't be activated on mistake. No, it is not better to split the scripts up into multiple beginGameMode. If you find that you absolutely have to use a beginGameMode, I like to run it on a quest script. I set the quest as initially disabled, the run a string of conditions that when met will reset the quest variables, then deactivate it. If you need an example, I could post my code here. Basically, there are more than one way to skin a mule. I'm not going to be online too much in the next week, but I will try to help you more if you end up needing it. theuseless Link to comment Share on other sites More sharing options...
StonersCharm Posted June 14, 2010 Author Share Posted June 14, 2010 Thank you very much for your help. and yeah, an example would be great. Thanks again. Link to comment Share on other sites More sharing options...
Recommended Posts