Full Version : Simon Says
xmlspawner >>XMLSpawner Mods and Tips >>Simon Says
<< Prev | Next >>
Xavier_WER- 08-14-2007
Hey spawners, been a while since I posted,
Just wanted to share with you a spawn.
When I created this is was firstly just to see if it could actually be done,
I want to warn any pro spawners out there and this is quite a "ugly" system.
It uses a bunch of spawners, I know it could be cut down to much less
But this is just the first version to see if it was possible.
NOTE: The names of the spawners "Entered Combo" and "Main Spawner" isnt
their actual name ingame. Their name changes.
This is the system that activates the whole thing.
"Initializer" Spawner.
Min/Maxdelay zero
Group true
Externaltriggering True
Exttrigstate True
Proximityrange 3
Sequentialspawn 1
SETItem - "Main Spawner"
Speechtrigger "start"
Subgroup 1:
SETVAR,TrigPlayer/{GETONTRIGMOB,serial}
SETONTHIS/speechtrigger/""/externaltriggering/false/exttrigstate/false/proximityrange/-2/spawnontrigger/true
SENDMSG,33/Starting Game!
SET/doreset/true/running/true/homerange/4
Subgroup 2:
SET/doreset/true/running/true/homerange/6
SET,{GETVAR,TrigPlayer}/SAY/Good work! 3 more rounds to go
Subgroup 3:
SET/doreset/true/running/true/homerange/8
SET,{GETVAR,TrigPlayer}/SAY/Good work! 2 more rounds to go
Subgroup 4:
SET/doreset/true/running/true/homerange/10
SET,{GETVAR,TrigPlayer}/SAY/Good work! Just one to go
Subgroup 5:
SET,{GETVAR,TrigPlayer}/SAY/You win!/ADD/<gold/amount/500>
GOTO/11
Subgroup 10:
SET,{GETVARTrigPlayer}/SAY/You lose!/poison/Deadly
GOTO/11
Subgroup 11:
SETONTHIS/externaltriggering/true/exttrigstate/true/proximityrange/3/speechtrigger/start/spawnontrigger/false
SETONNEARBY,3,,TimedSwitchableItem/visible/false
"Main Spawner"
Group True
Min/MaxDelay 1 second
Running False
SequentialSpawn 1
Subgroup 1:
SET,(serial of the center crystal)/visible/false
SETONNEARBY,5,,simplelever/visible/false
SETONTHIS/name/""
SET,(Serial of "Entered Combo" spawner)/name/""
Subgroup 2:
IF/{GETONTHIS,HomeRange}!0/3/5
SETONTHIS/SETItem/(Random str list of the 4 spawners at each of the colored levers)
Subgroup 3:
SET/proximityactivated/true
SETONTHIS/Homerange/INC,-1
GOTO/3
Subgroup 4:
GOTO/2
Subgroup 5:
SETONTHIS/running/false
SET,(serial of the center crystal)/visible/true
SETONNEARBY,5,,simplelever/visible/true
"Combo Checker" Spawner
Group true
Min/maxdelay zero
Proximityrange -2
Sequentialspawn/1
SETItem "Initializer spawner"
Spawnontrigger true
Subgroup 1:
SETONTHIS/proximityrange/-1/spawnontrigger/false
SETVAR,RightCombo/(GET "Main spawner"s name)
SETVAR,EnteredCombo/(GET "Entered Combo" spawners name)
Subgroup 2:
IF/"{GETVAR,RightCombo}" = "{GETVAR,EnteredCombo}"/3/4 note: the "" are important
Sungroup 3:
SET/proximityactivated/true
GOTO/5/blah/1
Subgroup 4:
SET/Sequentialspawn/9/proximityactivated/true
GOTO/5/blah/2
Sungroup 5:
SETONTHIS/proximityrange/-2/spawnontrigger/true
This is how the system checks and stores what colors have been entered when
a player uses the levers.
"Entered Combo" spawner
Min/MaxDelay Zero
Proximityrange -2
Spawnontrigger true
Entry: SETONTHIS/name/{GETONTHIS,name}{GETONTHIS,proximitymsg}
And the 4 colored levers that work with the "Entered Combo" spawner
Two state simplelever:
Target0Item = "Entered Combo" spawner.
Target0Property = SET/proximityactivated/true/proximitymsg/(The color of the lever, b for blue, y for yellow, g for green and r for red)
Target1Item = Itself
Target0Property = SET/leverstate/0
(I setup the lever this way so when used it would instantly pop back to its first state)
What the levers does is to set the "Entered Combo" spawners proximitymsg to
the color of the lever just used, and activates the spawner. I just used
the property proximitymsg to store the color name.
When the spawner activates it will add the color name to its own name.
So a sequence of Green Blue Yellow Red, would make the spawners name be
"gbyr"
Xavier_WER- 08-14-2007
Center crystal is a TimedSwitchableItem
Target0Item = "Combo Checker" spawner
Target0Property = SET/proximityactivated/true
Target1Item = Itself
Target0Property = SET/state/0/visible/false
Now finally the spawners at each of the colored levers.
Group true
Min/maxdelay zero
Proximityrange -2
SETItem "Main Spawner"
Spawnontrigger true
Spawnrange 0
Entry:
EFFECT,x,15
SOUND,x,5
SET/name/{GETONTHIS,SETItem.name}(Color of the lever the spawner is at)
Now, how it all works:
The initializer spawner will trigger when a player says "start"
Firstly it will store the serial of Trigger player so it never gets lost of mixed up.
It then changes itself from a speech trigger spawner to one that triggers when
the property Proximityactivated is set to true.
It now starts the game by activating the "Main Spawner" with a homerange of 4.
Homerange is just the property I used for how many colors there will be in the
combo.
The main spawner will essentially do a loop, where it randomly selects
one of the spawners at a colored lever and makes it activate
Each of those spawners does a unique sound and animation that represents its color
Green is a poison cloud with the sound of cure
blue is a sparkle with the sound of heal
Yellow is a firecolumn with a fireball sound
Red is a Red sparkle with the sound of paralyze
Each of these spawners will add a letter to the "Main Spawner"s name, which acts
as the "Right Combination".
When its done looping it will make the levers and crystal visible and usable.
Players then enter the combination by using the levers, when they're done
they use the crystal.
Each of the levers has the same sound as the animation for their color (just to
make things abit easier on the players)
The levers activate the "Entered Combo" spawner, which will add a letter
to its own name.
And finally, when the crystal is used it activates the combo checker
which compares the names of "Entered Combo" spawner & "Main spawner"
If they match the players move on = The Initializer spawner will tick and
start the show again making it harder. Until they've done 4 rounds.
You can add a on more rounds quite easily.
If they loose the whole thing resets and the player who started the game gets
poisoned as punishment.
ArteGordon- 08-14-2007
clever. I like the name comparison to test for the sequence match.
Xavier_WER- 08-14-2007
yea, comparing the name was one of my biggest problems.
It had to be within "" for it to actually work.
GET,name=GET,name wouldnt work.