Serrieth Posted December 9, 2003 Share Posted December 9, 2003 I am working on a mod and well I did a quest where you must find a Fire Guard(Goes on the right hand) and you must use it to pick up another item. I put in the script Begin TooHotScrip ;If the player doesnot have the Fireguard then display msgbox and can't pick up;item;If the player does have the fireguard then he/she can pick up item. if ( OnAcrivate == 1 ) if ( Player->GetItemCount fireguard < 1 ) MessageBox " " "ok" return elseif ( Player->GetitemCount Fireguard > 1 ) (What do I put?) endifendif End I'm not sure if I should put 'return' after the elseif or before the elseif, Also what does the command return mean? :help: Link to comment Share on other sites More sharing options...
Switch Posted December 9, 2003 Share Posted December 9, 2003 1: Wrong forum, moving this to TES CS. 2: Return is a command that stops the game from reading the rest of the script. So when it runs into the Return command, it will ignore the rest of the script. 3: It should read If ( OnActivate == 1 ) not Acrivate :P 4: It should be If ( Player -> GetItemCount Fireguard == 1 ) unless it needs to be set so it checks if the player has MORE than one of the item. 5: Hmm... maybe put: Player -> AddItem, "IDOfItemYouWantToPickUp" 1IDOfItemYouWantToPickUp -> Disable That should add it to the player's inventory and make the item disappear from the game world. Link to comment Share on other sites More sharing options...
Marxist ßastard Posted December 9, 2003 Share Posted December 9, 2003 Just do activate... It'd do the same thing as Switch's two lines, but without that iffy self-disable routine. Begin TooHotScrip If ( OnActivate == 1 )If ( Player->GetItemCount FireGuard == 0 )MessageBox "The object is too hot to be touched." ;Replace with whatever you want to go here; a game-stopping messagebox would be pretty useless unless you're going to give the PC a choice...Return ;This won't break the script as it's in a conditional...Else ;Support for multiple FireGuards... Don't ask.ActivateEndIfEndIf ; Ahem... Forgetting something? How about we put the script name after End... End TooHotScript Or, if you want to have the message displayed until the PC equips FireGuard, make a short global and put this script on FireGuard... Begin FireGuardEquip If ( OnPCEquip == 1 )Set GLOBAL_REPLACE to 1 ;Replace GLOBAL_REPLACE with the name of your globalEndIf End FireGuardEquip ...and modify TooHotScript like so... Begin TooHotScrip If ( OnActivate == 1 )If ( GLOBAL_REPLACE == 0 ) ;Same thing, replace GLOBAL_REPLACE with the name of your globalMessageBox "The object is too hot to be touched."ReturnElseActivateEndIfEndIf End TooHotScript Link to comment Share on other sites More sharing options...
Serrieth Posted December 11, 2003 Author Share Posted December 11, 2003 I did not knowActivate was a command/Function? :whistling: I'll try your modifictions and see if it will work Thanks Link to comment Share on other sites More sharing options...
the00phoenix Posted December 12, 2003 Share Posted December 12, 2003 Just for the sake of completness:OnPCEquip has to be declared in order to work properly, otherwise you'll get the "EXPRESSION" script error.Begin FireGuardEquipShort OnPCEquipIf ( OnPCEquip == 1 )Set GLOBAL_REPLACE to 1 ;Replace GLOBAL_REPLACE with the name of your globalEndIf End FireGuardEquip Link to comment Share on other sites More sharing options...
Serrieth Posted December 23, 2003 Author Share Posted December 23, 2003 This is a script that I'm working on, and nothing is working, can anyone help me out? The Script is to move a rock down when the Player gets close enough. :help: Begin OpenRock Short donefloat timerspeedfloat timer if ( MenuMode == 1 ) returnendif if ( GetDistance, player < 10 ) Set done to 1endif if ( done < 1 ) returnendif Set timerspeed to 1 Set timer to timer + Getsecondspassed if ( Timer >= timerspeed )PlaySound3DVP "Stone Door Open 1" 1.0, 1.0 Position Z, - 10 Rotate Z, 0 endifendif if ( Position , ,5418 < 5052 ) Set done to -1else Set done to 1endif end Link to comment Share on other sites More sharing options...
german_man Posted December 25, 2003 Share Posted December 25, 2003 Im not sure completely y i does not work but herres for starters... 1. some of those commands may need to be declared 2. change if ( done < 1 ) to if ( done != 1 ) 3. Im not usre but this doesnt look right ... Position Z, - 10 Rotate Z, 0i dont thinnk position is a script command (note i may be wrong) Thats all that i can see otherwise it should work. Link to comment Share on other sites More sharing options...
Serrieth Posted January 20, 2004 Author Share Posted January 20, 2004 Okay a little problem here, How do I work with GLOBALS I have no idea how to work them and I'm sure its simple but I try to make a script were it does not need to be placed inside of an item. Is this how you make one? Begin "" startscript "" StopScript "" End What do I do? Please answer me! Link to comment Share on other sites More sharing options...
Guest Posted January 20, 2004 Share Posted January 20, 2004 global scripts? for a global script, say we have the script "Im_Jimmy" basically you would have a script, or the results of a dialogue that saidStartScript, "Im_Jimmy" then you would have the script: Begin Im_Jimmy short progressshort bla If ( Progress == 1 )StopScript, "Im_Jimmy"endif ;this stops the script when you dont need it anymore if ( bla == 1 );when done put this:Set Progress to 1endif end Link to comment Share on other sites More sharing options...
Serrieth Posted January 20, 2004 Author Share Posted January 20, 2004 hmmm I'll try that, just I don't know how to test to see if its working? How do I know if its working? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.