biscut247 Posted January 7, 2010 Share Posted January 7, 2010 :wallbash:Okay. I looked at every tutorial I could find, but that didnt help at all. :wallbash: I understand IF statements and actions like <REFID>.Add/remove item or <REFID>.kill/disable/placeatlocation I just dont understand things like counts and markers (damn markers) or any advanced scripting actions. I dont even understand LINKS! :wallbash: (like what i click first to link it right.) Any clarification on these things would be helpful. Link to comment Share on other sites More sharing options...
TheChan Posted January 8, 2010 Share Posted January 8, 2010 :wallbash:Okay. I looked at every tutorial I could find, but that didnt help at all. :wallbash: I understand IF statements and actions like <REFID>.Add/remove item or <REFID>.kill/disable/placeatlocation I just dont understand things like counts and markers (damn markers) or any advanced scripting actions. I dont even understand LINKS! :wallbash: (like what i click first to link it right.) Any clarification on these things would be helpful.You should first be more clear yourself before asking for clarification. What do you mean by "counts" and what don't you understand about markers? Link to comment Share on other sites More sharing options...
biscut247 Posted January 8, 2010 Author Share Posted January 8, 2010 You should first be more clear yourself before asking for clarification. What do you mean by "counts" and what don't you understand about markers? Counts. you know, the scripting function used to see whats in your invintory.EXAMPLE: short count set count to player.GetItemCount caps001 and I dont even know how to USE a marker. :(i cant find a legitamite tutorial... sorry Link to comment Share on other sites More sharing options...
Quetzlsacatanango Posted January 8, 2010 Share Posted January 8, 2010 If you can explain what you're trying to accomplish it might be easier to answer your question. Link to comment Share on other sites More sharing options...
pkleiss Posted January 9, 2010 Share Posted January 9, 2010 In order to reference any object (like an Xmarker) in a script, it needs two things: 1) It needs to be persistent2) It needs an Editor Reference ID Both of these can be set by double clicking on the object in the render window. In the case of an Xmarker, it is automatically set to be persistent anyway, so all you need to do is give it an Editor Reference ID. Once you have done these two things, you can reference the object in a script by its Editor Reference ID. So, lets say you have an Xmarker called "MyXMarker". Now you also have a light in the cell. If you double click on the light in the render window and then go to its "Enable Parent" tab, you can link this light to the Xmarker. Click the "Select Reference in Render Window" button. Your cursor will change to a red cross hair. Move it over the Xmarker and it will turn white. Click the cursor and the enable parent tab of the light will come back with the xmarker selected as the enable parent of the light. Why do this? Now if in a script you use this: MyXmarker.disable The light will turn off because as the xmarker was disabled, so to will the light be disabled. You could set many lights up having the Xmarker as their enable parent and they would all go off when the above command was used. And if you then do this: MyXmarker.enable All of the light will turn back on. The Linked Ref and Activate Parent work similarly but for different purposes. If you want a switch to activate a door, you use the "Activate Parent" tab ion the door to link it to the switch. Then when you activate the switch, the door will acticvate as well. In this case the switch must be a persistent reference in order to be used as a parent of the door. If it isn't persistent, your red crosshair won't turn white when you are selecting the parent. And that is a brief overview. Link to comment Share on other sites More sharing options...
biscut247 Posted January 9, 2010 Author Share Posted January 9, 2010 Ah so Xmarkers are like a representation of whatever you link it to?like, instead of Light.disableghoul.disableroom.disable it would be Xmarker.disable Link to comment Share on other sites More sharing options...
Quetzlsacatanango Posted January 9, 2010 Share Posted January 9, 2010 As long as you set the marker as its enable parent. You don't have to just use them to turn things on and off. You could use them to set up patrols and things like that as well. Link to comment Share on other sites More sharing options...
biscut247 Posted January 9, 2010 Author Share Posted January 9, 2010 I see. Heres a pretty specific question.How do I set up a script in a terminal with an IF statement?like, if i wanted to do a comand like "Toggle Lights" Link to comment Share on other sites More sharing options...
biscut247 Posted January 9, 2010 Author Share Posted January 9, 2010 Terminals annoy me... Link to comment Share on other sites More sharing options...
TheChan Posted January 10, 2010 Share Posted January 10, 2010 As long as you set the marker as its enable parent. You don't have to just use them to turn things on and off. You could use them to set up patrols and things like that as well.It should be noted that there is an option to set its Enable state to the opposite of its parent's. This is particularly useful if you are using something like the vault ceiling light, which has an on and an off model. You can just put one of each in the exact same spot, and have only one of them visible at a time. I see. Heres a pretty specific question.How do I set up a script in a terminal with an IF statement?like, if i wanted to do a comand like "Toggle Lights"I'm not sure if you can. Have you tried it? If ( [color="#FF0000"]variable[/color] == 1 ) [color="#FF0000"]reference[/color].disable set [color="#FF0000"]variable[/color] to 0 Else [color="#FF0000"]reference[/color].enable set [color="#FF0000"]variable[/color] to 1 Endif I just have one option to turn on the lights, and one to turn them off. Link to comment Share on other sites More sharing options...
Recommended Posts