Staredit Network

Staredit Network -> UMS Assistance -> Door/Key Problem
Report, edit, etc...Posted by Warlord on 2005-03-02 at 20:46:03
Alright I'm having troubles with the triggers. I want it so that you must aquire a certain key to move on into another room. What are the Actions/Conditions for this? I didn't see it in the tutorials.
Report, edit, etc...Posted by Urmom(U) on 2005-03-02 at 21:02:48
ok heres what to do:

make a trigger so that when you get the key it sets a switch. now for the door trigger do
Trigger
Conditions:
¤ Switch is set
¤ brings at least 1 men to door
Actions:
¤ disable doodad state for the door
¤ preserve trigger

Report, edit, etc...Posted by Warlord on 2005-03-02 at 21:05:33
Is there anyway to do it without a switch? Cuz I'm not 100% on how to use em just yet
Report, edit, etc...Posted by KaboomHahahein on 2005-03-02 at 21:07:09
Or you can use death counters.


Trigger
Description:
Openning door
Players:
¤ current player
Conditions:
¤ Bring atleast 1 "key guy" to acuire key
Actions:
¤ Set death set to 1 (whatever unit) for (whoever)
¤ display text "OMG! I got the key!"
¤ PlayWav"Key noise!"


Then


Trigger
Description:
I have the key!
Players:
¤ current player
Conditions:
¤ Death is exactly 1 of (whatever unit) (Whatever Player)
¤ Bring atleast 1 "Key guy" to 'location'
Actions:
¤ Disable doodad state for Door at 'location1'

Report, edit, etc...Posted by Urmom(U) on 2005-03-02 at 21:11:48
switches are very easy to understand, jsut remember:
their default setting is cleared
when you set them in an action, it just flips the switch set like flipping a light switch

heres a tutorial on them too, once you learn them youll love them!
Switches Tutorial: We have tutorials for everything!
Report, edit, etc...Posted by Warlord on 2005-03-02 at 21:15:54
Alright! It worked! Hey Kaboom you rock! And urmom, thanks for you help too... Karma for both of yeh lol... without your help, by map would be screwed. See I thought that Death Counters were an entirely new program... so I didn't want to get in with that. Thanks again.
Report, edit, etc...Posted by KaboomHahahein on 2005-03-02 at 21:17:16
I was about to post the tutorial. I had the link copied and all but when I come back Urmom already posted it. Anyways look at the example lol. It is the exact same thing as what you are looking for. The example trigger is a trigger for a key too!
Report, edit, etc...Posted by Warlord on 2005-03-02 at 21:43:26
I just encountered another strange problem... some lings and hydras wont burrow when I go and test the game... They are set as burrowed in the unit properties... Any thoughts?
Report, edit, etc...Posted by LegacyWeapon on 2005-03-02 at 21:45:44
Make sure the owner has the ability burrow researched.

ADDITION:
Make sure the terrain they're on is able to be burrowed on.
Report, edit, etc...Posted by Warlord on 2005-03-02 at 22:26:25
Ah that was it. I, being my completely stupid self forgot to research burrow. Thanks. If I have any more problems, do you guys mind if I just post em here instead of making a new thread?
Report, edit, etc...Posted by FaZ- on 2005-03-02 at 22:40:34
It is recommended that you continue posting in the same thread and not make a new one, so your instincts are correct.

As for using death counters, I assume that you either don't understand that they are the exact same thing as switches in some cases (this scenario being one of them) or that you don't actually understand what he did.

Adding 1 to the death counter would have been the same as setting a switch. Instead of setting the death counter to 1, set a switch. Then when he goes to the door and the switch is "set" the door will open with the correct triggering. Switches seem difficult at first but they are actually really easy.
Report, edit, etc...Posted by Tuxedo Templar on 2005-03-02 at 22:47:41
QUOTE
ADDITION:
Make sure the terrain they're on is able to be burrowed on.

LegacyWeapon, any terrain that can be walked on can be burrowed on.

QUOTE
do you guys mind if I just post em here instead of making a new thread?

That'd be the prefered way, yeah. Chances are that someone, somewhere, has asked almost any questions you can come up with at least a jillion times before, so try looking through the tutorials or even the staredit help for your answers too.

And just so you know, switches are easier to use than death counters, if only you can grasp the abstract concept.
Report, edit, etc...Posted by Warlord on 2005-03-02 at 23:08:24
No no lol... I can't grasp the concept as of yet... I read the tutorial about 50 times the other day, and I still didnt get it... I'll just stick with switches just for now... Is there some times when switches are the *only* possible way of going?
Report, edit, etc...Posted by LegacyWeapon on 2005-03-02 at 23:11:32
Switches are never the *only* possible way of going. There are always other ways to do things.
Report, edit, etc...Posted by Warlord on 2005-03-02 at 23:35:53
thumbup.gif awesome then I know that I can continue my map them. Can I be safe to assume that most of the time Death Counters are replacements?
Report, edit, etc...Posted by Tuxedo Templar on 2005-03-03 at 00:00:36
Switches are just a way to memorize something. Storage. If you want to make a way to mark that something has occured so that something else can check and it, then switches are *ONE* way to do it. Switches are good because they don't take up any units, locations, and only one string (plus they're easier to use in triggers than counters and have a few other features, such as randomization).

Other ways would include using death counters (of which there are far less available, and they can be affected by actual unit deaths in the game), minerals or gas counters (which obviously change also if minerals or gas are mined in the the game), custom score counter, units themselves (like make a flag in a location to mark when something is supposed to happen, and remove it to end the effect), and about a jillion other ways your creativity can come up with.

