HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Simple Yet Aggrivating

08-31-2004, 04:24 PM#1
cheese_doodle
Im making this really awesome capture the flag map that has outdoor & INDOOR battles between the teams, but I need some help with a trigger thats probably really easy (at least not for me). I have a building with a gate next to it as if it were a door to go inside, then i have and inside room that is at another part of the map. I made two regions, both at the front at the door (both in and out) and i need a trigger so that when a unit enter the region in front of the outside door, he moves to the region (instantly) in front of the inside door , and vise versa.
I made a trigger for this but what keeps happening is when a unit enters the outside gate he is moved to the inside gate, but then he moves back to the outside gate and back and forth. Here is what my trigs look like.
(to go inside)
-EVENT-
~Unit enters region [outside door]
-ACTION-
~Move unit instantly to center of [inside door]

(to go outside)
-EVENT-
~Unit enter region [inside door]
-ACTION-
~Move unit instantly to center of [outside door]

I know exactly what the problem is in this trigger setup but i cant seem to make anything better. The only thing i can think of would take lots of regions and variables.
Also- I need the trigger to be as small as possible because i have tons of doors!!
Any help would be greatly appreciated THNX
08-31-2004, 04:31 PM#2
I am spam
Create two more regions in such a way that when someone enters the door region and is moved to one of the new regions they are not within the door region for side they just entered.
08-31-2004, 04:33 PM#3
Xodus-Wing
why not just have them type something like -open gate and then have the gate open
08-31-2004, 04:42 PM#4
cheese_doodle
Im probably going to use Spam's idea (thnx I Am Spam) because the game speed is going to be fast paced and even though most people can type pretty fast, your still probably going to get killed wile your typing, but thanx for the reply ^_^
09-02-2004, 05:40 PM#5
image
Do this, one for each player, using the array number corresponding to the player number. You first need to create a boolean array (of your player number).Then do this for each player.
--------------------------------------------------------------------------
Trigger name: in

Event: unit enters region in (your in region)

Condition: In(boolean array) [1](player number) = false

Action: Set In(boolean array) [1](player number) = true
Action: Unit move triggering unit instantly to out (out region)
--------------------------------------------------------------------------
Trigger name: out set

Event: Unit leaves out (your out region)

Condition: In(boolean array) [1](player number) = True

Action: Set In(boolean array) [1](player number) = false
--------------------------------------------------------------------------
Trigger name: out

Event: unit enters region out (your out region)

Condition: In(boolean array) [1](player number) = false

Action: Set In(boolean array) [1](player number) = true
Action: Unit move triggering unit instantly to in (in region)
--------------------------------------------------------------------------
Trigger name: in set

Event: Unit leaves in (your in region)

Condition: In(boolean array) [1](player number) = True

Action: Set In(boolean array) [1](player number) = false



PM me if you dont understand
09-03-2004, 02:34 AM#6
cheese_doodle
Hey thnx image im gonna use that ill give ya some credit just in case this map becomes popular ;)
09-03-2004, 03:37 AM#7
Pheonix-IV
Quote:
Originally Posted by image
Do this, one for each player, using the array number corresponding to the player number. You first need to create a boolean array (of your player number).Then do this for each player.
--------------------------------------------------------------------------
Trigger name: in

Event: unit enters region in (your in region)

Condition: In(boolean array) [1](player number) = false

Action: Set In(boolean array) [1](player number) = true
Action: Unit move triggering unit instantly to out (out region)
--------------------------------------------------------------------------
Trigger name: out set

Event: Unit leaves out (your out region)

Condition: In(boolean array) [1](player number) = True

Action: Set In(boolean array) [1](player number) = false
--------------------------------------------------------------------------
Trigger name: out

Event: unit enters region out (your out region)

Condition: In(boolean array) [1](player number) = false

Action: Set In(boolean array) [1](player number) = true
Action: Unit move triggering unit instantly to in (in region)
--------------------------------------------------------------------------
Trigger name: in set

Event: Unit leaves in (your in region)

Condition: In(boolean array) [1](player number) = True

Action: Set In(boolean array) [1](player number) = false



PM me if you dont understand
Now that is a rediculosly complecated way to do a simple thing. Sheesh.
09-03-2004, 07:24 AM#8
image
A simpler way to do it is to put on a gate destructible. Have one trigger make it invunerable then have one region that goes on both sides other door.

rrrrrrrrrrrrrrrrrrrrr
r-------------------r (r=region perimeter)
r-------------------r (G=Gate)
r-------------------r
GGGGGGGGGGGGG
r-------------------r
r-------------------r
r-------------------r
rrrrrrrrrrrrrrrrrrrrr

Next have a tigger that whenever a player enters the region it opens the door and another that whenever a player leaves the region the door closes.
09-03-2004, 11:26 AM#9
Anitarf
It's not like that, the gate is there just for show, he's not teleporting to the other side of the gate, but to the other side of the map.

The simplest solution I see for this is using custom values. Here's a modification of your original triggers that should make everything work simply and correctly:

Code:
(to go inside)
Events:
  Unit enters region [outside door]
Conditions:
Actions:
  If - Then - Else multiple functions:
    If - conditions
      integer comparison - (custom value of (entering unit)) equal to 0
    Then - actions:
      Unit - Set custom value of (entering unit) to 1
      Move unit instantly to center of (inside door)
    Else - actions:
      Unit - Set custom value of (entering unit) to 0

Code:
(to go outside)
Events:
  Unit enters region [inside door]
Conditions:
Actions:
  If - Then - Else multiple functions:
    If - conditions
      integer comparison - (custom value of (entering unit)) equal to 0
    Then - actions:
      Unit - Set custom value of (entering unit) to 1
      Move unit instantly to center of (outside door)
    Else - actions:
      Unit - Set custom value of (entering unit) to 0

You can copy triggers directly from the editor by right-clicking on the trigger name (above all the events, conditions and actions) and selecting "copy as text".

Edit: Image, no offense meant, but your triggers are really ridiculus. With 12 players, you would do 48 triggers per door o_O .
09-03-2004, 03:09 PM#10
image
The simplest way is just to create 2 regions on each place and teleport them to the outer one. And use the inner one as the teleporter.
09-03-2004, 03:23 PM#11
image
Better way to do my long trigger meaning you now only need 4 triggers for everyone. You still need a boolean array called in or whatever to the number of your max players.
------------------------------------
Trigger name: in

Event: unit enters region In
Condition: In [(player number of (triggering player)] = false

Action: Set In [(player number of (triggering player)] = true
Action: Unit move triggering unit instantly to out (out region)

-------------------------------------------------------------------
Trigger name: out set

Event: Unit leaves out (your out region)

Condition: In [(player number of (triggering player)] = True

Action: Set In [(player number of (triggering player)] = false
------------------------------------
Trigger name: out

Event: unit enters region out
Condition: In [(player number of (triggering player)] = false

Action: Set In [(player number of (triggering player)] = true
Action: Unit move triggering unit instantly to in (in region)

-------------------------------------------------------------------

-------------------------------------------------------------------
Trigger name: in set

Event: Unit leaves in (your in region)

Condition: In [(player number of (triggering player)] = True

Action: Set In [(player number of (triggering player)] = false
09-03-2004, 08:56 PM#12
Progniss
image your way doesnt work, because if some else is behind someone who just went through the region then they wouldnt be abloe to go through until someone came back. Ant's triggers are the correct way and easy way, no offence but you make it really really complicated.