ForeverNight Posted June 10, 2008 Share Posted June 10, 2008 I've been working on an edited module, using the most overused module: the Lower Sewers of Taris. And, in the process, I've ran into another snag, this one with, you guessed it, scripts! void oDoor=mff ActionOpenDoor(object oDoor) This is the script I've been trying to work with, however, I keep on getting an error saying that I can't use a string constant. So, I was wondering if anybody here who actually understands scripting could help me with a script that opens up a door that can fire from a dialog? Thanks in advance! Link to comment Share on other sites More sharing options...
zbyl2 Posted June 10, 2008 Share Posted June 10, 2008 Open door in dialog? No problem! void main() { objec oDoor = GetObjectByTag("your_door_tag"); AssignCommand(oDoor, ActionOpenDoor(oDoor)); } Should work. I hope I help. Link to comment Share on other sites More sharing options...
stoffe Posted June 10, 2008 Share Posted June 10, 2008 void oDoor=mff ActionOpenDoor(object oDoor) This is the script I've been trying to work with, however, I keep on getting an error saying that I can't use a string constant. If the tag of the door in question is mff, then something like this should work: void main() { object oDoor = GetObjectByTag("mff"); SetLocked(oDoor, FALSE); AssignCommand(oDoor, ActionOpenDoor(oDoor)); } It retrieves a reference to the object with the tag mff (your door) in the area where the script is run. It then unlocks the door (if locked), and makes the door open itself. Link to comment Share on other sites More sharing options...
ForeverNight Posted June 10, 2008 Author Share Posted June 10, 2008 Well, I think it should say object oDoor.... But, thanks! I'll compile it and get back to you.... Thanks also, Stoffe! I am so glad that some people actually understand scripting! Link to comment Share on other sites More sharing options...
EnderWiggin Posted June 10, 2008 Share Posted June 10, 2008 If the tag of the door in question is "mff", then something like this should work: void main() { object oDoor = GetObjectByTag("mff"); SetLocked(oDoor, FALSE); AssignCommand(oDoor, ActionOpenDoor(oDoor)); } It retrieves a reference to the object with the tag mff (your door) in the area where the script is run. It then unlocks the door (if locked), and makes the door open itself. Wow, that was fast you guys. I was about to do the same thing but as soon as I posted I saw I had been beaten twice _EW_ And ForeverNight? You're right, it should be object oDoor. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.