Okay I've set up some forcefields (using Ed the Monkey's green forcefield sprite) tagged them lvl1, lvl2 etc and set the door entities as laser doors. Then because I couldn't figure away of setting up an emitter that could be disabled by using the repair skill without setting up hundreds of mini-zones, I set up a series of switches that need a key.
The forcefields are initially down, and come on when an alarm is triggered.
In my startup trigger I've set the object script state of the forcefields as checked (with Ed's sprite this opens them), the door switches as checked and a variable 'forcefields_on is false'.
Then when the alarm goes off I set the object script state as unchecked, this raises them fine (you'd better not be in a doorway when they go up!) and I've set the variable to 'forcefields_on is true'.
When the key is used on the switch it lowers them fine but here's where my problem is. I've set up a science switch as a central switch which disables the forcefields permanently (this is what I need the variable for) the normal switches are only meant to lower the forcefields temporarily. The key works and the forcefields turn off, then after a short time turn back on again (and this is the problem part) they then promptly turn back off, then on, then off etc etc.
The trigger for the switch is
preserved
conditions:
variable 'forcefield_on' is true (turning off the science switch will set this variable to off)
object script state 'door_switch_lvl1' unchecked.
actions:
object script state 'lvl1' checked
B wait 20 seconds
object script state 'door_switch_lvl1' checked
B wait 1 second
object script state 'lvl1' unchecked
Anyone know what I've done wrong?
Cheers
Object script state, what am I doing wrong?
- requiem_for_a_starfury
- Hero of the Wastes
- Posts: 1820
- Joined: Tue Oct 29, 2002 11:13 am
Object script state, what am I doing wrong?
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
Twisted by knaves to make a trap for fools,
- Max-Violence
- Wandering Hero
- Posts: 1221
- Joined: Thu Apr 18, 2002 4:15 am
- Location: In my own personal vault
- Contact:
- Make sure all triggers dealing with the doors are Preserved
- Double-check all tagnames (both on the actual entities and in your triggers)
- You might want to throw in anooter variable, something like main_switch_used and add that to the conditions. It seems to me that the game is firing the "mini-switch" triggers over and over.
- Throw in an action in your "main switch" trigger to set the OSS of the "mini switches" to off/disabled/etc. (This one should do the trick.)
Closing our eyes forces us to look
At the darkness inside.
Our emotions always find us
Regardless of where we hide.
maxviolence@hotmail.com
http://mvmaphub.duckandcover.cx <--- Updated July 10th, 2006
At the darkness inside.
Our emotions always find us
Regardless of where we hide.
maxviolence@hotmail.com
http://mvmaphub.duckandcover.cx <--- Updated July 10th, 2006
- requiem_for_a_starfury
- Hero of the Wastes
- Posts: 1820
- Joined: Tue Oct 29, 2002 11:13 am
Hmm I want the override switch to fire only once, so I didn't preserve the triggers for the this switch, will give that a try.Max-Violence wrote:
- Make sure all triggers dealing with the doors are Preserved
All tagnames are cut and pasted but will double check.Max-Violence wrote:[*]Double-check all tagnames (both on the actual entities and in your triggers)
Isn't this what my variable is already doing? I've set up 4, one for each level, when the forcefields are turned on intially the variable are set to true, when the override switch is thrown the variable is set back to false.Max-Violence wrote:[*]You might want to throw in anooter variable, something like main_switch_used and add that to the conditions. It seems to me that the game is firing the "mini-switch" triggers over and over.
Okay will try that as wellMax-Violence wrote:[*]Throw in an action in your "main switch" trigger to set the OSS of the "mini switches" to off/disabled/etc. (This one should do the trick.)[/list]
Okay cheers for the help MV, will try out your suggestions, but I quite like the on/off effect. I might try messing about with the timing, it makes it quite dangerous to go through the doorways .Max-Violence wrote:I remember I had your exact problem when I was doing DDCh5 -- IIRC all of the gates in the map have 2 switches than can open/close them. If one switch was thrown, the gate would open. Then, if I threw the other switch, it would close then open then close forever. It did this because the OSS of the first switch is "on," and the game sees that and it opens the gate. Then it sees the second switch as "off" and closes it. It keeps doing this until either both switches' OSS match or the mapper fixes the problem
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
Twisted by knaves to make a trap for fools,
- Max-Violence
- Wandering Hero
- Posts: 1221
- Joined: Thu Apr 18, 2002 4:15 am
- Location: In my own personal vault
- Contact:
So, you want the doors to sporadically turn off and on? Then, erm, what's the problem?requiem_for_a_starfury wrote:but I quite like the on/off effect. I might try messing about with the timing, it makes it quite dangerous to go through the doorways .
Closing our eyes forces us to look
At the darkness inside.
Our emotions always find us
Regardless of where we hide.
maxviolence@hotmail.com
http://mvmaphub.duckandcover.cx <--- Updated July 10th, 2006
At the darkness inside.
Our emotions always find us
Regardless of where we hide.
maxviolence@hotmail.com
http://mvmaphub.duckandcover.cx <--- Updated July 10th, 2006
- requiem_for_a_starfury
- Hero of the Wastes
- Posts: 1820
- Joined: Tue Oct 29, 2002 11:13 am
No I don't, but I did quite like the effect.Max-Violence wrote:So, you want the doors to sporadically turn off and on? Then, erm, what's the problem?
Ah well I've totally revamped the triggers, using loads of (probably redundant) variables. Now I just need to set up my lights and then I can start playtesting properly. Only 2 days late.
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
Twisted by knaves to make a trap for fools,