Tutorial 2 in 1 Doodad Tutorial

R

Ricky

Guest
Hi~Ricky
Me again, as some of you may know this is my second tutorial and some should know that all comments are welcome and crititism would be great as long as it is constructive (you tell me whats wrong and your solution to it. As their is no point in saying thats wrong but not say how to fix it). Anyway in this tutorial im going to explain how to use elevators and gates. Now most would find it pointless as it is simple but some dont understand how to use them.So lets begin!
I shall start with gates as it is the shorter of the two
First of all we need to open the editor and make a new map. Once there place down on the map a gate any gate (they are found in trees/destructables) Now open the trigger editor:Make a new trigger named of your choice (mine is gate open) then make another (mine is called gate close)Now go to the first trigger the open one and under events type in what you want for it to open. then under actions put open gate then select the gate(the trigger is under destructable) then the gate will open. If you want you can also add a condition.
This is an exampl

Code:
[U]Trigger gate open[/U]

events
   a unit enters region 001<this region is in front of the gate
conditions
  (trigering) unit equal to sorceress
actions
  open gate 001

Now we do almost the exact same thing except we change the events to what you want to close it then under actions change it to close gate 001
This is an example

Code:
[U]Trigger gate close[/U]

events
   a unit enter region 002 (This time the region is on the other side of the gate)
conditions
   (triggering) unit equal to sorceress
actions
   close gate 001

If you want to make it so it only opens or close once you only need one trigger.
Thats all for baisic gates.:)

Now we are on to the elevators

To start with we need to place an elevator now under normal circumstances an elevator can only go up to a hight of plus two in the terain palette if it is on the ground so thats how we will do it. First we have to make sure that the elevator is in the right place if you press p it should show you were units can walk we need the elevator in a position were it shows the edge of the cliff blue so units can walk there. Now if we left it like that the elevator wouldnt move and units can just move up and down it unrealisticly so first we need elevator walls, place one on each side of the elevator but you must place a dead elevator wall on the entrance point of the elevator as dead means open. (it is hard to do this as unfortuneately the elevator walls are longer than the elevator and i have stupidly forgoten how to remedy this. My solution to this problem i make it so it is impossable to get to the side of the elevator by using props or suchlike) Now for the triggers.:)

Open up the trigger editor and create two new triggers (i called mine elevator up and elevator down) in the first one the 'up' one put the events to whatever you want to make the elevator go up then you must put under actions set elevator hight 2 (if the terain you want it to go up to is 'up' one as setting it to 1 makes it go to its begining position)you also need the actions open and close elevator walls (close the one you came in by and open the one you leaving through)
This is an example

Code:
[U]Trigger elevator up[/U]

events
  player 1 types elevator up as an exact match
conditions
    
actions
   set hight of elevator 001=2
   open north elevator wall
   close south elevator wall

Now all we have to do is reverse the operation:)

Code:
[U]Trigger elevator up[/U]

events
  player 1 types elevator down as an exact match
conditions
    
actions
   set hight of elevator 001=1
   open south elevator wall
   close north elevator wall

And their we have it a baisic way of using elevators.:)

So thats the end of my second tutorial i hope you found it usefull.:)
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
For gates, how would you make a gate that will open for one player, allowing that player's units to pass through (probably in a line), then close after the last unit is through the gate? And make it work both ways. (Like defending a city, and you can go in and out?)
 
R

Ricky

Guest
This is how

For gates, how would you make a gate that will open for one player, allowing that player's units to pass through (probably in a line), then close after the last unit is through the gate? And make it work both ways. (Like defending a city, and you can go in and out?)

Right here be how.You would need two trigers one being slam door on enemy:
Code:
Trigger slam door on enemy

events
  A unit enter region 001 <in front of the gate
conditions
 (Trigering unit) Belongs to an ally of player 1(example of enemy player)
actions
  Close gate 001 (The gate the enemy arnt allowed through)

Then for the open for the good guys you would do this:

Code:
Trigger open for good guys

events
 A unit enters region 001(IN front of the gate)
 A unit enters region 002(Behind the gate)
conditions
 (Trigering unit) Belongs to an ally of player 2(xample of defending player)
actions
 open gate 001
 wait 10 seconds (as long as you want to give the other units to run through)
 close gate001
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
Right here be how.You would need two trigers one being slam door on enemy:
Code:
Trigger slam door on enemy

events
  A unit enter region 001 <in front of the gate
conditions
 (Trigering unit) Belongs to an ally of player 1(example of enemy player)
actions
  Close gate 001 (The gate the enemy arnt allowed through)

Then for the open for the good guys you would do this:

Code:
Trigger open for good guys

events
 A unit enters region 001(IN front of the gate)
 A unit enters region 002(Behind the gate)
conditions
 (Trigering unit) Belongs to an ally of player 2(xample of defending player)
