Tenderfoot Thahd ShadoWrack Posted September 8, 2004 Share Posted September 8, 2004 Hey folks I'm back to boe and i've decided to make a funny scenario of some of my(not exactly but..) private life things and i've got into problems in defining flags or using the conditioning methods.. It's like i don't get the stuff made flags idea so i need your help explaing me it in a simple way so lets give an example of what i stucked with.. I've made a special for a gate which get closed after passsing it into a building and in order to open it i've made a special inside that building that opens it back , Now the problem is that i dunno how to disable the special that closes the gate after the special that opens the gate have been activated , so.. How do i make the condition that the gate will only be closed if lets say.. A=0 and it won't be active when A=1 and how do i change the integer with the gate opener special.. If you don't understand what i've just wrote ill try to explain it again later. Thanks ahead. Quote Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted September 8, 2004 Share Posted September 8, 2004 Okay, the first thing you need to appreciate is that A and B are not Stuff Done Flags. A and B are a pair of numbers which point to a Stuff Done Flag, which is itself another number. So (1,2) is the Stuff Done Flag with A = 1 and B = 2, and it could contain any number from 0 to 250. So let's say you're setting SDF (1,2) to a value of 1 to denote the fact that the gate has been opened. When you want the gate to open, have the Change Terrain node (or whatever node you're using to open the gate) jump to a Set Flag node. In the Set Flag node, set SDF Part A to 1, SDF Part B to 2, and "Value to change to" to 1. Now, when you need to check whether the gate has been opened, use a Stuff Done Equal? node with SDF Part A set to 1 and SDF Part B set to 2, and check if the SDF is equal to 1. If the SDF is equal to 1, the gate should stay open; jump to -1 and end the chain. If it isn't, the gate should be closed if it isn't already; jump to a Change Terrain node and change the gate to a closed gate. If I'm reading what you've written correctly, there are probably prettier ways to do what you're trying to do, and you can do all sorts of other fancy things like playing sounds when the gate opens and closes, but this should work if you set it up right. There's an SDF tutorial here if you need more help. Quote Link to comment Share on other sites More sharing options...
Tenderfoot Thahd ShadoWrack Posted September 8, 2004 Author Share Posted September 8, 2004 Oh man thanks it works! So what does the "stuff done flags?" good for? If i'm right it's to set a minimum to a flags that been setted.. but it doesn't work to me.. , Its only workin with stuff done equal thingy.. Quote Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted September 8, 2004 Share Posted September 8, 2004 The Stuff Done Flag? node is useful for checking a flag that could have multiple values. For example, if a flag could be equal to 0, 1 or 2, you could use the Stuff Done Flag? node with "If at least this" set to 2 to check if the flag is equal to 2 and "If less than this" set to 1 to check if the flag is equal to 0. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.