Full Version : Simple lever/ Timed lever
xmlspawner >>Q&A >>Simple lever/ Timed lever
<< Prev | Next >>
fenris- 08-03-2006
im trying to use these levers to open a door, but i only want it to work once, then not funtion after it has been used.
this is what i have so far with simple and timed lever.
simplelever/target1item/xxxxxxxxxx/Target1property/@/open/true/MSG/Quickly before it closes!
what would i add in there so once the lever has been pulled, you can't keep double clicking it to reopen the door?
thanks fenris.
ArteGordon- 08-04-2006
I would just set the target0item to point to the lever itself, and have the target0property set to "/disable/true". That way when the switch was set back to the 0 state position it would disable it from being operated again.
You are going to need to assign that target0property in a different entry because of the need to use the @ operator again, like this
subgroup 1: simplelever/target1item/xxxxxxxxxx/Target1property/@/open/true/MSG/Quickly before it closes!
subgroup 1:SETONSPAWN,1/target0item/GETONSPAWN,1,serial/Target0property/@/disabled/true
fenris- 08-04-2006
Ok Arte, ill try that.
WooHoo! worked great thanks again Arte.
fenris- 08-13-2006
Hi Arte,
i have another question, using the same formula as this:
subgroup 1: simplelever/target1item/xxxxxxxxxx/Target1property/@/open/true/MSG/Quickly before it closes!
subgroup 1:SETONSPAWN,1/target0item/GETONSPAWN,1,serial/Target0property/@/disabled/true
what im a trying to do is set up a spawner to have multiple levers on it that do different thing, then disable as above until they respawn again picking one at random everytime it respawns.
The above works great if your only spawning one lever on it, but when i try to add more thats where i run into a problem.
ArteGordon- 08-14-2006
just put them in different subgroups
subgroup 1: simplelever/target1item/xxxxxxxxxx/Target1property/@/open/true/MSG/Quickly before it closes!
subgroup 1:SETONSPAWN,1/target0item/GETONSPAWN,1,serial/Target0property/@/disabled/true
subgroup 2: simplelever/target1item/xxxxxxxxxx/Target1property/@/open/true/MSG/Do this one quickly too!
subgroup 2:SETONSPAWN,2/target0item/GETONSPAWN,2,serial/Target0property/@/disabled/true
fenris- 08-14-2006
yes i have tried to assgin them different sub groups, but even though it does pick one at random for some reason they do not disable, so you can keep clicking it and its still active.
ArteGordon- 08-14-2006
post the XML for the spawner that you are having trouble with and I can take a look.
fenris- 08-14-2006
this is how i have it se up now,
subgroup 1: simplelever/target1item/xxxxxxxxxx/Target1property/@/open/true/MSG/Quickly before it closes!
subgroup 1:SETONSPAWN,1/target0item/GETONSPAWN,1,serial/Target0property/@/disabled/true
subgroup 2: simplelever/target1item/xxxxxxxxxx/Target1property/@/ADD/<woodenchest/ADD/LOOTPACK,superboss>/MSG/Yay, im rich!
subgroup 2:SETONSPAWN,2/target0item/GETONSPAWN,2,serial/Target0property/@/disabled/true
thanks for helping with this arte.
ArteGordon- 08-15-2006
the problem is that you have the spawner MaxCount set to 1, so it cannot spawn both entries in a subgroup. Just change it to 2.
fenris- 08-16-2006
sorry arte, i did also try the maxcount at 2, but when it respawns by its self it ends up spawning both switchings instead of one, and ignores the action to disable, sorry i didn't add that in the above question, thats why i tried the 1 count and that didn't work either.
it works fine when its first set up with the maxcount of 2, but the problem is when it respawns.
ArteGordon- 08-16-2006
you are right. It isnt supposed to do that. It should only respawn a subgroup if it can respawn all of the members of that subgroup.
I will check on it.
fenris- 08-16-2006
thanks arte.
ArteGordon- 08-20-2006
I have modified the way that random subgroup spawning works. Now subgroups that cannot be completely spawned (all spawn entries have to be below their individual maxcount, and fully spawning the subgroup cannot exceed the overall spawner maxcount) will not be spawned.
This is an update to xmlspawner2.cs in the v3.15 beta.
This should address this issue
fenris- 08-21-2006
cool arte, soon as the owner of our shard can load that ill be in business.
DrussRob- 08-24-2006
Do you forsee any problems with running this 3.15 beta on a beta 36 RunUO version?