HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger Help

07-06-2003, 03:50 AM#1
c0nnick
Thats right... I usually find a way around things, but not this time, and Im really mad, I hate these triggers, they have such complicated shit, but u cant do the simple things... Anyway, Im making faction triggers where u only lose faction if a person owned by the owner of the unit yur killing sees it(Like u only lose faction with guards if u kill a guard with another guard around), and Ill show u the part Im stuck on(The conditions)

BTW Im using TFT

And the [1]'s are becuz Im using arrays, there will be 4 players...

And I know that Near_Players [1] Works, I tested that part

TRIGGERS
EVENTS-
A unit dies
CONDITIONS-
The killing unit is owned by player 1
ACTIONS-
Unit Group- Pick every unit in Near_Players [1] and do...
If (Owner of Picked unit)) Equal to neutral passive) Then do (Unit Group- Add (Picked unit) to Saw Kill [1] Else (Do Nothing)
If/Then/Else
Conditions-
(Owner of( Random unit from Saw_Kill [1])) Equal to neutral passive
(Owner of (Dying unit)) Equal to Neutral Passive
Then Actions-
Blah Blah, edits faction
07-06-2003, 04:40 AM#2
DemonicSoul
i may be mistakken, but im pretty sure the problem is right here

Quote:
(Unit Group- Add (Picked unit) to Saw Kill [1] Else (Do Nothing)


you cant add unit to a unit group variable liek that, u have to use set variable
(i had this problem once, it was on RoC, its possible that its been patched or something, but try to fix that and see if it works)
07-06-2003, 05:46 AM#3
Hivemind
There is a way to do it without custom text or setting global variables. Its a little tricky but it can be done. We think one of the setting for arrays in TFT is for this. The one that has the number in (). Try setting this to 256 or something and testing it again. If this activates the global variable for the array then it will work.

Your other options are to set a global variable through custom text or remove the unit when it comes into play then create a copy. Add the copy to the array with a last created unit command. Either of these will allow you to add a unit to a empty unit group array.
07-06-2003, 07:34 PM#4
c0nnick
Sorry Hive, I dunno what yur talking about, anyway, you were right, Demonic! Thanks! I have a boolean variable now instead of a unit group. Ill now attach a pictuere of what u guys helped me create!

Edit: BTW, hows the terrain look?
07-06-2003, 08:05 PM#5
DemonicSoul
well the screenshot is a little confusing, but im glad i could help, btw the terrain is ok (its kinda annyoing to do city terrain sometimes cuz it seems dumb to use raise and lower)

i think what hive was talking about is like running a command on every thing in a variable array

so u got like unitX[1],unitX[2],unitX[3], etc, and if u want to include all of them in something, like move unitX[256] (thats what hive said i udnno if it works, but hive is saying it will make all of the units contained in the variable "unitX")
07-06-2003, 09:26 PM#6
c0nnick
Ohhh really? Neat, Hive is smart... So r u, how did u interpret that??

The screenshot is a shot of me(The Blood Mage) Killing a civilian and not losing factino becuz no one saw the kill, u can tell when u dont lose faction cuz it ses Sneaky! Above yur head.

Anyway, I have another question now, is there an EZ way to make it so floating text will go away after X seconds, Im using (Last Created Floating Text) right now, but if another one comes up within the 2 secsm the first one stays for a long time and looks stupid floating across the map...
07-07-2003, 03:49 AM#7
DemonicSoul
i was wondering how to get rid of floating text myself, i wanted there to be a timer that spawns over the units head

mine didnt even show up as anything, it showed up as 0, 3 times, and i made it so the trigegr was on for 10 seconds.... but i scrapped that instead

i cant think of any good way to do that unless its just one for each player... or IS it just one for each player? if so then id just set it to a variable(like will u be able to destroy it before that player can do it again, or can the player do it at any time?)
07-07-2003, 07:40 PM#8
c0nnick
Hey thats good, only 1 for each player, and I set it when it appears, and when a new one appears it destroys it, then creates the new 1! Haha, thanks, I didnt think that wud work for sum reason, but when u sed it it just made sense, u strange person you! Thanks again!