actions
 open gate 001
 wait 10 seconds (as long as you want to give the other units to run through)
 close gate001

Hm. A couple things with these two triggers:
1. The gate won't close behind the allied units, only when an enemy gets close, so what if you have enemies following, and the gate closes, then you have some of your units trapped outside?
2. Also, what happens when you want an army to go through, and you don't know how long you will need to gate to stay open?

I've tried some solutions to these problems myself, none of which seem to be 100% effective, but you can see some of my samples if you want. I'm hoping that one of us might be able to come up with a foolproof system. :D
 
C

Corkysmurf

Guest
Hm. A couple things with these two triggers:
1. The gate won't close behind the allied units, only when an enemy gets close, so what if you have enemies following, and the gate closes, then you have some of your units trapped outside?
2. Also, what happens when you want an army to go through, and you don't know how long you will need to gate to stay open?

I've tried some solutions to these problems myself, none of which seem to be 100% effective, but you can see some of my samples if you want. I'm hoping that one of us might be able to come up with a foolproof system. :D

Maybe you could make this gate a STRUCTURE, and make it able to upgrade to an open gate for free and with 1 second build time, and same with the open gate, just the other way around. Therefore, YOU can decide when to open it or not.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
I've never though of that. That sounds like an excellent idea. I'll let you know if it works.


Result: I can't get it to work right. It will let units through, but to make the opened gate a unit, you have to use the same model as the closed gate, so it doesn't look open. Units just walk right through the "gate" part, even though it looks like they shouldn't be able to go through.
 
R

Ricky

Guest
Heres how

Hm. A couple things with these two triggers:
1. The gate won't close behind the allied units, only when an enemy gets close, so what if you have enemies following, and the gate closes, then you have some of your units trapped outside?
2. Also, what happens when you want an army to go through, and you don't know how long you will need to gate to stay open?

I've tried some solutions to these problems myself, none of which seem to be 100% effective, but you can see some of my samples if you want. I'm hoping that one of us might be able to come up with a foolproof system. :D

1. The gate should close behind the allied units it all depends on the waiting time of when it will close. You just have to decide how much time to give them.But for some of your men trapped outside, well if your trying to get inside and the enemy is as well if you just left the gate open, sure your men would be in but so would the enemy.

2.Its all about timing this is only one way i thought you wanted it so you didnt control the gate but it did it itself and that is a lot harder then making manuall gates.

3. If you would be satisfied with a manuall gate its simple change the events for open to player type -open or something like that then if you type -open in game the gate will open. Then to make it close just put the close events to -close.In anycase if you have a prob with gates just ask me in this thread i will come up with something.
 
R

Ricky

Guest
New map

Hi~Ricky

Hi evryone im just going to say that in members projects area my new map "The Battle of Hastings" is there please go and have a look (it comes with download)
 

Magentix

if (OP.statement == false) postCount++;
Reaction score
107
Create a gate and a small tower/building next to it.
Create 2 dummy spells with no target/mana/cooldown/whatever

When the gate is opened, you add the Close spell to the tower and remove the Open spell.

When the gate is closed, you add the Open spell to the tower and remove the Close spell.

Then you can use the
E - Unit starts the effect of an ability
C - Unit is of Unit-type GateController
A - Open/Close gate


For multiple gates you'd have to use arrays to link the towers to their respective gates.
 
R

Ricky

Guest
just got to say

Hi~Ricky

Hi all i would just like to say that in members projects you should look for my thread "The Battle of Hastings" Thx:D
 
U

Ur-Quan

Guest
For those gates which would wait your units there is an example:

Code:
events
   a unit enters region 001
conditions
actions
  open gate 001
  wait 3 seconds
  For every integer A to 6666 do actions
    If/then/else
      if-condition
        Region 001 is empty (no units in it)
      then
        Close gate 001
        End this trigger immidiately(or something same)
      else
        Wait 3 seconds


This could do the job (It isn't real trigger, just pseudo code out of my head), and it can be easyly modified.

Edit:
Ricky please stop advertising your map in tutorial treads, it's irritating and rude.
You can bump your map thread instead.
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
Good job, though I think that it would be better if the triggers were exact so people don't get confused. eg:
(Unexact)
Code:
trigger
events
conditions
actions
close door
open door
display "text"
wait
(Exact or near exact)
Code:
Door Open and Text Trigger
    Events
        Unit - A unit enters Region 000
    Conditions
    Actions
    Destructible - Open Gate 001
    Destructible - Open Gate 002
    Game - Display text to (All Players) for 4.00 seconds reading "Text"

It makes it look more neat and precise, especially when using proper capitalization and grammar. :)

Gj though! +rep
 
R

Ricky

Guest
Hi

Hi~Ricky:)

Hi guys. Thanks for the advice. Sorry for the advertisment i will stop if you think it is bad.Also i shall do a spell checker with it.:)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top