HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Little big problem -.- , >inside<

04-21-2004, 08:29 PM#1
Arohk
hi there, i need help for a minigame whit platforms, my problem is i have"80" platforms(elvator buttons) in a room (1 region above every platform), so , i want it that if a unit move in a region and the platform in that region is "down"(dead) the unit die, but i dont really want to make 1 trigger for every platform, may is there is a simplier way whit 1 trigger?,

i tried something but i dont get it to work
E
unit enters region 001
unit enters region 002
unit enters region 003
.
.
.
unit enters region 080
now how do i check the platform in the region is DEAD(or alife i dont care) when the unit move in one of the 80 regions
04-21-2004, 08:54 PM#2
ThyFlame
Boolean array I suppose.

The easiest way I can think of is to make a trigger that puts every region into a region array.

Then

Event:
A unit enters a region

Actions:
For each integer A 1 to 80
-If entering unit is in regionarray[integer A] = true
-then
--if
---boolean[integer a] = false
--then
---kill entering unit
--else
---do nothing
-else
-do nothing
04-22-2004, 05:40 PM#3
Arohk
Quote:
Originally Posted by ThyFlame
Boolean array I suppose.

The easiest way I can think of is to make a trigger that puts every region into a region array.

Then

Event:
A unit enters a region

Actions:
For each integer A 1 to 80
-If entering unit is in regionarray[integer A] = true
-then
--if
---boolean[integer a] = false
--then
---kill entering unit
--else
---do nothing
-else
-do nothing

thx, i did that but it dont works perfectly, when i move from a platform that is "up" to an other that is down it should kill but nothing happens, otherwise when i move from a platform that is down(or from nothing) to an other that is down the unit dies,

Triggering unit is in regionarray(integer A) = true
mean the same as
Regionarray(Integer A) contains triggering unit = true ?
04-22-2004, 07:16 PM#4
Ligature
Have it trace some information: like which region WC3 thinks the unit is in when the trigger runs. Also, what happens when the unit moves from a "down" region to an "up" region?