Full Version : Help giving players a key when going through a .
xmlspawner >>Q&A >>Help giving players a key when going through a .


<< Prev | Next >>

Ebil- 06-05-2006
I need help, how can i get teh xml spawner to give a players a key that unlocks one chest in a certain location when they walk through a halway, then take it from them when they exit through the same hallway? ive been trying for over and hour and no luck, please help me.

gizmo- 06-06-2006
Only way I can think of is doing something along the lines of what your wanting.


Hallway
================================================
|D|
(3) |O| (2) (1)
|O|
|R|
================================================


1) Have Spawner 1 set up like this
a) When player gets near GIve the key
cool.gif Set the Refract Min Max on the trigger to x min to x min
c) If this spawner triggers have it Turn in Spawner 3
2) Have Spawner 2 set up like this
a) When Player walks by and they have key remove it.
cool.gif When it takes key, turn itself off.

3) Have Spawner 3 set up like this.
a) When player gets in range, turn on spawner 2.
cool.gif then turn this spawner off after it turns on spawner 2.


What this would do is, when player wals to 1 and its after the refract time. The spawner will give the key. Then it will turn on the Spawner 3 behind the door. when the player goes into your room or passes the doors. it will kick the Spawner 2 on. that way after they clear that room past the door or what ever you are having them do. when they exit the room. they will pass spawner 2 which will take the key.

Ebil- 06-06-2006
how coudl i set the spawner that gives the key to that it will only give it to you if you are not holding it already . . . with out messing wit hthe refract times?

Ebil- 06-06-2006
somone pelase help, all i need to do now is make it so that the key wont appear in the palyers pack if they already have it when they go throug the proximety

ArteGordon- 06-06-2006
If you name the key, you can just set the NoTriggerOnCarried property on the spawner to something like

nameofkey,key

If you didnt want to do that, you could set up a sequential spawner with a spawn entry that tested for the unnamed carried key with a particular property value

subgroup 1: IF/GETONCARRIED,,key,keyvalue=12345/33
subgroup 1: GOTO/1

and you put the entry to hand out the key in subgroup 33

or the easiest solution is if you have v3.10 installed you could use the new #CONDITION spawn control keyword to make the spawn entry conditional on that test like


#CONDITION,GETONCARRIED,,key,keyvalue=12345 ; your spawn entry to hand out the key

Ebil- 06-06-2006
i dont get the subrogup thing, how do i set up a sequential spawner? sorry if i sound liek a total idiot man, i really do appreciate you taking the time to help me.

Ebil- 06-06-2006
i tried all those and none of them will work . . . i tryed the #condition one and it dosent spawn the key at all


#CONDITION,GETONCARRIED,,key,keyvalue=1 ; GIVE,1/<key/keyvalue/1> theres what i put

Ebil- 06-06-2006
here is how its set up

ArteGordon- 06-07-2006
QUOTE (Ebil @ June 06, 2006 01:19 pm)
i tried all those and none of them will work . . . i tryed the #condition one and it dosent spawn the key at all


#CONDITION,GETONCARRIED,,key,keyvalue=1 ; GIVE,1/<key/keyvalue/1> theres what i put

#CONDITION,GETONCARRIED,,key,keyvalue=1 ; GIVE,1/<key/keyvalue/1>

that will only give out the key when the player is already carrying a key with keyvalue of 1.

If you want to give it out if they are NOT carrying it, then invert the test with the NOT operator '~'

#CONDITION,~GETONCARRIED,,key,keyvalue=1 ; GIVE,1/<key/keyvalue/1>