| 09-14-2004, 05:07 PM | #1 |
Hey all, I'm considering making a spell that allows a unit to build a "fortress" - basically a number of structures/doodads. The location is static on the map - every piece of the fortress will always have the same coordinates, it's not placeable. I haven't done much research yet into this spell, and I'm doing some stuff I've never done before, like placing doodads at run-time (while the game is being played) and attempting to make a door/that can open and close. Is there anyone with experience in something like this that can verify it's possible, or does anyone have any tips on how best to make this spell? Thanks for any help. |
| 09-14-2004, 08:29 PM | #2 |
You probably just want to make a spell based off of a spell that has no target, like summon water elemental. Edit it to summon nothing, and then use a trigger like this: [code]Events -A Unit Finishes Casting a Spell Conditions -Spell is = to Summon Fortress Actions Create Doodad (Wall) at var_Pos1 Create Doodad (Tower) at var_Pos2 etc. Remove (Ability being cast) from (Unit/hero [depending on whether it's a hero ability or not] casting spell) or Set boolspell = true [then you would check to make sure it was false in the conditions. You don't want them casting the spell twice] |
| 09-14-2004, 10:40 PM | #3 |
Heh I'm not too worried about the base spell or anything. Tranquility, Howl of Terror, Roar...I'll figure that out easily enough. I hadn't looked at triggers yet though, good to see that it's easy enough to place doodads while the game is playing. Hopefully placing objects that open doors isn't that difficult either. |
| 09-15-2004, 09:24 PM | #4 |
You probably want a switch. Those are'nt too hard to program. You probably want a trigger like this for the gate: Code:
Lever
Events
Destructible - Lever 0001 <gen> dies
Conditions
(Current life of Elven Gate (Horizontal) 0002 <gen>) Greater than 0.00
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Elven Gate (Horizontal) 0002 <gen> is alive) Equal to True
Then - Actions
Destructible - Open Elven Gate (Horizontal) 0002 <gen>
Else - Actions
Destructible - Close Elven Gate (Horizontal) 0002 <gen>The condition can be a bit tricky. It is found under boolean comparisson. |
| 09-15-2004, 09:59 PM | #5 |
Thanks - I'll do something along those lines, although the gate will probably be indestructible and I'll react whenever the level is attacked rather than when it's destroyed (because I want the group to be able to open and close them at will). Regardless, I'll take this path. Thanks for the help :). |
| 09-15-2004, 10:12 PM | #6 |
The lever only has 5 hp. Anyone who can't do that damage? And if you're thinking of attacking it while it's not glowing, doesn't work. It's then. You can try text activation. |
| 09-16-2004, 01:16 AM | #7 |
I'll figure it out and post my solution here. Text commands are not an option. Might be a little while, as I don't know when I'll start this hero and he will take some time to develop. |