Honestly though, if you can't understand simple concepts like that then you're probably not going to be making any good maps any time soon.
Report, edit, etc...Posted by Warlord on 2005-03-03 at 00:44:56
It's, like he said, a abstract concept. I'll try to learn em sometime tho.
Report, edit, etc...Posted by (U)Bolt_Head on 2005-03-03 at 01:31:47
QUOTE(Warlord @ Mar 2 2005, 09:26 PM)
Ah that was it. I, being my completely stupid self forgot to research burrow. Thanks. If I have any more problems, do you guys mind if I just post em here instead of making a new thread?
[right][snapback]157436[/snapback][/right]


Yeah, that would be great. You might however consider changing the thread title and updating the first post to indicate that This thread will have continous questions.

QUOTE(Warlord @ Mar 2 2005, 11:44 PM)
It's, like he said, a abstract concept. I'll try to learn em sometime tho.
[right][snapback]157515[/snapback][/right]


I've never read a good switch tutorial. They always sound good to people who understand them but i don't know if anyone was ever clueless until reading a tutorial about switches.

I always say that switches themselfs are easy to understand. Its there purpose that is hard to grasp. Maybe i should work with you on writing a tutorial about them.
Report, edit, etc...Posted by in_a_biskit on 2005-03-03 at 02:18:56
Switches for Dummies

Behind your map are lots of little people, doing all sorts of jobs that you tell them to do.

Suppose that there are two people in particular: Alexei and Nikolai.
Alexei is holding an apple. Nikolai is holding nothing. At any time, you can tell Alexei to give the apple to Nikolai. Similarly, you can tell Nikolai to give Alexei the apple at any time. Exactly one person must be holding the apple at any one time.

Part of the Gate-keeper's job is to keep an eye on Nikolai. If Nikolai is holding the apple, it is his job to open the gate. He works like this:

Trigger
Description:
The Gate-keeper's job
Conditions:
¤ Nikolai is holding the apple
Actions:
¤ Unlock the gate

If Nikolai isn't holding the apple, then the Gate-keeper won't do anything.
Once Nikolai does have the apple, he will unlock the gate, and then he won't have to do anything else for the rest of the game.

But what will cause Alexei to give Nikolai the apple? You will tell Alexei to give Nikolai the apple when the player gets the key:

Trigger
Description:
The player has the key!
Conditions:
¤ Player gets a key
Actions:
¤ Tell Alexei to give Nikolai the apple.


Now its just as possible for you to tell anyone else in your map to look at Alexei and Nikolai, and to do things according to which one has the apple.
In fact, there are actually 255 different pairs of special people whose job it is to look after a different apple. These pairs of people work just like Alexei and Nikolai do, but they work completely independently of one another.
We call these pairs of people and their apples switches. If Nikolai has the apple, we say that the switch is 'set'. If Alexei has the apple, the switch is 'cleared'. If we tell Alexei to give the apple to Nikolai, we are setting the switch. All switches are cleared at the beginning of each game.

In this case, the 'real' triggers might work like this:

Trigger
Description:
The player has the key!
Players:
¤ Player 1
Conditions:
¤ Player 1 brings at least 1 men to "Location of the key"
Actions:
¤ Set "Switch 1"



Trigger
Description:
Open the gate
Players:
¤ Player 1
Conditions:
¤ Player 1 brings at least 1 men to "Location of door"
¤ "Switch 1" is set
Actions:
¤ Disable doodad state for "Left Upper Level Door" for All players at "Location of door"


"Switch 1" acts as a way of 'remembering' whether you have the key or not.

Actually, there are even more ways we can use switches. At any time, we can call "Bomb!", and whoever is holding the apple will throw it to the other, before realising that what they were holding was actually an apple, not a bomb. If we just want the apple to switch hands between Alexei and Nikolai, regardless of where it is, we call this 'toggling'. When you 'toggle' a switch and it is cleared, then it will be set. If you toggle a switch and it is set, it will be cleared.

The last thing you can do is to grab the apple from whoever has it at any time, and throw it up into the air, so that you don't know whether Alexei or Nikolai will get to it first. Alexei and Nikolai are of the same height and strength, so the chances of either one getting the apple are 50/50 every time. We call this 'randomising' the switch. It randomly puts the switch into one of its two states: set or cleared. It's just like flipping a coin, and is very useful if you want something to be unpredictable.

And that concludes the lesson on switches. smile.gif
Report, edit, etc...Posted by LegacyWeapon on 2005-03-03 at 06:25:16
A light switch is a better comparison. At least in my opinion.
Report, edit, etc...Posted by in_a_biskit on 2005-03-03 at 06:31:25
It probably is a better analogy, but I thought this way was more fun.
It is also slightly better for randomisations... tongue.gif
Doesn't matter - it's only a fun tutorial.
Report, edit, etc...Posted by CeR on 2005-03-03 at 09:03:33
Yes... I thing that it the tutorial DB it have some toturial for door....

Why do you come to look this? biggrin.gif
Report, edit, etc...Posted by (U)Bolt_Head on 2005-03-03 at 12:35:45
I think the lightswitch is kinda like the smart ass comparison.

New Guy: Whats a switch
Other guy: Well its like a light switch, you know how to use those right?
Mod guy: Yep just like Other Guy said its a light switch, now that your question has been answered thread locked.

I'm just kidding about the mod thing, just thought it would be funny to add in since I am one
Report, edit, etc...Posted by Warlord on 2005-03-03 at 17:56:09
lol nice to know that a moderator/pro map maker has a smart ass sense of humor
Report, edit, etc...Posted by chuiu on 2005-03-03 at 23:34:10
Bolt gets paid to make maps? ohmy.gif
Next Page (1)