HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Making units have 50% to be reaveld at day

07-02-2008, 08:16 PM#1
Guest
Okey i would like to have help with a trigger that makes units have a 50% to get revealed at day if they get to close to units. I have tried triggering it myself but because i lack skill in triggering i cant trigger it myself.

This is so far i have come with the trigger (don't laugh at it)

Hidden information:
Trigger:
Invisbile
Collapse Events
Unit - A unit comes within 512.00 of No unit
Collapse Conditions
(Unit-type of (Matching unit)) Equal to Knight
(Unit-type of (Matching unit)) Equal to Paladin
Collapse Actions
If ((Random integer number between 1 and 2) Equal to 1) then do (Unit - Grant shared vision of (Triggering unit) to Player 1 (Red)) else do (Do nothing)
07-02-2008, 08:28 PM#2
Strilanc
Use "Triggering Unit" instead of matching unit in your conditions.
07-02-2008, 09:08 PM#3
Guest
Quote:
Originally Posted by Strilanc
Use "Triggering Unit" instead of matching unit in your conditions.

That i already know but the units that are invisible don't turn visible. And i know the problem is this trigger

then do (Unit - Grant shared vision of (Triggering unit) <- I don't know what to pick so the invisible units are the ones that share vision.

Then i don't think this trigger wont really work either.

Unit - A unit comes within 512.00 of No unit <- Will no unit really work?
07-02-2008, 09:49 PM#4
Captain Griffen
No unit won't work.

This is a rather tricky one, actually, since there is no generic event for it.
07-02-2008, 09:58 PM#5
Guest
Well since the invisible units aren't permanent invisible they will be using an ability (wind walk). So i would have to have an trigger that starts when the specific unit uses that ability. Then i would have to create i trigger just for that unit.

I'm guessing i have taken water over my head. I just do something easier.
07-03-2008, 08:12 AM#6
Typek
I used similar WW detecting in one of my maps.
It is not exactly doing what you want but it is close enough for you to use something from it.
It works this way : every unit has a dummy buff placer aura (Buff name seen, Ability based on Slow Aura (Tornado)) with small range and game is checking for units who have WW buff and seen buff at once and reveal them (I add 50% chance to code). This is not "on enter" event, it is periodical so if you are not revealed at first that doesnt mean you can just stand there.

Trigger:
Reveal
Collapse Events
Time - Every 3.00 seconds of game time
Conditions
Collapse Actions
Collapse Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) has buff Seen ) Equal to True
((Picked unit) has buff Wind Walk) Equal to True
(Random integer number between 1 and 2) Equal to 1
Collapse Then - Actions
Unit - Remove Wind Walk buff from (Picked unit)
Else - Actions

And sorry for bad grammar
07-03-2008, 05:31 PM#7
Anopob
Won't that eventually lag as it takes place EVERY 3 seconds checking a non-declared/removed group?
07-03-2008, 06:01 PM#8
Typek
Well ,it didn't lag for me ,but it was small map and it did not take more than 30-45min to win.
If you find any problem then fell free to correct me.